テンソルフロー::作戦::正規表現置換

#include <string_ops.h>

input内のpattern正規表現の一致を、 rewriteで提供された置換文字列に置き換えます。

まとめ

re2 構文 ( https://github.com/google/re2/wiki/Syntax ) に従います。

引数:

  • スコープ:スコープオブジェクト
  • input: 処理されるテキスト。
  • pattern: input文字列内で照合する正規表現。
  • rewrite: input文字列内で一致するpattern式に置き換えられる書き換え文字列。

オプションの属性 ( Attrsを参照):

  • replace_global: True の場合、置換はグローバルです (つまり、各入力文字列内のpattern正規表現のすべての一致が書き換えられます)。それ以外の場合、 rewrite置換は最初のpattern一致に対してのみ行われます。

戻り値:

  • Output : パターン一致と書き換え置換を適用した後のテキスト。

コンストラクターとデストラクター

RegexReplace (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input pattern, :: tensorflow::Input rewrite)
RegexReplace (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input pattern, :: tensorflow::Input rewrite, const RegexReplace::Attrs & attrs)

パブリック属性

operation
output

公共機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

ReplaceGlobal (bool x)

構造体

tensorflow:: ops:: RegexReplace:: Attrs

RegexReplaceのオプションの属性セッター。

パブリック属性

手術

Operation operation

出力

::tensorflow::Output output

公共機能

正規表現置換

 RegexReplace(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input pattern,
  ::tensorflow::Input rewrite
)

正規表現置換

 RegexReplace(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input pattern,
  ::tensorflow::Input rewrite,
  const RegexReplace::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

グローバルを置き換える

Attrs ReplaceGlobal(
  bool x
)