diff options
author | 2018-09-06 11:03:14 -0700 | |
---|---|---|
committer | 2018-09-06 11:11:43 -0700 | |
commit | ca5952670d98b568fa4ac671cf2310d78474c525 (patch) | |
tree | 91da2f08c3755039ff0f4dff33c360e62ce80e00 /tensorflow/core/api_def | |
parent | 025277a1598fa227b53ddc4e316a7a953b2006c8 (diff) |
Add StaticRegexFullMatch which can be used in place of RegexFullMatch when the regex pattern are fixed.
This allows the Op to perform the expensive regex compilation once upon creation instead of with each call to compute.
RELNOTES: Performance improvements for regex full match operations.
PiperOrigin-RevId: 211835278
Diffstat (limited to 'tensorflow/core/api_def')
-rw-r--r-- | tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt b/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt new file mode 100644 index 0000000000..6d9d9908ca --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_StaticRegexFullMatch.pbtxt @@ -0,0 +1,29 @@ +op { + graph_op_name: "StaticRegexFullMatch" + in_arg { + name: "input" + description: <<END +A string tensor of the text to be processed. +END + } + out_arg { + name: "output" + description: <<END +A bool tensor with the same shape as `input`. +END + } + attr { + name: "pattern" + description: "The regular expression to match the input." + } + summary: "Check if the input matches the regex pattern." + description: <<END +The input is a string tensor of any shape. The pattern is the +regular expression to be matched with every element of the input tensor. +The boolean values (True or False) of the output tensor indicate +if the input matches the regex pattern provided. + +The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) +END + visibility: HIDDEN +} |