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
תפקידים ציבוריים
החלפת ביטוי רגילה
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 )
צוֹמֶת
::tensorflow::Node * node() const
אופרטור::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
החלף גלובלי
Attrs ReplaceGlobal( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).
[null,null,["עדכון אחרון: 2026-11-05 (שעון UTC)."],[],[]]