tensorflow::ops::RegexReplace

#include <string_ops.h>

แทนที่รูป pattern ที่ตรงกับนิพจน์ปกติใน input ด้วยสตริงทดแทนที่ให้ไว้ใน rewrite

สรุป

โค้ดนี้ใช้ไวยากรณ์ของ re2 ( https://github.com/google/re2/wiki/Syntax )

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ข้อมูลนำเข้า: ข้อความที่จะนำมาประมวลผล
  • รูปแบบ: นิพจน์ปกติที่จะใช้ในการจับคู่สตริง input
  • เขียนใหม่: สตริงที่จะเขียนใหม่เพื่อใช้แทนที่นิพจน์ 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
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

หน้าที่สาธารณะ

แทนที่ด้วย Regex

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

แทนที่ด้วย Regex

 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() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

แทนที่ทั่วโลก

Attrs ReplaceGlobal(
  bool x
)