dòng chảy căng:: ôi:: RegexThay thế

#include <string_ops.h>

Thay thế các kết quả khớp của pattern chính quy mẫu trong input bằng chuỗi thay thế được cung cấp trong rewrite .

Bản tóm tắt

Nó tuân theo cú pháp re2 ( https://github.com/google/re2/wiki/Syntax )

Tranh luận:

  • phạm vi: Một đối tượng Phạm vi
  • input: Văn bản cần xử lý.
  • mẫu: Biểu thức chính quy được khớp trong chuỗi input .
  • viết lại: Chuỗi viết lại được thay thế cho biểu thức pattern nơi nó khớp với chuỗi input .

Thuộc tính tùy chọn (xem Attrs ):

  • thay thế_global: Nếu Đúng, thay thế là toàn cục (nghĩa là tất cả các kết quả khớp của pattern chính quy mẫu trong mỗi chuỗi đầu vào đều được viết lại), nếu không, việc thay thế rewrite chỉ được thực hiện cho kết quả khớp pattern đầu tiên.

Trả về:

  • Output : Văn bản sau khi áp dụng khớp mẫu và viết lại thay thế.

Hàm tạo và hàm hủy

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)

Thuộc tính công khai

operation
output

Chức năng công cộng

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

Các hàm tĩnh công khai

ReplaceGlobal (bool x)

Cấu trúc

tenorflow:: ops:: RegexReplace:: Attrs

Trình thiết lập thuộc tính tùy chọn cho RegexReplace .

Thuộc tính công khai

hoạt động

Operation operation

đầu ra

::tensorflow::Output output

Chức năng công cộng

RegexThay thế

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

RegexThay thế

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

nút

::tensorflow::Node * node() const 

toán tử::tenorflow::Đầu vào

 operator::tensorflow::Input() const 

toán tử::tenorflow::Đầu ra

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

Thay thế toàn cầu

Attrs ReplaceGlobal(
  bool x
)