Add tf.regex_match for regex match support (#19160)
authorYong Tang <yong.tang.github@outlook.com>
Tue, 15 May 2018 00:58:36 +0000 (17:58 -0700)
committerRasmus Munk Larsen <rmlarsen@google.com>
Tue, 15 May 2018 00:58:36 +0000 (17:58 -0700)
commitd8fac4cb80eb0c42d2550bcb720a80d29fc5f22d
tree1023b562e2a4a55405148b8543c2ca02aca6a098
parentb84bff476514c1a2ee80d9f1bc31a9cb5dcc2ee5
Add tf.regex_match for regex match support (#19160)

* Add tf.regex_match for regex match support

This fix tries to address the issue raised in 18264.
Currently tf.regex_replace has already been supported
though there was no regex match support.
This fix adds the tf.regex_match support in a similiar
pattern as tf.regex_replace.

This fix fixes 18264.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update BUILD file for the tf.regex_match kernel

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Register RegexMatch ops

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for tf.regex_match

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update api_defs

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update API golden

update with:
```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Expose regex_full_match in tf.strings namespace

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update golden API

```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
tensorflow/core/api_def/base_api/api_def_RegexFullMatch.pbtxt [new file with mode: 0644]
tensorflow/core/api_def/python_api/api_def_RegexFullMatch.pbtxt [new file with mode: 0644]
tensorflow/core/kernels/BUILD
tensorflow/core/kernels/regex_full_match_op.cc [new file with mode: 0644]
tensorflow/core/ops/string_ops.cc
tensorflow/python/kernel_tests/BUILD
tensorflow/python/kernel_tests/regex_full_match_op_test.py [new file with mode: 0644]
tensorflow/python/ops/string_ops.py
tensorflow/tools/api/generator/BUILD
tensorflow/tools/api/golden/tensorflow.pbtxt
tensorflow/tools/api/golden/tensorflow.strings.pbtxt [new file with mode: 0644]