Skip to content

Add tensorflow_text package #1214

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 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ RUN pip install pysal \
pip install -f https://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o \
"tensorflow-gcs-config<=${TENSORFLOW_VERSION}" \
tensorflow-addons==0.17.1 \
tensorflow_decision_forests==0.2.7 && \
tensorflow_decision_forests==0.2.7 \
tensorflow_text==2.9.0 && \
/tmp/clean-layer.sh

RUN apt-get install -y libfreetype6-dev && \
Expand Down
12 changes: 12 additions & 0 deletions tests/test_tensorflow_text.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import unittest

import tensorflow_text as tf_text


class TestTensorflowText(unittest.TestCase):
def test_tokenizer(self):
word_tokenizer = tf_text.WhitespaceTokenizer()

tokens = word_tokenizer.tokenize("I love Kaggle!")

self.assertEqual((3,), tokens.shape)