Skip to content

Add conditional random fields #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 1, 2019
14 changes: 14 additions & 0 deletions tensorflow_addons/text/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ py_library(
name = "text",
srcs = ([
"__init__.py",
"crf.py",
"skip_gram_ops.py",
]),
data = [
Expand All @@ -15,6 +16,19 @@ py_library(
srcs_version = "PY2AND3",
)

py_test(
name = "crf_test",
size = "small",
srcs = [
"crf_test.py",
],
main = "crf_test.py",
srcs_version = "PY2AND3",
deps = [
":text",
],
)

py_test(
name = "skip_gram_ops_test",
size = "small",
Expand Down
1 change: 1 addition & 0 deletions tensorflow_addons/text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| Submodule | Maintainers | Contact Info |
|:---------- |:----------- |:------------- |
| skip_gram_ops | | |
| crf | Dheeraj R. Reddy | [email protected] |

## Components
| Submodule | Text Processing Function | Reference |
Expand Down
15 changes: 14 additions & 1 deletion tensorflow_addons/text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
from __future__ import division
from __future__ import print_function

# Conditional Random Field
from tensorflow_addons.text.crf import crf_binary_score
from tensorflow_addons.text.crf import crf_decode
from tensorflow_addons.text.crf import crf_decode_backward
from tensorflow_addons.text.crf import crf_decode_forward
from tensorflow_addons.text.crf import crf_forward
from tensorflow_addons.text.crf import crf_log_likelihood
from tensorflow_addons.text.crf import crf_log_norm
from tensorflow_addons.text.crf import crf_multitag_sequence_score
from tensorflow_addons.text.crf import crf_sequence_score
from tensorflow_addons.text.crf import crf_unary_score
from tensorflow_addons.text.crf import viterbi_decode

# Skip Gram Sampling
from tensorflow_addons.text.skip_gram_ops import skip_gram_sample
from tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab
from tensorflow_addons.text.skip_gram_ops import skip_gram_sample_with_text_vocab
Loading