tensorflow::ops::RegexReplace
#include <string_ops.h> Thay thế các kết quả khớp với biểu thức chính quy pattern 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 )
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
- Đầu vào: Văn bản cần được xử lý.
- pattern: Biểu thức chính quy cần được so khớp trong chuỗi
input. - rewrite: Chuỗi viết lại sẽ được thay thế cho biểu thức
patterntại những vị trí khớp trong chuỗiinput.
Các thuộc tính tùy chọn (xem Attrs ):
- replace_global: Nếu True, việc thay thế sẽ được thực hiện trên toàn cục (nghĩa là tất cả các kết quả khớp với biểu thức chính quy
patterntrong mỗi chuỗi đầu vào đều được viết lại), ngược lại, việc thayrewritechỉ được thực hiện cho kết quả khớppatternđầu tiên.
Trả về:
-
Output: Văn bản sau khi áp dụng khớp mẫu và thay thế viết lại.
Hàm khởi 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 | |
|---|---|
| tensorflow::ops::RegexReplace::Attrs | Các 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
RegexReplace
RegexReplace( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input pattern, ::tensorflow::Input rewrite )
RegexReplace
RegexReplace( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input pattern, ::tensorflow::Input rewrite, const RegexReplace::Attrs & attrs )
nút
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Các hàm tĩnh công khai
Thay thế toàn cầu
Attrs ReplaceGlobal( bool x )