tensorflow::ops::RegexReplace
#include <string_ops.h>
Заменяет совпадения регулярного выражения pattern в input строке на строку замены, указанную в rewrite.
Краткое описание
Использует синтаксис re2 (https://github.com/google/re2/wiki/Syntax)
Аргументы:
- scope: Объект Scope
- input: Строка, подлежащая обработке.
- pattern: Регулярное выражение для поиска в
inputстроках. - rewrite: Строка замены, которая должна быть подставлена вместо
patternвыражения там, где оно найдено вinputстроках.
Дополнительные атрибуты (см. Attrs):
- replace_global: Если True, замена глобальная (то есть, все совпадения регулярного выражения
patternв каждой строке входных данных переписываются), иначе замена выполняется только для первого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 operation
выход
::tensorflow::Output output
Публичные функции
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 )
узел
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Выход
operator::tensorflow::Output() const
Публичные статические функции
ReplaceGlobal
Attrs ReplaceGlobal( bool x )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace