Spec-Zone.ru › TensorFlow C++

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 в каждой входной строке); в противном случае подстановка 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
Operation
output
::tensorflow::Output
Открытые функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Открытые статические функции
ReplaceGlobal(bool x)
Attrs
Структуры
tensorflow::ops::RegexReplace::Attrs

Методы установки необязательных атрибутов для RegexReplace.

Открытые атрибуты

operation

Operation operation

output

::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
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API