diff --git a/WORKSPACE b/WORKSPACE index 7bb229a12..eb6075f8e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -56,10 +56,9 @@ http_archive( http_archive( name = "org_tensorflow", - strip_prefix = "tensorflow-40998f44c0c500ce0f6e3b1658dfbc54f838a82a", - sha256 = "5a5bc4599964c71277dcac0d687435291e5810d2ac2f6283cc96736febf73aaf", + strip_prefix = "tensorflow-2.20.0", urls = [ - "https://github.com/tensorflow/tensorflow/archive/40998f44c0c500ce0f6e3b1658dfbc54f838a82a.zip" + "https://github.com/tensorflow/tensorflow/archive/v2.20.0.zip" ], ) @@ -83,6 +82,13 @@ http_archive( build_file = "//third_party/pybind11:BUILD.bzl", ) +http_archive( + name = "rules_shell", + sha256 = "bc61ef94facc78e20a645726f64756e5e285a045037c7a61f65af2941f4c25e1", + strip_prefix = "rules_shell-0.4.1", + url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz", +) + # Initialize hermetic Python load("@org_tensorflow//third_party/py:python_init_rules.bzl", "python_init_rules") diff --git a/oss_scripts/build_docs.py b/oss_scripts/build_docs.py index 48341e6de..a3fd97e69 100644 --- a/oss_scripts/build_docs.py +++ b/oss_scripts/build_docs.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/oss_scripts/configure.sh b/oss_scripts/configure.sh index a7f4e96a6..08d748662 100755 --- a/oss_scripts/configure.sh +++ b/oss_scripts/configure.sh @@ -41,7 +41,7 @@ else if [[ "$IS_NIGHTLY" == "nightly" ]]; then pip install tf-nightly else - pip install tensorflow==2.18.0 + pip install tensorflow==2.20.0 fi fi @@ -85,3 +85,5 @@ if is_macos; then fi write_action_env_to_bazelrc "TF_CXX11_ABI_FLAG" ${TF_ABIFLAG} +#write_to_bazelrc "build --define=TENSORFLOW_TEXT_BUILD_TFLITE_OPS=1" +#write_to_bazelrc "build --define=with_tflite_ops=true" diff --git a/oss_scripts/docker_builds.sh b/oss_scripts/docker_builds.sh index 50fe0db19..d40e59092 100755 --- a/oss_scripts/docker_builds.sh +++ b/oss_scripts/docker_builds.sh @@ -8,7 +8,7 @@ set -e -x # If a specific PYTHON_VERSION is specified, only build that one. # Otherwisebuild all supported versions. -python_versions=("3.9" "3.10" "3.11" "3.12") +python_versions=("3.10" "3.11" "3.12") if [[ ! -z ${PYTHON_VERSION+x} ]]; then python_versions=("$PYTHON_VERSION") fi diff --git a/oss_scripts/pip_package/BUILD b/oss_scripts/pip_package/BUILD index 351910725..ff9c51d42 100644 --- a/oss_scripts/pip_package/BUILD +++ b/oss_scripts/pip_package/BUILD @@ -21,7 +21,10 @@ compile_pip_requirements( py_binary( name = "tensorflow_build_info", srcs = ["tensorflow_build_info.py"], - deps = ["@release_or_nightly//:tensorflow_pkg"], + deps = [ + "@absl_py//absl:app", + "@release_or_nightly//:tensorflow_pkg", + ], ) sh_binary( diff --git a/oss_scripts/pip_package/requirements.in b/oss_scripts/pip_package/requirements.in index 9cc9f75d0..c376cc304 100644 --- a/oss_scripts/pip_package/requirements.in +++ b/oss_scripts/pip_package/requirements.in @@ -1,8 +1,6 @@ -setuptools==70.0.0 +setuptools==78.1.1 dm-tree==0.1.8 # Limit for macos support. numpy -protobuf==4.25.3 # b/397977335 - Fix crash on python 3.9, 3.10. tensorflow tf-keras -tensorflow-datasets -tensorflow-metadata +tensorflow-datasets \ No newline at end of file diff --git a/oss_scripts/pip_package/setup.nightly.py b/oss_scripts/pip_package/setup.nightly.py index 05c429edb..c5433e2df 100644 --- a/oss_scripts/pip_package/setup.nightly.py +++ b/oss_scripts/pip_package/setup.nightly.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ from setuptools.dist import Distribution project_name = 'tensorflow-text-nightly' -project_version = 'REPLACE_ME' +project_version = '2.20.0' class BinaryDistribution(Distribution): diff --git a/oss_scripts/pip_package/setup.py b/oss_scripts/pip_package/setup.py index 4986549c5..9c06a4090 100644 --- a/oss_scripts/pip_package/setup.py +++ b/oss_scripts/pip_package/setup.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ from setuptools.dist import Distribution project_name = 'tensorflow-text' -project_version = '2.18.0' +project_version = '2.20.0' class BinaryDistribution(Distribution): @@ -81,19 +81,19 @@ def finalize_options(self): author_email='packages@tensorflow.org', url='http://github.com/tensorflow/text', license='Apache 2.0', - packages=find_packages(), + packages=find_packages() + ['tensorflow_text.core.pybinds'], include_package_data=True, zip_safe=False, cmdclass={'install': InstallPlatlib}, distclass=BinaryDistribution, install_requires=[ ( - 'tensorflow>=2.18.0, <2.19', + 'tensorflow==2.20', ), ], extras_require={ 'tensorflow_cpu': [ - 'tensorflow-cpu>=2.18.0, <2.19', + 'tensorflow-cpu==2.20', ], 'tests': [ 'absl-py', diff --git a/oss_scripts/pip_package/tensorflow_build_info.py b/oss_scripts/pip_package/tensorflow_build_info.py index db5bf6c41..49b8e220d 100644 --- a/oss_scripts/pip_package/tensorflow_build_info.py +++ b/oss_scripts/pip_package/tensorflow_build_info.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/oss_scripts/prepare_tf_dep.sh b/oss_scripts/prepare_tf_dep.sh index 5210b358d..c93062a80 100755 --- a/oss_scripts/prepare_tf_dep.sh +++ b/oss_scripts/prepare_tf_dep.sh @@ -39,8 +39,8 @@ else fi # Update TF dependency to installed tensorflow. -echo "Updating WORKSPACE file to use TensorFlow commit $commit_slug" -sed -E -i $ext "s/strip_prefix = \"tensorflow-.+\",/strip_prefix = \"tensorflow-${commit_slug}\",/" WORKSPACE -sed -E -i $ext "s|\"https://github.com/tensorflow/tensorflow/archive/.+\.zip\"|\"https://github.com/tensorflow/tensorflow/archive/${commit_slug}.zip\"|" WORKSPACE -prev_shasum=$(grep -A 1 -e "strip_prefix.*tensorflow-" WORKSPACE | tail -1 | awk -F '"' '{print $2}') -sed -i $ext "s/sha256 = \"${prev_shasum}\",//" WORKSPACE +# echo "Updating WORKSPACE file to use TensorFlow commit $commit_slug" +# sed -E -i $ext "s/strip_prefix = \"tensorflow-.+\",/strip_prefix = \"tensorflow-${commit_slug}\",/" WORKSPACE +# sed -E -i $ext "s|\"https://github.com/tensorflow/tensorflow/archive/.+\.zip\"|\"https://github.com/tensorflow/tensorflow/archive/${commit_slug}.zip\"|" WORKSPACE +# prev_shasum=$(grep -A 1 -e "strip_prefix.*tensorflow-" WORKSPACE | tail -1 | awk -F '"' '{print $2}') +# sed -i $ext "s/sha256 = \"${prev_shasum}\",//" WORKSPACE diff --git a/oss_scripts/run_build.sh b/oss_scripts/run_build.sh index 029af0b16..b7557363e 100755 --- a/oss_scripts/run_build.sh +++ b/oss_scripts/run_build.sh @@ -19,7 +19,7 @@ if [[ $osname != "darwin" ]] || [[ ! $(sysctl -n machdep.cpu.brand_string) =~ "A fi # Build the pip package. -bazel run ${BUILD_ARGS[@]} --enable_runfiles //oss_scripts/pip_package:build_pip_package -- "$(realpath .)" +bazel run --jobs=6 ${BUILD_ARGS[@]} --enable_runfiles //oss_scripts/pip_package:build_pip_package -- "$(realpath .)" if [ -n "${AUDITWHEEL_PLATFORM}" ]; then echo $(date) : "=== Auditing wheel" diff --git a/tensorflow_text/BUILD b/tensorflow_text/BUILD index 9ded881dc..5713407d6 100644 --- a/tensorflow_text/BUILD +++ b/tensorflow_text/BUILD @@ -1,6 +1,7 @@ # Placeholder: load py_library # Placeholder: load py_test load("@org_tensorflow//tensorflow/lite:build_def.bzl", "tflite_cc_shared_object") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//tensorflow_text:tftext.bzl", "extra_py_deps", "py_tf_text_library") # [internal] load build_test.bzl @@ -73,6 +74,7 @@ py_library( "python/keras/layers/__init__.py", "python/metrics/__init__.py", "python/numpy/__init__.py", + "//tensorflow_text/core/pybinds:__init__.py", "python/ops/__init__.py", "tools/__init__.py", ], @@ -122,7 +124,7 @@ py_library( ":wordpiece_tokenizer", ":wordshape_ops", # python/util:all_util tensorflow dep, - "//tensorflow_text/core/pybinds:tflite_registrar", + "//tensorflow_text/core", "//tensorflow_text/tools/wordpiece_vocab", ] + extra_py_deps(), ) diff --git a/tensorflow_text/__init__.py b/tensorflow_text/__init__.py index 5b0777fc0..a6b4e8bb4 100644 --- a/tensorflow_text/__init__.py +++ b/tensorflow_text/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,4 +110,4 @@ ] remove_undocumented(__name__, _allowed_symbols) -__version__ = "2.13.0" +__version__ = "2.20.0" diff --git a/tensorflow_text/core/BUILD b/tensorflow_text/core/BUILD new file mode 100644 index 000000000..5753fac33 --- /dev/null +++ b/tensorflow_text/core/BUILD @@ -0,0 +1,15 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +py_library( + name = "core", + deps = [ + "//tensorflow_text/core/pybinds:pywrap_fast_bert_normalizer_model_builder", + "//tensorflow_text/core/pybinds:pywrap_fast_wordpiece_tokenizer_model_builder", + "//tensorflow_text/core/pybinds:pywrap_model_converter", + "//tensorflow_text/core/pybinds:pywrap_phrase_tokenizer_model_builder", + "//tensorflow_text/core/pybinds:pywrap_whitespace_tokenizer_config_builder", + "//tensorflow_text/core/pybinds:tflite_registrar", + ], +) \ No newline at end of file diff --git a/tensorflow_text/core/__init__.py b/tensorflow_text/core/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index eda400af7..26f829efc 100644 --- a/tensorflow_text/core/kernels/BUILD +++ b/tensorflow_text/core/kernels/BUILD @@ -1,6 +1,8 @@ """Kernels for tf.text ops.""" load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") +load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_cc//cc:cc_test.bzl", "cc_test") # Placeholder: load proto_library load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library") @@ -335,6 +337,7 @@ cc_library( deps = [ "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/strings", "@darts_clone", ], ) @@ -871,6 +874,10 @@ tf_cc_library( deps = [ "@com_google_absl//absl/strings", "@icu//:common", + "@com_google_absl//absl/status", + "@com_google_absl//absl/status:statusor", + "@com_google_absl//absl/base:core_headers", + "@icu//:nfkc", ], ) @@ -1016,6 +1023,7 @@ tf_cc_library( ], deps = [ "@com_google_absl//absl/base:core_headers", + "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@icu//:common", ], diff --git a/tensorflow_text/core/kernels/boise_offset_converter.cc b/tensorflow_text/core/kernels/boise_offset_converter.cc index bf263ac28..bc903425c 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter.cc +++ b/tensorflow_text/core/kernels/boise_offset_converter.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/boise_offset_converter.h b/tensorflow_text/core/kernels/boise_offset_converter.h index d86fa178d..035e7d317 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter.h +++ b/tensorflow_text/core/kernels/boise_offset_converter.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/boise_offset_converter_kernel.cc b/tensorflow_text/core/kernels/boise_offset_converter_kernel.cc index 9250ae176..862308ed0 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter_kernel.cc +++ b/tensorflow_text/core/kernels/boise_offset_converter_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/boise_offset_converter_kernel.h b/tensorflow_text/core/kernels/boise_offset_converter_kernel.h index 543d529d0..132b316af 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter_kernel.h +++ b/tensorflow_text/core/kernels/boise_offset_converter_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/boise_offset_converter_kernel_template.h b/tensorflow_text/core/kernels/boise_offset_converter_kernel_template.h index c524b0795..5926a23c4 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter_kernel_template.h +++ b/tensorflow_text/core/kernels/boise_offset_converter_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/boise_offset_converter_test.cc b/tensorflow_text/core/kernels/boise_offset_converter_test.cc index 8f9fd1a33..1637dfeec 100644 --- a/tensorflow_text/core/kernels/boise_offset_converter_test.cc +++ b/tensorflow_text/core/kernels/boise_offset_converter_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter.cc b/tensorflow_text/core/kernels/byte_splitter.cc index 70046526a..8d259a21f 100644 --- a/tensorflow_text/core/kernels/byte_splitter.cc +++ b/tensorflow_text/core/kernels/byte_splitter.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter.h b/tensorflow_text/core/kernels/byte_splitter.h index 3bfadb45d..beeb35882 100644 --- a/tensorflow_text/core/kernels/byte_splitter.h +++ b/tensorflow_text/core/kernels/byte_splitter.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_kernel.cc b/tensorflow_text/core/kernels/byte_splitter_kernel.cc index fc6bec19e..8e3dd9959 100644 --- a/tensorflow_text/core/kernels/byte_splitter_kernel.cc +++ b/tensorflow_text/core/kernels/byte_splitter_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_kernel.h b/tensorflow_text/core/kernels/byte_splitter_kernel.h index cde46ab3c..73c09bbf2 100644 --- a/tensorflow_text/core/kernels/byte_splitter_kernel.h +++ b/tensorflow_text/core/kernels/byte_splitter_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_kernel_template.h b/tensorflow_text/core/kernels/byte_splitter_kernel_template.h index 172666823..115ab0fd3 100644 --- a/tensorflow_text/core/kernels/byte_splitter_kernel_template.h +++ b/tensorflow_text/core/kernels/byte_splitter_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_test.cc b/tensorflow_text/core/kernels/byte_splitter_test.cc index 7c2e602dc..5b0fad078 100644 --- a/tensorflow_text/core/kernels/byte_splitter_test.cc +++ b/tensorflow_text/core/kernels/byte_splitter_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_tflite.cc b/tensorflow_text/core/kernels/byte_splitter_tflite.cc index 9284cd0ce..4713e1ae1 100644 --- a/tensorflow_text/core/kernels/byte_splitter_tflite.cc +++ b/tensorflow_text/core/kernels/byte_splitter_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/byte_splitter_tflite.h b/tensorflow_text/core/kernels/byte_splitter_tflite.h index 382e98d1d..3c089db44 100644 --- a/tensorflow_text/core/kernels/byte_splitter_tflite.h +++ b/tensorflow_text/core/kernels/byte_splitter_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/constrained_sequence.cc b/tensorflow_text/core/kernels/constrained_sequence.cc index 26515af8c..66c393833 100644 --- a/tensorflow_text/core/kernels/constrained_sequence.cc +++ b/tensorflow_text/core/kernels/constrained_sequence.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/constrained_sequence.h b/tensorflow_text/core/kernels/constrained_sequence.h index f70a53d8a..ac95d6ed0 100644 --- a/tensorflow_text/core/kernels/constrained_sequence.h +++ b/tensorflow_text/core/kernels/constrained_sequence.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/constrained_sequence_kernel.cc b/tensorflow_text/core/kernels/constrained_sequence_kernel.cc index c605b77a7..ceb02fa09 100644 --- a/tensorflow_text/core/kernels/constrained_sequence_kernel.cc +++ b/tensorflow_text/core/kernels/constrained_sequence_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/constrained_sequence_kernel_input_validation_test.cc b/tensorflow_text/core/kernels/constrained_sequence_kernel_input_validation_test.cc index 6bedfcd0d..150e7a8aa 100644 --- a/tensorflow_text/core/kernels/constrained_sequence_kernel_input_validation_test.cc +++ b/tensorflow_text/core/kernels/constrained_sequence_kernel_input_validation_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/darts_clone_trie_builder.cc b/tensorflow_text/core/kernels/darts_clone_trie_builder.cc index 0752882f4..4eb492b14 100644 --- a/tensorflow_text/core/kernels/darts_clone_trie_builder.cc +++ b/tensorflow_text/core/kernels/darts_clone_trie_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include #include "absl/container/flat_hash_set.h" +#include "absl/strings/str_cat.h" #include "include/darts.h" namespace tensorflow { diff --git a/tensorflow_text/core/kernels/darts_clone_trie_builder.h b/tensorflow_text/core/kernels/darts_clone_trie_builder.h index 2a54d155c..20e59af5b 100644 --- a/tensorflow_text/core/kernels/darts_clone_trie_builder.h +++ b/tensorflow_text/core/kernels/darts_clone_trie_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/darts_clone_trie_test.cc b/tensorflow_text/core/kernels/darts_clone_trie_test.cc index 282a276e5..dde43a811 100644 --- a/tensorflow_text/core/kernels/darts_clone_trie_test.cc +++ b/tensorflow_text/core/kernels/darts_clone_trie_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/darts_clone_trie_wrapper.h b/tensorflow_text/core/kernels/darts_clone_trie_wrapper.h index 2858ce116..134eb3059 100644 --- a/tensorflow_text/core/kernels/darts_clone_trie_wrapper.h +++ b/tensorflow_text/core/kernels/darts_clone_trie_wrapper.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/disjoint_set_forest.h b/tensorflow_text/core/kernels/disjoint_set_forest.h index 8d11489e0..bcaffdd58 100644 --- a/tensorflow_text/core/kernels/disjoint_set_forest.h +++ b/tensorflow_text/core/kernels/disjoint_set_forest.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/disjoint_set_forest_test.cc b/tensorflow_text/core/kernels/disjoint_set_forest_test.cc index 05463a729..6eb681c75 100644 --- a/tensorflow_text/core/kernels/disjoint_set_forest_test.cc +++ b/tensorflow_text/core/kernels/disjoint_set_forest_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/exp_greedy_constrained_sequence_kernel_test.cc b/tensorflow_text/core/kernels/exp_greedy_constrained_sequence_kernel_test.cc index 3366301cb..30db3668f 100644 --- a/tensorflow_text/core/kernels/exp_greedy_constrained_sequence_kernel_test.cc +++ b/tensorflow_text/core/kernels/exp_greedy_constrained_sequence_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/exp_viterbi_constrained_sequence_kernel_test.cc b/tensorflow_text/core/kernels/exp_viterbi_constrained_sequence_kernel_test.cc index e36f90ef7..d7f5da9cd 100644 --- a/tensorflow_text/core/kernels/exp_viterbi_constrained_sequence_kernel_test.cc +++ b/tensorflow_text/core/kernels/exp_viterbi_constrained_sequence_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer.h b/tensorflow_text/core/kernels/fast_bert_normalizer.h index 20fe31152..58d280489 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer.h +++ b/tensorflow_text/core/kernels/fast_bert_normalizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_kernel_template.h b/tensorflow_text/core/kernels/fast_bert_normalizer_kernel_template.h index b0126d497..b4bb7bbdc 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_kernel_template.h +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.cc b/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.cc index 4c10278e8..2d4568bac 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.cc +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.h b/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.h index 37b83bb80..61e38a94e 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.h +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_model_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_test.cc b/tensorflow_text/core/kernels/fast_bert_normalizer_test.cc index d4bf7e0e5..13da1f36c 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_test.cc +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.cc b/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.cc index d7e767f71..73fb9b6bd 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.cc +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.h b/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.h index c815ee3cb..70e075a85 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.h +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_tf_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.cc b/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.cc index 09ae72e4f..5903be4b7 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.cc +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.h b/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.h index 860cfc397..51ad0cb63 100644 --- a/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.h +++ b/tensorflow_text/core/kernels/fast_bert_normalizer_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.cc index c55aa9265..2c172d132 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.h index 908e18862..e832305a0 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.cc index 125b07f72..bb92e8a20 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.h index 54aa1cb82..c10b387a1 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel_template.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel_template.h index 96c25b93f..80b4ef560 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel_template.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.cc index 38585a790..a2bd43eb2 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.h index e238f8243..d71ac8b2a 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_model_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_test.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_test.cc index 66fee9f77..1e0e732f1 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_test.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.cc index a0c528413..cd9827237 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.h index 969be1247..5e04e7a29 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils.h b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils.h index db72917c1..129da2a16 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils.h +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils_test.cc b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils_test.cc index 97a56955b..aa32e8538 100644 --- a/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils_test.cc +++ b/tensorflow_text/core/kernels/fast_wordpiece_tokenizer_utils_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/log_greedy_constrained_sequence_kernel_test.cc b/tensorflow_text/core/kernels/log_greedy_constrained_sequence_kernel_test.cc index 73aa4c052..979947837 100644 --- a/tensorflow_text/core/kernels/log_greedy_constrained_sequence_kernel_test.cc +++ b/tensorflow_text/core/kernels/log_greedy_constrained_sequence_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/log_viterbi_constrained_sequence_kernel_test.cc b/tensorflow_text/core/kernels/log_viterbi_constrained_sequence_kernel_test.cc index 3ff84dca1..7a1da89ae 100644 --- a/tensorflow_text/core/kernels/log_viterbi_constrained_sequence_kernel_test.cc +++ b/tensorflow_text/core/kernels/log_viterbi_constrained_sequence_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/mst_op_kernels.cc b/tensorflow_text/core/kernels/mst_op_kernels.cc index 2d7f6f4da..f0c0629f6 100644 --- a/tensorflow_text/core/kernels/mst_op_kernels.cc +++ b/tensorflow_text/core/kernels/mst_op_kernels.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/mst_solver.h b/tensorflow_text/core/kernels/mst_solver.h index d17662607..4b5a1417b 100644 --- a/tensorflow_text/core/kernels/mst_solver.h +++ b/tensorflow_text/core/kernels/mst_solver.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/mst_solver_random_comparison_test.cc b/tensorflow_text/core/kernels/mst_solver_random_comparison_test.cc index c2319cc2b..4e4762808 100644 --- a/tensorflow_text/core/kernels/mst_solver_random_comparison_test.cc +++ b/tensorflow_text/core/kernels/mst_solver_random_comparison_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/mst_solver_test.cc b/tensorflow_text/core/kernels/mst_solver_test.cc index c4925dbbd..9f3db8f3f 100644 --- a/tensorflow_text/core/kernels/mst_solver_test.cc +++ b/tensorflow_text/core/kernels/mst_solver_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_kernel.cc b/tensorflow_text/core/kernels/ngrams_kernel.cc index c86da616c..3c85fb161 100644 --- a/tensorflow_text/core/kernels/ngrams_kernel.cc +++ b/tensorflow_text/core/kernels/ngrams_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_kernel.h b/tensorflow_text/core/kernels/ngrams_kernel.h index 75af65546..aa37305b7 100644 --- a/tensorflow_text/core/kernels/ngrams_kernel.h +++ b/tensorflow_text/core/kernels/ngrams_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_kernel_template.h b/tensorflow_text/core/kernels/ngrams_kernel_template.h index ec8d483e0..667a8f010 100644 --- a/tensorflow_text/core/kernels/ngrams_kernel_template.h +++ b/tensorflow_text/core/kernels/ngrams_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_kernel_test.cc b/tensorflow_text/core/kernels/ngrams_kernel_test.cc index baa862708..407a6f3d3 100644 --- a/tensorflow_text/core/kernels/ngrams_kernel_test.cc +++ b/tensorflow_text/core/kernels/ngrams_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_tflite.cc b/tensorflow_text/core/kernels/ngrams_tflite.cc index 9a3f93185..d7f4ba715 100644 --- a/tensorflow_text/core/kernels/ngrams_tflite.cc +++ b/tensorflow_text/core/kernels/ngrams_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_tflite.h b/tensorflow_text/core/kernels/ngrams_tflite.h index 4e7bff08a..24d979bf9 100644 --- a/tensorflow_text/core/kernels/ngrams_tflite.h +++ b/tensorflow_text/core/kernels/ngrams_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ngrams_tflite_test.cc b/tensorflow_text/core/kernels/ngrams_tflite_test.cc index aee6f4f7d..2ef442436 100644 --- a/tensorflow_text/core/kernels/ngrams_tflite_test.cc +++ b/tensorflow_text/core/kernels/ngrams_tflite_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/normalize_kernels.cc b/tensorflow_text/core/kernels/normalize_kernels.cc index f3104c576..b176fd0ac 100644 --- a/tensorflow_text/core/kernels/normalize_kernels.cc +++ b/tensorflow_text/core/kernels/normalize_kernels.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/normalize_kernels_test.cc b/tensorflow_text/core/kernels/normalize_kernels_test.cc index 78e133452..9858d69f5 100644 --- a/tensorflow_text/core/kernels/normalize_kernels_test.cc +++ b/tensorflow_text/core/kernels/normalize_kernels_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer.cc b/tensorflow_text/core/kernels/phrase_tokenizer.cc index 43bf094bc..980b92db1 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer.cc +++ b/tensorflow_text/core/kernels/phrase_tokenizer.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer.h b/tensorflow_text/core/kernels/phrase_tokenizer.h index 523db0990..c39585ab1 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer.h +++ b/tensorflow_text/core/kernels/phrase_tokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_kernel.cc b/tensorflow_text/core/kernels/phrase_tokenizer_kernel.cc index abbd52312..362278805 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/phrase_tokenizer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_kernel.h b/tensorflow_text/core/kernels/phrase_tokenizer_kernel.h index 7c4fad3c6..7734fc109 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_kernel.h +++ b/tensorflow_text/core/kernels/phrase_tokenizer_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_kernel_template.h b/tensorflow_text/core/kernels/phrase_tokenizer_kernel_template.h index ea2622a8e..13a901de5 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_kernel_template.h +++ b/tensorflow_text/core/kernels/phrase_tokenizer_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.cc b/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.cc index 9b4f8c5cd..8401ebad0 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.cc +++ b/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.h b/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.h index c34134fc1..aa86686b1 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.h +++ b/tensorflow_text/core/kernels/phrase_tokenizer_model_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/phrase_tokenizer_test.cc b/tensorflow_text/core/kernels/phrase_tokenizer_test.cc index db208476d..396952365 100644 --- a/tensorflow_text/core/kernels/phrase_tokenizer_test.cc +++ b/tensorflow_text/core/kernels/phrase_tokenizer_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.cc b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.cc index a2ac0157b..5eed0e706 100644 --- a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.cc +++ b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.h b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.h index 87abdce68..865991add 100644 --- a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.h +++ b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite_test.cc b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite_test.cc index f93d1efd2..13fbbf54e 100644 --- a/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite_test.cc +++ b/tensorflow_text/core/kernels/ragged_tensor_to_tensor_tflite_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/regex_split.cc b/tensorflow_text/core/kernels/regex_split.cc index 224ee2950..8879b6385 100644 --- a/tensorflow_text/core/kernels/regex_split.cc +++ b/tensorflow_text/core/kernels/regex_split.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/regex_split.h b/tensorflow_text/core/kernels/regex_split.h index 13e8906f4..1aa123235 100644 --- a/tensorflow_text/core/kernels/regex_split.h +++ b/tensorflow_text/core/kernels/regex_split.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/regex_split_kernels.cc b/tensorflow_text/core/kernels/regex_split_kernels.cc index ff6f30cf4..63fb76bd5 100644 --- a/tensorflow_text/core/kernels/regex_split_kernels.cc +++ b/tensorflow_text/core/kernels/regex_split_kernels.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/regex_split_test.cc b/tensorflow_text/core/kernels/regex_split_test.cc index cae853dbc..f4df5fa63 100644 --- a/tensorflow_text/core/kernels/regex_split_test.cc +++ b/tensorflow_text/core/kernels/regex_split_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/rouge_l_kernel.cc b/tensorflow_text/core/kernels/rouge_l_kernel.cc index 42eb7740c..688211d52 100644 --- a/tensorflow_text/core/kernels/rouge_l_kernel.cc +++ b/tensorflow_text/core/kernels/rouge_l_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/rouge_l_kernel_test.cc b/tensorflow_text/core/kernels/rouge_l_kernel_test.cc index a9a2b633d..6919d1562 100644 --- a/tensorflow_text/core/kernels/rouge_l_kernel_test.cc +++ b/tensorflow_text/core/kernels/rouge_l_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer.h b/tensorflow_text/core/kernels/round_robin_trimmer.h index 4ba10aaf1..5f4aa95b3 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer.h +++ b/tensorflow_text/core/kernels/round_robin_trimmer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_kernel.cc b/tensorflow_text/core/kernels/round_robin_trimmer_kernel.cc index e04c633b5..354c8e96d 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_kernel.cc +++ b/tensorflow_text/core/kernels/round_robin_trimmer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_kernel.h b/tensorflow_text/core/kernels/round_robin_trimmer_kernel.h index 33bda1967..818c0e3b3 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_kernel.h +++ b/tensorflow_text/core/kernels/round_robin_trimmer_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_kernel_template.h b/tensorflow_text/core/kernels/round_robin_trimmer_kernel_template.h index e4c9edeb3..b4b78a62c 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_kernel_template.h +++ b/tensorflow_text/core/kernels/round_robin_trimmer_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_test.cc b/tensorflow_text/core/kernels/round_robin_trimmer_test.cc index 22dba3636..96f7f3637 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_test.cc +++ b/tensorflow_text/core/kernels/round_robin_trimmer_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_tflite.cc b/tensorflow_text/core/kernels/round_robin_trimmer_tflite.cc index 673b1f716..f8902c94f 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_tflite.cc +++ b/tensorflow_text/core/kernels/round_robin_trimmer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/round_robin_trimmer_tflite.h b/tensorflow_text/core/kernels/round_robin_trimmer_tflite.h index 3c0e592b9..d95b43bf0 100644 --- a/tensorflow_text/core/kernels/round_robin_trimmer_tflite.h +++ b/tensorflow_text/core/kernels/round_robin_trimmer_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_breaking_kernels.cc b/tensorflow_text/core/kernels/sentence_breaking_kernels.cc index 4d231d0d1..b11395ffd 100644 --- a/tensorflow_text/core/kernels/sentence_breaking_kernels.cc +++ b/tensorflow_text/core/kernels/sentence_breaking_kernels.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_breaking_utils.cc b/tensorflow_text/core/kernels/sentence_breaking_utils.cc index 5567a30ad..ec0e35e28 100644 --- a/tensorflow_text/core/kernels/sentence_breaking_utils.cc +++ b/tensorflow_text/core/kernels/sentence_breaking_utils.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_breaking_utils.h b/tensorflow_text/core/kernels/sentence_breaking_utils.h index 07902f155..48d91fd4f 100644 --- a/tensorflow_text/core/kernels/sentence_breaking_utils.h +++ b/tensorflow_text/core/kernels/sentence_breaking_utils.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_breaking_utils_test.cc b/tensorflow_text/core/kernels/sentence_breaking_utils_test.cc index 3d9218316..95bcf8932 100644 --- a/tensorflow_text/core/kernels/sentence_breaking_utils_test.cc +++ b/tensorflow_text/core/kernels/sentence_breaking_utils_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter.cc b/tensorflow_text/core/kernels/sentence_fragmenter.cc index d56674e48..2e2a2586c 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter.cc +++ b/tensorflow_text/core/kernels/sentence_fragmenter.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter.h b/tensorflow_text/core/kernels/sentence_fragmenter.h index 14d7430cd..f595a79e1 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter.h +++ b/tensorflow_text/core/kernels/sentence_fragmenter.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2.cc b/tensorflow_text/core/kernels/sentence_fragmenter_v2.cc index db113e5b8..1c8d4ad91 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2.cc +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2.h b/tensorflow_text/core/kernels/sentence_fragmenter_v2.h index 47baac3a1..f27a69257 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2.h +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.cc b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.cc index 08a593c67..fdccbf3d9 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.cc +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.h b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.h index 35641115c..ee8cb1d39 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.h +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel_template.h b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel_template.h index 481f9e253..9c2070f68 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel_template.h +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_test.cc b/tensorflow_text/core/kernels/sentence_fragmenter_v2_test.cc index a72a3c471..9adfe528f 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_test.cc +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.cc b/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.cc index 552afe54e..82d40d31a 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.cc +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.h b/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.h index c66ea0980..7f603e21a 100644 --- a/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.h +++ b/tensorflow_text/core/kernels/sentence_fragmenter_v2_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/BUILD b/tensorflow_text/core/kernels/sentencepiece/BUILD index adb22214b..473dc1c6e 100644 --- a/tensorflow_text/core/kernels/sentencepiece/BUILD +++ b/tensorflow_text/core/kernels/sentencepiece/BUILD @@ -2,6 +2,8 @@ # load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") +load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_cc//cc:cc_test.bzl", "cc_test") load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library") licenses(["notice"]) diff --git a/tensorflow_text/core/kernels/sentencepiece/double_array_trie.h b/tensorflow_text/core/kernels/sentencepiece/double_array_trie.h index e3bc896a9..4daea5529 100644 --- a/tensorflow_text/core/kernels/sentencepiece/double_array_trie.h +++ b/tensorflow_text/core/kernels/sentencepiece/double_array_trie.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.cc b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.cc index 5c9f59294..e0288df10 100644 --- a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.cc +++ b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.h b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.h index ec6839e23..3dc8134c7 100644 --- a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.h +++ b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_test.cc b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_test.cc index 40956cdac..9a1210dcb 100644 --- a/tensorflow_text/core/kernels/sentencepiece/double_array_trie_test.cc +++ b/tensorflow_text/core/kernels/sentencepiece/double_array_trie_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/model_converter.cc b/tensorflow_text/core/kernels/sentencepiece/model_converter.cc index 0cbf715eb..6eb7b4b05 100644 --- a/tensorflow_text/core/kernels/sentencepiece/model_converter.cc +++ b/tensorflow_text/core/kernels/sentencepiece/model_converter.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/model_converter.h b/tensorflow_text/core/kernels/sentencepiece/model_converter.h index 11aea3faa..7d194b198 100644 --- a/tensorflow_text/core/kernels/sentencepiece/model_converter.h +++ b/tensorflow_text/core/kernels/sentencepiece/model_converter.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.cc index 4490ec770..fb7f1ae6f 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.h b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.h index 9183fae51..a9cb630ea 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.h +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc index cca14ef37..5593cbef0 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_decoder_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.cc index de0af6553..4733d6555 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h index db3888690..cb6a01a6a 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc index 36e01a725..d777928d5 100644 --- a/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc +++ b/tensorflow_text/core/kernels/sentencepiece/optimized_encoder_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.cc b/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.cc index f81dd23f8..6d264f8e9 100644 --- a/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.cc +++ b/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.h b/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.h index 07f89e043..b94d2524d 100644 --- a/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.h +++ b/tensorflow_text/core/kernels/sentencepiece/py_tflite_registerer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_constants.h b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_constants.h index d1bbb0abd..241d5b09c 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_constants.h +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_constants.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer.h b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer.h index 3c41f6b93..943683db0 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer.h +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc index d2304056c..07a7ef7b4 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_tflite.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_tflite.cc index a9ae34b65..61bf658b8 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_tflite.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_detokenizer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h index 51bd6aeca..40ab05114 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc index 4b7c2c502..ea4564928 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,16 +27,18 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +#include #include +#include #include -#include "tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h" -#include "tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h" #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/shape_inference.h" #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/platform/errors.h" +#include "tensorflow_text/core/kernels/sentencepiece/optimized_encoder.h" +#include "tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer.h" namespace tensorflow { namespace text{ @@ -50,7 +52,7 @@ class TFSentencepieceOp : public tensorflow::OpKernel { const auto& input_values_tensor = ctx->input(kInputIndex); const auto input_values_flat = input_values_tensor.flat(); - const int num_of_input_values = input_values_flat.size(); + const int64_t num_of_input_values = input_values_flat.size(); const auto& add_bos_tensor = ctx->input(kAddBOSInput); const bool add_bos = add_bos_tensor.scalar()(); @@ -74,20 +76,26 @@ class TFSentencepieceOp : public tensorflow::OpKernel { } tensorflow::Tensor* output_values_tensor = nullptr; tensorflow::Tensor* output_splits_tensor = nullptr; - + OP_REQUIRES(ctx, encoded.size() < std::numeric_limits::max(), + errors::InvalidArgument( + "Encoded input must contain less than 2^31 characters.")); + OP_REQUIRES( + ctx, splits.size() + 1 < std::numeric_limits::max(), + errors::InvalidArgument("Splits tensor is limited to 2^31-1 values.")); OP_REQUIRES_OK( - ctx, ctx->allocate_output(0, {(int16_t)encoded.size()}, + ctx, ctx->allocate_output(0, {static_cast(encoded.size())}, &output_values_tensor)); - OP_REQUIRES_OK(ctx, ctx->allocate_output(1, {(int16_t)splits.size() + 1}, - &output_splits_tensor)); + OP_REQUIRES_OK( + ctx, ctx->allocate_output(1, {static_cast(splits.size()) + 1}, + &output_splits_tensor)); auto values_tensor_flat = output_values_tensor->vec(); auto splits_tensor_flat = output_splits_tensor->vec(); - for (int i = 0; i < encoded.size(); ++i) { + for (int32_t i = 0; i < encoded.size(); ++i) { values_tensor_flat(i) = encoded[i]; } splits_tensor_flat(0) = 0; - for (int i = 0; i < splits.size(); ++i) { + for (int32_t i = 0; i < splits.size(); ++i) { splits_tensor_flat(i + 1) = splits[i]; } } diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_tflite.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_tflite.cc index 3c334f86b..434c98889 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_tflite.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece/utils.h b/tensorflow_text/core/kernels/sentencepiece/utils.h index 4a28ec469..61171a5dd 100644 --- a/tensorflow_text/core/kernels/sentencepiece/utils.h +++ b/tensorflow_text/core/kernels/sentencepiece/utils.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/sentencepiece_kernels.cc b/tensorflow_text/core/kernels/sentencepiece_kernels.cc index 7b5d2b5fe..4cc91495b 100644 --- a/tensorflow_text/core/kernels/sentencepiece_kernels.cc +++ b/tensorflow_text/core/kernels/sentencepiece_kernels.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" #include "absl/meta/type_traits.h" +#include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/synchronization/mutex.h" #include "absl/types/span.h" @@ -95,7 +96,7 @@ constexpr int64 kCostPerUnit = 10000; ::tensorflow::Status ToTFStatus(const sentencepiece::util::Status& s) { if (s.ok()) return ::tensorflow::Status(); - return ::tensorflow::Status(static_cast<::tensorflow::errors::Code>(s.code()), + return ::tensorflow::Status(static_cast<::absl::StatusCode>(s.code()), ::tensorflow::string(s.message())); } diff --git a/tensorflow_text/core/kernels/spanning_tree_iterator.cc b/tensorflow_text/core/kernels/spanning_tree_iterator.cc index 6f7191dfd..b27a1c228 100644 --- a/tensorflow_text/core/kernels/spanning_tree_iterator.cc +++ b/tensorflow_text/core/kernels/spanning_tree_iterator.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/spanning_tree_iterator.h b/tensorflow_text/core/kernels/spanning_tree_iterator.h index 2f48f746d..bff1e6f55 100644 --- a/tensorflow_text/core/kernels/spanning_tree_iterator.h +++ b/tensorflow_text/core/kernels/spanning_tree_iterator.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/spanning_tree_iterator_test.cc b/tensorflow_text/core/kernels/spanning_tree_iterator_test.cc index 0a7aff78f..fda6eda6b 100644 --- a/tensorflow_text/core/kernels/spanning_tree_iterator_test.cc +++ b/tensorflow_text/core/kernels/spanning_tree_iterator_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc b/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc index fefac977f..6a5372dd0 100644 --- a/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc +++ b/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #include #include +#include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "icu4c/source/common/unicode/uchar.h" #include "icu4c/source/common/unicode/umachine.h" @@ -72,13 +73,13 @@ Status TokenizeByLabel(const absl::string_view& text, std::vector* end_offset, int* num_tokens) { std::vector chars; if (!GetUTF8Chars(text, &chars)) { - return Status(static_cast( + return Status(static_cast<::absl::StatusCode>( absl::StatusCode::kInvalidArgument), absl::StrCat("Input string is not utf8 valid: ", text)); } if (chars.size() > labels_tensor.dim_size(0)) { - return Status(static_cast( + return Status(static_cast<::absl::StatusCode>( absl::StatusCode::kInvalidArgument), absl::StrCat("Number of labels ", labels_tensor.dim_size(0), " is insufficient for text ", text)); diff --git a/tensorflow_text/core/kernels/string_vocab.cc b/tensorflow_text/core/kernels/string_vocab.cc index 433bb719d..fadbe277d 100644 --- a/tensorflow_text/core/kernels/string_vocab.cc +++ b/tensorflow_text/core/kernels/string_vocab.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/string_vocab.h b/tensorflow_text/core/kernels/string_vocab.h index 0eff8f78b..5e698e063 100644 --- a/tensorflow_text/core/kernels/string_vocab.h +++ b/tensorflow_text/core/kernels/string_vocab.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/text_kernels_test_util.cc b/tensorflow_text/core/kernels/text_kernels_test_util.cc index ace5aa3e6..b854c617a 100644 --- a/tensorflow_text/core/kernels/text_kernels_test_util.cc +++ b/tensorflow_text/core/kernels/text_kernels_test_util.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/text_kernels_test_util.h b/tensorflow_text/core/kernels/text_kernels_test_util.h index efae756e0..d232cf1f2 100644 --- a/tensorflow_text/core/kernels/text_kernels_test_util.h +++ b/tensorflow_text/core/kernels/text_kernels_test_util.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/tokenizer_from_logits_kernel.cc b/tensorflow_text/core/kernels/tokenizer_from_logits_kernel.cc index 004dd9442..49b4ff840 100644 --- a/tensorflow_text/core/kernels/tokenizer_from_logits_kernel.cc +++ b/tensorflow_text/core/kernels/tokenizer_from_logits_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/trimmer.h b/tensorflow_text/core/kernels/trimmer.h index 7c5ec9d39..d74ae81c5 100644 --- a/tensorflow_text/core/kernels/trimmer.h +++ b/tensorflow_text/core/kernels/trimmer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/unicode_script_tokenize_kernel.cc b/tensorflow_text/core/kernels/unicode_script_tokenize_kernel.cc index 12eeb195c..67510c62e 100644 --- a/tensorflow_text/core/kernels/unicode_script_tokenize_kernel.cc +++ b/tensorflow_text/core/kernels/unicode_script_tokenize_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/unicode_script_tokenize_kernel_test.cc b/tensorflow_text/core/kernels/unicode_script_tokenize_kernel_test.cc index 36acbbfff..ce09af0b7 100644 --- a/tensorflow_text/core/kernels/unicode_script_tokenize_kernel_test.cc +++ b/tensorflow_text/core/kernels/unicode_script_tokenize_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize.cc b/tensorflow_text/core/kernels/utf8_binarize.cc index 49729a0a9..84f61e446 100644 --- a/tensorflow_text/core/kernels/utf8_binarize.cc +++ b/tensorflow_text/core/kernels/utf8_binarize.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize.h b/tensorflow_text/core/kernels/utf8_binarize.h index df90ba17f..ab2ed43ce 100644 --- a/tensorflow_text/core/kernels/utf8_binarize.h +++ b/tensorflow_text/core/kernels/utf8_binarize.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_kernel.cc b/tensorflow_text/core/kernels/utf8_binarize_kernel.cc index 4004f9278..8ad17b228 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_kernel.cc +++ b/tensorflow_text/core/kernels/utf8_binarize_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_kernel.h b/tensorflow_text/core/kernels/utf8_binarize_kernel.h index e1ce843dc..e82cd254a 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_kernel.h +++ b/tensorflow_text/core/kernels/utf8_binarize_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_kernel_template.h b/tensorflow_text/core/kernels/utf8_binarize_kernel_template.h index 38e344ead..2eb5ff2c0 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_kernel_template.h +++ b/tensorflow_text/core/kernels/utf8_binarize_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_test.cc b/tensorflow_text/core/kernels/utf8_binarize_test.cc index ac44b632b..398043aca 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_test.cc +++ b/tensorflow_text/core/kernels/utf8_binarize_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_tflite.cc b/tensorflow_text/core/kernels/utf8_binarize_tflite.cc index 310ba26b5..f25f5f24d 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_tflite.cc +++ b/tensorflow_text/core/kernels/utf8_binarize_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/utf8_binarize_tflite.h b/tensorflow_text/core/kernels/utf8_binarize_tflite.h index a5c7770e5..4bca487e1 100644 --- a/tensorflow_text/core/kernels/utf8_binarize_tflite.h +++ b/tensorflow_text/core/kernels/utf8_binarize_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenize_kernel.cc b/tensorflow_text/core/kernels/whitespace_tokenize_kernel.cc index cb9691293..d74f63a46 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenize_kernel.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenize_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenize_kernel_test.cc b/tensorflow_text/core/kernels/whitespace_tokenize_kernel_test.cc index 6fc0a7150..eaf3dc716 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenize_kernel_test.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenize_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer.cc b/tensorflow_text/core/kernels/whitespace_tokenizer.cc index 24961b1b6..778c0953e 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer.h b/tensorflow_text/core/kernels/whitespace_tokenizer.h index d249fda88..59a01f3fd 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer.h +++ b/tensorflow_text/core/kernels/whitespace_tokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index d9b8c1572..6e79c2573 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h index 7eacb5608..f409b9b20 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder_test.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder_test.cc index 20724e4f8..0e58073fd 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder_test.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.cc index 4ac07c73c..e30c80556 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.h b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.h index 23de3cd53..c7065488e 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.h +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel_template.h b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel_template.h index eecd83e5f..893594a02 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_kernel_template.h +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_kernel_template.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_test.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_test.cc index bafe9f5ca..cf21e1245 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_test.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.cc index 5c5c5f87e..c484fd18a 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.h b/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.h index e038180f7..75f38c2ce 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.h +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_tflite.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/wordpiece_kernel.cc b/tensorflow_text/core/kernels/wordpiece_kernel.cc index c8c1faa95..b86ad0f54 100644 --- a/tensorflow_text/core/kernels/wordpiece_kernel.cc +++ b/tensorflow_text/core/kernels/wordpiece_kernel.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/wordpiece_kernel_test.cc b/tensorflow_text/core/kernels/wordpiece_kernel_test.cc index 1f03718d6..2ab45d7f9 100644 --- a/tensorflow_text/core/kernels/wordpiece_kernel_test.cc +++ b/tensorflow_text/core/kernels/wordpiece_kernel_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/wordpiece_tokenizer.cc b/tensorflow_text/core/kernels/wordpiece_tokenizer.cc index d034398fe..b7ad106f1 100644 --- a/tensorflow_text/core/kernels/wordpiece_tokenizer.cc +++ b/tensorflow_text/core/kernels/wordpiece_tokenizer.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/kernels/wordpiece_tokenizer.h b/tensorflow_text/core/kernels/wordpiece_tokenizer.h index 4443a73b0..87869e92e 100644 --- a/tensorflow_text/core/kernels/wordpiece_tokenizer.h +++ b/tensorflow_text/core/kernels/wordpiece_tokenizer.h @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/BUILD b/tensorflow_text/core/ops/BUILD index 668ddd8b0..79b489fce 100644 --- a/tensorflow_text/core/ops/BUILD +++ b/tensorflow_text/core/ops/BUILD @@ -1,5 +1,7 @@ # Tests for op kernel shape functions +load("@rules_cc//cc:cc_test.bzl", "cc_test") + licenses(["notice"]) package(default_visibility = ["//visibility:private"]) diff --git a/tensorflow_text/core/ops/boise_offset_converter_op.cc b/tensorflow_text/core/ops/boise_offset_converter_op.cc index 59abbe9eb..109dce129 100644 --- a/tensorflow_text/core/ops/boise_offset_converter_op.cc +++ b/tensorflow_text/core/ops/boise_offset_converter_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/boise_offset_converter_op_test.cc b/tensorflow_text/core/ops/boise_offset_converter_op_test.cc index 9351ac3e8..b18058dd6 100644 --- a/tensorflow_text/core/ops/boise_offset_converter_op_test.cc +++ b/tensorflow_text/core/ops/boise_offset_converter_op_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/byte_splitter_op.cc b/tensorflow_text/core/ops/byte_splitter_op.cc index 769c905b4..9418bcdc5 100644 --- a/tensorflow_text/core/ops/byte_splitter_op.cc +++ b/tensorflow_text/core/ops/byte_splitter_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/byte_splitter_op_test.cc b/tensorflow_text/core/ops/byte_splitter_op_test.cc index a29b6cecd..8d179a58a 100644 --- a/tensorflow_text/core/ops/byte_splitter_op_test.cc +++ b/tensorflow_text/core/ops/byte_splitter_op_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/constrained_sequence_op.cc b/tensorflow_text/core/ops/constrained_sequence_op.cc index f123d0306..f1e41a9dc 100644 --- a/tensorflow_text/core/ops/constrained_sequence_op.cc +++ b/tensorflow_text/core/ops/constrained_sequence_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/fast_bert_normalizer_op.cc b/tensorflow_text/core/ops/fast_bert_normalizer_op.cc index 91a232bf4..2357afe2f 100644 --- a/tensorflow_text/core/ops/fast_bert_normalizer_op.cc +++ b/tensorflow_text/core/ops/fast_bert_normalizer_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/fast_sentencepiece_ops.cc b/tensorflow_text/core/ops/fast_sentencepiece_ops.cc index 6a339c65f..5bc8507cd 100644 --- a/tensorflow_text/core/ops/fast_sentencepiece_ops.cc +++ b/tensorflow_text/core/ops/fast_sentencepiece_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op.cc b/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op.cc index 8d6d035f4..4ea59f538 100644 --- a/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op.cc +++ b/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op_test.cc b/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op_test.cc index 574beccfa..1e5ce1529 100644 --- a/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op_test.cc +++ b/tensorflow_text/core/ops/fast_wordpiece_tokenizer_op_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/mst_ops.cc b/tensorflow_text/core/ops/mst_ops.cc index d484b11c9..b757c6f1b 100644 --- a/tensorflow_text/core/ops/mst_ops.cc +++ b/tensorflow_text/core/ops/mst_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/ngrams_op.cc b/tensorflow_text/core/ops/ngrams_op.cc index df037b818..81d88fa4a 100644 --- a/tensorflow_text/core/ops/ngrams_op.cc +++ b/tensorflow_text/core/ops/ngrams_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/normalize_ops.cc b/tensorflow_text/core/ops/normalize_ops.cc index 00d06f96a..b92436b39 100644 --- a/tensorflow_text/core/ops/normalize_ops.cc +++ b/tensorflow_text/core/ops/normalize_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/phrase_tokenizer_op.cc b/tensorflow_text/core/ops/phrase_tokenizer_op.cc index 9d50da746..6b43bd233 100644 --- a/tensorflow_text/core/ops/phrase_tokenizer_op.cc +++ b/tensorflow_text/core/ops/phrase_tokenizer_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/regex_split_ops.cc b/tensorflow_text/core/ops/regex_split_ops.cc index 6aa5f4fac..eea08804a 100644 --- a/tensorflow_text/core/ops/regex_split_ops.cc +++ b/tensorflow_text/core/ops/regex_split_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/rouge_l_op.cc b/tensorflow_text/core/ops/rouge_l_op.cc index 9896697ec..282e09347 100644 --- a/tensorflow_text/core/ops/rouge_l_op.cc +++ b/tensorflow_text/core/ops/rouge_l_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/sentence_breaking_ops.cc b/tensorflow_text/core/ops/sentence_breaking_ops.cc index f27fda413..c2dd11f8f 100644 --- a/tensorflow_text/core/ops/sentence_breaking_ops.cc +++ b/tensorflow_text/core/ops/sentence_breaking_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/sentence_fragmenter_v2_op.cc b/tensorflow_text/core/ops/sentence_fragmenter_v2_op.cc index b827ba338..299bab79c 100644 --- a/tensorflow_text/core/ops/sentence_fragmenter_v2_op.cc +++ b/tensorflow_text/core/ops/sentence_fragmenter_v2_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/sentence_fragmenter_v2_op_test.cc b/tensorflow_text/core/ops/sentence_fragmenter_v2_op_test.cc index 62f780cb1..b7f164374 100644 --- a/tensorflow_text/core/ops/sentence_fragmenter_v2_op_test.cc +++ b/tensorflow_text/core/ops/sentence_fragmenter_v2_op_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/sentencepiece_ops.cc b/tensorflow_text/core/ops/sentencepiece_ops.cc index 1a3a8886f..bbc2dd1a3 100644 --- a/tensorflow_text/core/ops/sentencepiece_ops.cc +++ b/tensorflow_text/core/ops/sentencepiece_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/split_merge_tokenize_op.cc b/tensorflow_text/core/ops/split_merge_tokenize_op.cc index ce147fd60..d3f9f68e3 100644 --- a/tensorflow_text/core/ops/split_merge_tokenize_op.cc +++ b/tensorflow_text/core/ops/split_merge_tokenize_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/tokenizer_from_logits_op.cc b/tensorflow_text/core/ops/tokenizer_from_logits_op.cc index 49e59b09b..6eb58fd34 100644 --- a/tensorflow_text/core/ops/tokenizer_from_logits_op.cc +++ b/tensorflow_text/core/ops/tokenizer_from_logits_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/trimmer_ops.cc b/tensorflow_text/core/ops/trimmer_ops.cc index 54a014ea9..667e83a68 100644 --- a/tensorflow_text/core/ops/trimmer_ops.cc +++ b/tensorflow_text/core/ops/trimmer_ops.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/trimmer_ops_test.cc b/tensorflow_text/core/ops/trimmer_ops_test.cc index ec89c3174..5400aa251 100644 --- a/tensorflow_text/core/ops/trimmer_ops_test.cc +++ b/tensorflow_text/core/ops/trimmer_ops_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/unicode_script_tokenize_op.cc b/tensorflow_text/core/ops/unicode_script_tokenize_op.cc index 2d0443234..88691fedc 100644 --- a/tensorflow_text/core/ops/unicode_script_tokenize_op.cc +++ b/tensorflow_text/core/ops/unicode_script_tokenize_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/utf8_binarize_op.cc b/tensorflow_text/core/ops/utf8_binarize_op.cc index daa473107..76ad9756a 100644 --- a/tensorflow_text/core/ops/utf8_binarize_op.cc +++ b/tensorflow_text/core/ops/utf8_binarize_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/utf8_binarize_op_test.cc b/tensorflow_text/core/ops/utf8_binarize_op_test.cc index 35a5df7a1..fbcbb4d0a 100644 --- a/tensorflow_text/core/ops/utf8_binarize_op_test.cc +++ b/tensorflow_text/core/ops/utf8_binarize_op_test.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/whitespace_tokenize_op.cc b/tensorflow_text/core/ops/whitespace_tokenize_op.cc index 218268012..7706480b7 100644 --- a/tensorflow_text/core/ops/whitespace_tokenize_op.cc +++ b/tensorflow_text/core/ops/whitespace_tokenize_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/whitespace_tokenizer_op.cc b/tensorflow_text/core/ops/whitespace_tokenizer_op.cc index fa0d6bfb7..4070a57c9 100644 --- a/tensorflow_text/core/ops/whitespace_tokenizer_op.cc +++ b/tensorflow_text/core/ops/whitespace_tokenizer_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/ops/wordpiece_op.cc b/tensorflow_text/core/ops/wordpiece_op.cc index 790a828fb..30c6e8828 100644 --- a/tensorflow_text/core/ops/wordpiece_op.cc +++ b/tensorflow_text/core/ops/wordpiece_op.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/pybinds/BUILD b/tensorflow_text/core/pybinds/BUILD index 68b03161b..083c6ea8f 100644 --- a/tensorflow_text/core/pybinds/BUILD +++ b/tensorflow_text/core/pybinds/BUILD @@ -1,195 +1,113 @@ -# Code that exposes C++ libraries to Python via pybind11. - -# Placeholder: load py_test -load("@org_tensorflow//tensorflow:tensorflow.bzl", "pybind_extension") +package(default_visibility = ["//visibility:public"]) licenses(["notice"]) -package(default_visibility = [ - "//nlp/sage/nlu/features/python:__pkg__", - "//nlp/semantic_parsing/learning/neural/portable/tools/release:__pkg__", - "//tensorflow_text:__subpackages__", -]) - -pybind_extension( - name = "tflite_registrar", - srcs = [ - "tflite_registrar.cc", - ], - additional_exported_symbols = [ - "AddByteSplit", - "AddByteSplitByOffsets", - "AddFastBertNormalize", - "AddFastSentencepieceDetokenize", - "AddFastSentencepieceTokenize", - "AddFastWordpieceTokenize", - "AddFastWordpieceDetokenize", - "AddNgramsStringJoin", - "AddRaggedTensorToTensor", - "AddRoundRobinGenerateMasks", - "AddRoundRobinTrim", - "AddSentenceFragmenterV2", - "AddUtf8Binarize", - "AddWhitespaceTokenize", - "SELECT_TFTEXT_OPS", - ], - enable_stub_generation = True, - module_name = "tflite_registrar", - pytype_srcs = [ - "tflite_registrar.pyi", - ], - deps = [ - "@pybind11", - # lite:framework tensorflow dep, - # lite/c:common tensorflow dep, - # lite/kernels:builtin_ops tensorflow dep, - "//tensorflow_text/core/kernels:tflite_ops", - ], -) +exports_files(["__init__.py"]) -pybind_extension( - name = "pywrap_fast_bert_normalizer_model_builder", +cc_binary( + name = "_pywrap_fast_bert_normalizer_model_builder.so", srcs = ["pywrap_fast_bert_normalizer_model_builder.cc"], - additional_exported_symbols = [ - "BuildFastBertNormalizerModel", - ], - copts = ["-fexceptions"], - enable_stub_generation = True, - features = ["-use_header_modules"], - module_name = "pywrap_fast_bert_normalizer_model_builder", - pytype_srcs = [ - "pywrap_fast_bert_normalizer_model_builder.pyi", - ], deps = [ "//tensorflow_text/core/kernels:fast_bert_normalizer_model_builder", - "@pybind11", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], ) -py_test( - name = "pywrap_fast_bert_normalizer_model_builder_test", - srcs = ["pywrap_fast_bert_normalizer_model_builder_test.py"], - data = [ - "//tensorflow_text:python/ops/test_data/fast_bert_normalizer_model.fb", - "//tensorflow_text:python/ops/test_data/fast_bert_normalizer_model_lower_case_nfd_strip_accents.fb", - ], - deps = [ - ":pywrap_fast_bert_normalizer_model_builder", - "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep - ], +py_library( + name = "pywrap_fast_bert_normalizer_model_builder", + srcs = [], + data = [":_pywrap_fast_bert_normalizer_model_builder.so"], + visibility = ["//visibility:public"], ) -pybind_extension( - name = "pywrap_fast_wordpiece_tokenizer_model_builder", +cc_binary( + name = "_pywrap_fast_wordpiece_tokenizer_model_builder.so", srcs = ["pywrap_fast_wordpiece_tokenizer_model_builder.cc"], - additional_exported_symbols = [ - "BuildFastWordpieceModel", - ], - copts = ["-fexceptions"], - data = [ - "pywrap_fast_wordpiece_tokenizer_model_builder.pyi", - ], - enable_stub_generation = True, - features = ["-use_header_modules"], - module_name = "pywrap_fast_wordpiece_tokenizer_model_builder", deps = [ "//tensorflow_text/core/kernels:fast_wordpiece_tokenizer_model_builder", - "@pybind11", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], ) -py_test( - name = "pywrap_fast_wordpiece_tokenizer_model_builder_test", - srcs = ["pywrap_fast_wordpiece_tokenizer_model_builder_test.py"], - data = [ - "//tensorflow_text:python/ops/test_data/fast_wordpiece_tokenizer_model.fb", - ], +py_library( + name = "pywrap_fast_wordpiece_tokenizer_model_builder", + srcs = [], + data = [":_pywrap_fast_wordpiece_tokenizer_model_builder.so"], + visibility = ["//visibility:public"], +) + +cc_binary( + name = "_pywrap_model_converter.so", + srcs = ["pywrap_model_converter.cc"], deps = [ - ":pywrap_fast_wordpiece_tokenizer_model_builder", - "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep + "//tensorflow_text/core/kernels/sentencepiece:model_converter", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], ) -pybind_extension( - name = "pywrap_phrase_tokenizer_model_builder", +py_library( + name = "pywrap_model_converter", + srcs = [], + data = [":_pywrap_model_converter.so"], + visibility = ["//visibility:public"], +) + +cc_binary( + name = "_pywrap_phrase_tokenizer_model_builder.so", srcs = ["pywrap_phrase_tokenizer_model_builder.cc"], - additional_exported_symbols = [ - "BuildPhraseModel", - ], - copts = ["-fexceptions"], - enable_stub_generation = True, - features = ["-use_header_modules"], - module_name = "pywrap_phrase_tokenizer_model_builder", - pytype_srcs = [ - "pywrap_phrase_tokenizer_model_builder.pyi", - ], - visibility = [ - "//knowledge/cerebra/nlu/models/smartv2/input:__pkg__", - "//tensorflow_text:__subpackages__", - ], deps = [ "//tensorflow_text/core/kernels:phrase_tokenizer_model_builder", - "@pybind11", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], ) -py_test( - name = "pywrap_phrase_tokenizer_model_builder_test", - srcs = ["pywrap_phrase_tokenizer_model_builder_test.py"], - data = [ - "//tensorflow_text:python/ops/test_data/phrase_tokenizer_model_test.fb", - ], - deps = [ - ":pywrap_phrase_tokenizer_model_builder", - "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep - ], +py_library( + name = "pywrap_phrase_tokenizer_model_builder", + srcs = [], + data = [":_pywrap_phrase_tokenizer_model_builder.so"], + visibility = ["//visibility:public"], ) -pybind_extension( - name = "pywrap_model_converter", - srcs = ["pywrap_model_converter.cc"], - additional_exported_symbols = [ - "ConvertSentencepieceModel", - "ConvertSentencepieceModelForDecoder", - "GetVocabularySize", - ], - copts = ["-fexceptions"], - enable_stub_generation = True, - features = ["-use_header_modules"], - module_name = "pywrap_model_converter", - pytype_srcs = [ - "pywrap_model_converter.pyi", - ], +cc_binary( + name = "_pywrap_whitespace_tokenizer_config_builder.so", + srcs = ["pywrap_whitespace_tokenizer_config_builder.cc"], deps = [ - "//tensorflow_text/core/kernels/sentencepiece:model_converter", - "@pybind11", + "//tensorflow_text/core/kernels:whitespace_tokenizer_config_builder", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], ) -pybind_extension( +py_library( name = "pywrap_whitespace_tokenizer_config_builder", - srcs = ["pywrap_whitespace_tokenizer_config_builder.cc"], - additional_exported_symbols = [ - "BuildWhitespaceTokenizerConfig", - ], - copts = ["-fexceptions"], - enable_stub_generation = True, - features = ["-use_header_modules"], - module_name = "pywrap_whitespace_tokenizer_config_builder", - pytype_srcs = [ - "pywrap_whitespace_tokenizer_config_builder.pyi", - ], - deps = [ - "//tensorflow_text/core/kernels:whitespace_tokenizer_config_builder", - "@pybind11", - ], + srcs = [], + data = [":_pywrap_whitespace_tokenizer_config_builder.so"], + visibility = ["//visibility:public"], ) -py_test( - name = "pywrap_whitespace_tokenizer_config_builder_test", - srcs = ["pywrap_whitespace_tokenizer_config_builder_test.py"], +cc_binary( + name = "_tflite_registrar.so", + srcs = ["tflite_registrar.cc"], deps = [ - ":pywrap_whitespace_tokenizer_config_builder", - "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep + "//tensorflow_text/core/kernels:tflite_ops", + "@pybind11//:pybind11", ], + linkshared = 1, + copts = ["-fPIC"], +) + +py_library( + name = "tflite_registrar", + srcs = [], + data = [":_tflite_registrar.so"], + visibility = ["//visibility:public"], ) diff --git a/tensorflow_text/core/pybinds/__init__.py b/tensorflow_text/core/pybinds/__init__.py new file mode 100644 index 000000000..8654a7e55 --- /dev/null +++ b/tensorflow_text/core/pybinds/__init__.py @@ -0,0 +1,9 @@ +# This file is automatically generated by Bazel. +# Do not modify this file directly. + +from . import _pywrap_fast_bert_normalizer_model_builder as fast_bert_normalizer_model_builder +from . import _pywrap_fast_wordpiece_tokenizer_model_builder as fast_wordpiece_tokenizer_model_builder +from . import _pywrap_model_converter as model_converter +from . import _pywrap_phrase_tokenizer_model_builder as phrase_tokenizer_model_builder +from . import _pywrap_whitespace_tokenizer_config_builder as whitespace_tokenizer_config_builder +from . import _tflite_registrar as tflite_registrar diff --git a/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc index acb1f53b9..a606ad187 100644 --- a/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ namespace text { namespace py = pybind11; -PYBIND11_MODULE(pywrap_fast_bert_normalizer_model_builder, m) { +PYBIND11_MODULE(_pywrap_fast_bert_normalizer_model_builder, m) { m.def("build_fast_bert_normalizer_model", [](bool lower_case_nfd_strip_accents) { const auto result = BuildFastBertNormalizerModelAndExportToFlatBuffer( diff --git a/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder_test.py b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder_test.py index 008337cfa..762b1c277 100644 --- a/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder_test.py +++ b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder.cc index 8e00aa2bc..e0f092c15 100644 --- a/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ namespace text { namespace py = pybind11; -PYBIND11_MODULE(pywrap_fast_wordpiece_tokenizer_model_builder, m) { +PYBIND11_MODULE(_pywrap_fast_wordpiece_tokenizer_model_builder, m) { m.def("build_fast_wordpiece_model", [](const std::vector& vocab, int max_bytes_per_token, const std::string& suffix_indicator, const std::string& unk_token, diff --git a/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder_test.py b/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder_test.py index 66771b94c..5a1ed39bb 100644 --- a/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder_test.py +++ b/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/pybinds/pywrap_model_converter.cc b/tensorflow_text/core/pybinds/pywrap_model_converter.cc index 4fa310a5b..5fcc3c8aa 100644 --- a/tensorflow_text/core/pybinds/pywrap_model_converter.cc +++ b/tensorflow_text/core/pybinds/pywrap_model_converter.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace sentencepiece { namespace py = pybind11; -PYBIND11_MODULE(pywrap_model_converter, m) { +PYBIND11_MODULE(_pywrap_model_converter, m) { m.def("convert_sentencepiece_model", [](py::bytes model_string) { return py::bytes(ConvertSentencepieceModel(std::string(model_string))); }); diff --git a/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc index 62a05451f..88198e362 100644 --- a/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ namespace text { namespace py = pybind11; -PYBIND11_MODULE(pywrap_phrase_tokenizer_model_builder, m) { +PYBIND11_MODULE(_pywrap_phrase_tokenizer_model_builder, m) { m.def("build_phrase_model", [](const std::vector& vocab, const std::string& unk_token, bool support_detokenization, int prob, bool split_end_punctuation) { diff --git a/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder_test.py b/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder_test.py index 9d46402fc..595ec32f6 100644 --- a/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder_test.py +++ b/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc index 1cc976835..c63aaadd8 100644 --- a/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ namespace text { namespace py = pybind11; -PYBIND11_MODULE(pywrap_whitespace_tokenizer_config_builder, m) { +PYBIND11_MODULE(_pywrap_whitespace_tokenizer_config_builder, m) { m.def("build_whitespace_tokenizer_config", []() { const auto result = BuildWhitespaceTokenizerConfig(); diff --git a/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder_test.py b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder_test.py index 14526d794..72cf73070 100644 --- a/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder_test.py +++ b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/core/pybinds/tflite_registrar.cc b/tensorflow_text/core/pybinds/tflite_registrar.cc index e5a0cd80f..89875247b 100644 --- a/tensorflow_text/core/pybinds/tflite_registrar.cc +++ b/tensorflow_text/core/pybinds/tflite_registrar.cc @@ -1,4 +1,4 @@ -// Copyright 2024 TF.Text Authors. +// Copyright 2025 TF.Text Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/__init__.py b/tensorflow_text/python/__init__.py index cd8f871cd..1929f5a4a 100644 --- a/tensorflow_text/python/__init__.py +++ b/tensorflow_text/python/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/benchmarks/__init__.py b/tensorflow_text/python/benchmarks/__init__.py index e0621626e..3d0d184eb 100644 --- a/tensorflow_text/python/benchmarks/__init__.py +++ b/tensorflow_text/python/benchmarks/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/benchmarks/benchmark_utils.py b/tensorflow_text/python/benchmarks/benchmark_utils.py index 2f8637ce2..ed9485743 100644 --- a/tensorflow_text/python/benchmarks/benchmark_utils.py +++ b/tensorflow_text/python/benchmarks/benchmark_utils.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/benchmarks/ops_benchmarks.py b/tensorflow_text/python/benchmarks/ops_benchmarks.py index a04fb782b..8a62eec34 100644 --- a/tensorflow_text/python/benchmarks/ops_benchmarks.py +++ b/tensorflow_text/python/benchmarks/ops_benchmarks.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/benchmarks/tokenizers_benchmarks.py b/tensorflow_text/python/benchmarks/tokenizers_benchmarks.py index 242fa31f2..d7205dbf0 100644 --- a/tensorflow_text/python/benchmarks/tokenizers_benchmarks.py +++ b/tensorflow_text/python/benchmarks/tokenizers_benchmarks.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/__init__.py b/tensorflow_text/python/keras/__init__.py index ce6a7d4f0..804fb842a 100644 --- a/tensorflow_text/python/keras/__init__.py +++ b/tensorflow_text/python/keras/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/layers/__init__.py b/tensorflow_text/python/keras/layers/__init__.py index 1efa02766..a1d70a803 100644 --- a/tensorflow_text/python/keras/layers/__init__.py +++ b/tensorflow_text/python/keras/layers/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/layers/todense.py b/tensorflow_text/python/keras/layers/todense.py index 1f6d462ec..5d1ead9bd 100644 --- a/tensorflow_text/python/keras/layers/todense.py +++ b/tensorflow_text/python/keras/layers/todense.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/layers/todense_test.py b/tensorflow_text/python/keras/layers/todense_test.py index 5622c5791..4e035d338 100644 --- a/tensorflow_text/python/keras/layers/todense_test.py +++ b/tensorflow_text/python/keras/layers/todense_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/layers/tokenization_layers.py b/tensorflow_text/python/keras/layers/tokenization_layers.py index 3a3de5204..c33611ecf 100644 --- a/tensorflow_text/python/keras/layers/tokenization_layers.py +++ b/tensorflow_text/python/keras/layers/tokenization_layers.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/keras/layers/tokenization_layers_test.py b/tensorflow_text/python/keras/layers/tokenization_layers_test.py index 8735ff601..c5b307356 100644 --- a/tensorflow_text/python/keras/layers/tokenization_layers_test.py +++ b/tensorflow_text/python/keras/layers/tokenization_layers_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/metrics/__init__.py b/tensorflow_text/python/metrics/__init__.py index 6a449fb76..b7d5c89af 100644 --- a/tensorflow_text/python/metrics/__init__.py +++ b/tensorflow_text/python/metrics/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/metrics/text_similarity_metric_ops.py b/tensorflow_text/python/metrics/text_similarity_metric_ops.py index a2167d858..fea38872a 100644 --- a/tensorflow_text/python/metrics/text_similarity_metric_ops.py +++ b/tensorflow_text/python/metrics/text_similarity_metric_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/metrics/text_similarity_metric_ops_test.py b/tensorflow_text/python/metrics/text_similarity_metric_ops_test.py index 865c08f97..b39427a52 100644 --- a/tensorflow_text/python/metrics/text_similarity_metric_ops_test.py +++ b/tensorflow_text/python/metrics/text_similarity_metric_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/numpy/__init__.py b/tensorflow_text/python/numpy/__init__.py index 6770bf5f8..1ad2ac140 100644 --- a/tensorflow_text/python/numpy/__init__.py +++ b/tensorflow_text/python/numpy/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/numpy/viterbi_decode.py b/tensorflow_text/python/numpy/viterbi_decode.py index bb479f8e6..ea329ccfb 100644 --- a/tensorflow_text/python/numpy/viterbi_decode.py +++ b/tensorflow_text/python/numpy/viterbi_decode.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/numpy/viterbi_decode_test.py b/tensorflow_text/python/numpy/viterbi_decode_test.py index 8bc8fa823..1863b4f79 100644 --- a/tensorflow_text/python/numpy/viterbi_decode_test.py +++ b/tensorflow_text/python/numpy/viterbi_decode_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/__init__.py b/tensorflow_text/python/ops/__init__.py index e2539f39c..921b65d4b 100644 --- a/tensorflow_text/python/ops/__init__.py +++ b/tensorflow_text/python/ops/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/bert_tokenizer.py b/tensorflow_text/python/ops/bert_tokenizer.py index 2dba91852..727ea0266 100644 --- a/tensorflow_text/python/ops/bert_tokenizer.py +++ b/tensorflow_text/python/ops/bert_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/bert_tokenizer_test.py b/tensorflow_text/python/ops/bert_tokenizer_test.py index 48a52662e..5b9f11273 100644 --- a/tensorflow_text/python/ops/bert_tokenizer_test.py +++ b/tensorflow_text/python/ops/bert_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/boise_offset_converter.py b/tensorflow_text/python/ops/boise_offset_converter.py index b14919c29..9a05802e1 100644 --- a/tensorflow_text/python/ops/boise_offset_converter.py +++ b/tensorflow_text/python/ops/boise_offset_converter.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/boise_offset_converter_test.py b/tensorflow_text/python/ops/boise_offset_converter_test.py index dc88aeecd..ef9798993 100644 --- a/tensorflow_text/python/ops/boise_offset_converter_test.py +++ b/tensorflow_text/python/ops/boise_offset_converter_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/byte_splitter.py b/tensorflow_text/python/ops/byte_splitter.py index 0ec868e31..2aa652c74 100644 --- a/tensorflow_text/python/ops/byte_splitter.py +++ b/tensorflow_text/python/ops/byte_splitter.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/byte_splitter_test.py b/tensorflow_text/python/ops/byte_splitter_test.py index a4a2e9e89..39bbc27a5 100644 --- a/tensorflow_text/python/ops/byte_splitter_test.py +++ b/tensorflow_text/python/ops/byte_splitter_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/coerce_to_valid_utf8_op_test.py b/tensorflow_text/python/ops/coerce_to_valid_utf8_op_test.py index db65cc71a..47e3336cc 100644 --- a/tensorflow_text/python/ops/coerce_to_valid_utf8_op_test.py +++ b/tensorflow_text/python/ops/coerce_to_valid_utf8_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/create_feature_bitmask_op.py b/tensorflow_text/python/ops/create_feature_bitmask_op.py index ed79c93f8..ba936e7ae 100644 --- a/tensorflow_text/python/ops/create_feature_bitmask_op.py +++ b/tensorflow_text/python/ops/create_feature_bitmask_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/create_feature_bitmask_op_test.py b/tensorflow_text/python/ops/create_feature_bitmask_op_test.py index a4edcae3e..e075fdecf 100644 --- a/tensorflow_text/python/ops/create_feature_bitmask_op_test.py +++ b/tensorflow_text/python/ops/create_feature_bitmask_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_bert_normalizer.py b/tensorflow_text/python/ops/fast_bert_normalizer.py index 3e3bce390..d52570f4b 100644 --- a/tensorflow_text/python/ops/fast_bert_normalizer.py +++ b/tensorflow_text/python/ops/fast_bert_normalizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_bert_normalizer_test.py b/tensorflow_text/python/ops/fast_bert_normalizer_test.py index 0b88308c1..f4e73691f 100644 --- a/tensorflow_text/python/ops/fast_bert_normalizer_test.py +++ b/tensorflow_text/python/ops/fast_bert_normalizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_bert_tokenizer.py b/tensorflow_text/python/ops/fast_bert_tokenizer.py index 4961b3187..6893db3dc 100644 --- a/tensorflow_text/python/ops/fast_bert_tokenizer.py +++ b/tensorflow_text/python/ops/fast_bert_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_bert_tokenizer_test.py b/tensorflow_text/python/ops/fast_bert_tokenizer_test.py index a3efeafa8..2edd25918 100644 --- a/tensorflow_text/python/ops/fast_bert_tokenizer_test.py +++ b/tensorflow_text/python/ops/fast_bert_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_sentencepiece_tokenizer.py b/tensorflow_text/python/ops/fast_sentencepiece_tokenizer.py index e764899a4..33295b8cb 100644 --- a/tensorflow_text/python/ops/fast_sentencepiece_tokenizer.py +++ b/tensorflow_text/python/ops/fast_sentencepiece_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_sentencepiece_tokenizer_test.py b/tensorflow_text/python/ops/fast_sentencepiece_tokenizer_test.py index bf5b3e932..11282b848 100644 --- a/tensorflow_text/python/ops/fast_sentencepiece_tokenizer_test.py +++ b/tensorflow_text/python/ops/fast_sentencepiece_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_wordpiece_tokenizer.py b/tensorflow_text/python/ops/fast_wordpiece_tokenizer.py index 44449e865..21f3d5cb2 100644 --- a/tensorflow_text/python/ops/fast_wordpiece_tokenizer.py +++ b/tensorflow_text/python/ops/fast_wordpiece_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/fast_wordpiece_tokenizer_test.py b/tensorflow_text/python/ops/fast_wordpiece_tokenizer_test.py index 3d1fd8b53..2e841f9f6 100644 --- a/tensorflow_text/python/ops/fast_wordpiece_tokenizer_test.py +++ b/tensorflow_text/python/ops/fast_wordpiece_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/gather_with_default_op_test.py b/tensorflow_text/python/ops/gather_with_default_op_test.py index ae15a4112..5d2c00c52 100644 --- a/tensorflow_text/python/ops/gather_with_default_op_test.py +++ b/tensorflow_text/python/ops/gather_with_default_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/greedy_constrained_sequence_op.py b/tensorflow_text/python/ops/greedy_constrained_sequence_op.py index c657cc45a..a8c238629 100644 --- a/tensorflow_text/python/ops/greedy_constrained_sequence_op.py +++ b/tensorflow_text/python/ops/greedy_constrained_sequence_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/greedy_constrained_sequence_op_test.py b/tensorflow_text/python/ops/greedy_constrained_sequence_op_test.py index 29978c605..f75e98175 100644 --- a/tensorflow_text/python/ops/greedy_constrained_sequence_op_test.py +++ b/tensorflow_text/python/ops/greedy_constrained_sequence_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/hub_module_splitter.py b/tensorflow_text/python/ops/hub_module_splitter.py index f9e46b068..f60a84c0b 100644 --- a/tensorflow_text/python/ops/hub_module_splitter.py +++ b/tensorflow_text/python/ops/hub_module_splitter.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/hub_module_splitter_test.py b/tensorflow_text/python/ops/hub_module_splitter_test.py index 0f79ddc2f..92cac1888 100644 --- a/tensorflow_text/python/ops/hub_module_splitter_test.py +++ b/tensorflow_text/python/ops/hub_module_splitter_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/hub_module_tokenizer.py b/tensorflow_text/python/ops/hub_module_tokenizer.py index f8c46b5bd..a02cdc813 100644 --- a/tensorflow_text/python/ops/hub_module_tokenizer.py +++ b/tensorflow_text/python/ops/hub_module_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/hub_module_tokenizer_test.py b/tensorflow_text/python/ops/hub_module_tokenizer_test.py index a02813d5a..e8fe981c9 100644 --- a/tensorflow_text/python/ops/hub_module_tokenizer_test.py +++ b/tensorflow_text/python/ops/hub_module_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/item_selector_ops.py b/tensorflow_text/python/ops/item_selector_ops.py index c68db3600..16da7df3e 100644 --- a/tensorflow_text/python/ops/item_selector_ops.py +++ b/tensorflow_text/python/ops/item_selector_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/item_selector_ops_test.py b/tensorflow_text/python/ops/item_selector_ops_test.py index 084324c2f..f3837ab8b 100644 --- a/tensorflow_text/python/ops/item_selector_ops_test.py +++ b/tensorflow_text/python/ops/item_selector_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/masking_ops.py b/tensorflow_text/python/ops/masking_ops.py index 2be52b7b4..a27163c76 100644 --- a/tensorflow_text/python/ops/masking_ops.py +++ b/tensorflow_text/python/ops/masking_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/masking_ops_test.py b/tensorflow_text/python/ops/masking_ops_test.py index f4df3a980..1b9745675 100644 --- a/tensorflow_text/python/ops/masking_ops_test.py +++ b/tensorflow_text/python/ops/masking_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/mst_ops.py b/tensorflow_text/python/ops/mst_ops.py index 6308d3cbd..2fa1fc7bb 100644 --- a/tensorflow_text/python/ops/mst_ops.py +++ b/tensorflow_text/python/ops/mst_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/mst_ops_test.py b/tensorflow_text/python/ops/mst_ops_test.py index c8ddb3134..d44bd43c2 100644 --- a/tensorflow_text/python/ops/mst_ops_test.py +++ b/tensorflow_text/python/ops/mst_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/ngrams_op.py b/tensorflow_text/python/ops/ngrams_op.py index 8a7994a86..1eec24170 100644 --- a/tensorflow_text/python/ops/ngrams_op.py +++ b/tensorflow_text/python/ops/ngrams_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/ngrams_op_test.py b/tensorflow_text/python/ops/ngrams_op_test.py index 2cba3ad55..4ade10777 100644 --- a/tensorflow_text/python/ops/ngrams_op_test.py +++ b/tensorflow_text/python/ops/ngrams_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/normalize_ops.py b/tensorflow_text/python/ops/normalize_ops.py index 6549416fe..6df86650d 100644 --- a/tensorflow_text/python/ops/normalize_ops.py +++ b/tensorflow_text/python/ops/normalize_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/normalize_ops_test.py b/tensorflow_text/python/ops/normalize_ops_test.py index 65670dd5d..31e4e14b1 100644 --- a/tensorflow_text/python/ops/normalize_ops_test.py +++ b/tensorflow_text/python/ops/normalize_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/pad_along_dimension_op.py b/tensorflow_text/python/ops/pad_along_dimension_op.py index 455dbcd70..edf55cc4e 100644 --- a/tensorflow_text/python/ops/pad_along_dimension_op.py +++ b/tensorflow_text/python/ops/pad_along_dimension_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/pad_along_dimension_op_test.py b/tensorflow_text/python/ops/pad_along_dimension_op_test.py index d09156447..56c359f2e 100644 --- a/tensorflow_text/python/ops/pad_along_dimension_op_test.py +++ b/tensorflow_text/python/ops/pad_along_dimension_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/pad_model_inputs_ops.py b/tensorflow_text/python/ops/pad_model_inputs_ops.py index 4eb53b3d4..9bb75e6bb 100644 --- a/tensorflow_text/python/ops/pad_model_inputs_ops.py +++ b/tensorflow_text/python/ops/pad_model_inputs_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/pad_model_inputs_ops_test.py b/tensorflow_text/python/ops/pad_model_inputs_ops_test.py index 1f1b533e3..547005962 100644 --- a/tensorflow_text/python/ops/pad_model_inputs_ops_test.py +++ b/tensorflow_text/python/ops/pad_model_inputs_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/phrase_tokenizer.py b/tensorflow_text/python/ops/phrase_tokenizer.py index 7ed3c801c..62119bce9 100644 --- a/tensorflow_text/python/ops/phrase_tokenizer.py +++ b/tensorflow_text/python/ops/phrase_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/phrase_tokenizer_test.py b/tensorflow_text/python/ops/phrase_tokenizer_test.py index 45008233a..617109f92 100644 --- a/tensorflow_text/python/ops/phrase_tokenizer_test.py +++ b/tensorflow_text/python/ops/phrase_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/pointer_ops.py b/tensorflow_text/python/ops/pointer_ops.py index f235192d9..88764dda2 100644 --- a/tensorflow_text/python/ops/pointer_ops.py +++ b/tensorflow_text/python/ops/pointer_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/regex_split_ops.py b/tensorflow_text/python/ops/regex_split_ops.py index 51cbcece0..1117add92 100644 --- a/tensorflow_text/python/ops/regex_split_ops.py +++ b/tensorflow_text/python/ops/regex_split_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/regex_split_ops_test.py b/tensorflow_text/python/ops/regex_split_ops_test.py index 820d05007..2c5988e70 100644 --- a/tensorflow_text/python/ops/regex_split_ops_test.py +++ b/tensorflow_text/python/ops/regex_split_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/segment_combiner_ops.py b/tensorflow_text/python/ops/segment_combiner_ops.py index cffb400cf..72975b48e 100644 --- a/tensorflow_text/python/ops/segment_combiner_ops.py +++ b/tensorflow_text/python/ops/segment_combiner_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/segment_combiner_ops_test.py b/tensorflow_text/python/ops/segment_combiner_ops_test.py index 4bbe97256..242faf020 100644 --- a/tensorflow_text/python/ops/segment_combiner_ops_test.py +++ b/tensorflow_text/python/ops/segment_combiner_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sentence_breaking_ops.py b/tensorflow_text/python/ops/sentence_breaking_ops.py index 0f8bacfc4..e8159cf35 100644 --- a/tensorflow_text/python/ops/sentence_breaking_ops.py +++ b/tensorflow_text/python/ops/sentence_breaking_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sentence_breaking_ops_test.py b/tensorflow_text/python/ops/sentence_breaking_ops_test.py index 8f2df330e..b02872e30 100644 --- a/tensorflow_text/python/ops/sentence_breaking_ops_test.py +++ b/tensorflow_text/python/ops/sentence_breaking_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sentencepiece_tokenizer.py b/tensorflow_text/python/ops/sentencepiece_tokenizer.py index 8c81f64a6..ea59fabe2 100644 --- a/tensorflow_text/python/ops/sentencepiece_tokenizer.py +++ b/tensorflow_text/python/ops/sentencepiece_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sentencepiece_tokenizer_test.py b/tensorflow_text/python/ops/sentencepiece_tokenizer_test.py index e72dbb4f4..52b356384 100644 --- a/tensorflow_text/python/ops/sentencepiece_tokenizer_test.py +++ b/tensorflow_text/python/ops/sentencepiece_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sliding_window_op.py b/tensorflow_text/python/ops/sliding_window_op.py index efdaefaf6..547635e31 100644 --- a/tensorflow_text/python/ops/sliding_window_op.py +++ b/tensorflow_text/python/ops/sliding_window_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/sliding_window_op_test.py b/tensorflow_text/python/ops/sliding_window_op_test.py index fc6e7da47..3eea10317 100644 --- a/tensorflow_text/python/ops/sliding_window_op_test.py +++ b/tensorflow_text/python/ops/sliding_window_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/span_alignment_op_test.py b/tensorflow_text/python/ops/span_alignment_op_test.py index 25ac0cf89..9375c4aa0 100644 --- a/tensorflow_text/python/ops/span_alignment_op_test.py +++ b/tensorflow_text/python/ops/span_alignment_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/span_overlaps_op_test.py b/tensorflow_text/python/ops/span_overlaps_op_test.py index ab7d6d01d..e2f0a1893 100644 --- a/tensorflow_text/python/ops/span_overlaps_op_test.py +++ b/tensorflow_text/python/ops/span_overlaps_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/split_merge_from_logits_tokenizer.py b/tensorflow_text/python/ops/split_merge_from_logits_tokenizer.py index f6248b2ca..d54fe512e 100644 --- a/tensorflow_text/python/ops/split_merge_from_logits_tokenizer.py +++ b/tensorflow_text/python/ops/split_merge_from_logits_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/split_merge_from_logits_tokenizer_test.py b/tensorflow_text/python/ops/split_merge_from_logits_tokenizer_test.py index 5fe414cbf..d2f16b49b 100644 --- a/tensorflow_text/python/ops/split_merge_from_logits_tokenizer_test.py +++ b/tensorflow_text/python/ops/split_merge_from_logits_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/split_merge_tokenizer.py b/tensorflow_text/python/ops/split_merge_tokenizer.py index 43d3a8b5c..2d35a8a9c 100644 --- a/tensorflow_text/python/ops/split_merge_tokenizer.py +++ b/tensorflow_text/python/ops/split_merge_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/split_merge_tokenizer_test.py b/tensorflow_text/python/ops/split_merge_tokenizer_test.py index 84e61bb36..8261c54f1 100644 --- a/tensorflow_text/python/ops/split_merge_tokenizer_test.py +++ b/tensorflow_text/python/ops/split_merge_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/splitter.py b/tensorflow_text/python/ops/splitter.py index 26537d315..d98facee3 100644 --- a/tensorflow_text/python/ops/splitter.py +++ b/tensorflow_text/python/ops/splitter.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/state_based_sentence_breaker_op.py b/tensorflow_text/python/ops/state_based_sentence_breaker_op.py index 469e8c6ea..785670419 100644 --- a/tensorflow_text/python/ops/state_based_sentence_breaker_op.py +++ b/tensorflow_text/python/ops/state_based_sentence_breaker_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/state_based_sentence_breaker_op_test.py b/tensorflow_text/python/ops/state_based_sentence_breaker_op_test.py index 50a0c229f..2a1863455 100644 --- a/tensorflow_text/python/ops/state_based_sentence_breaker_op_test.py +++ b/tensorflow_text/python/ops/state_based_sentence_breaker_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/string_ops.py b/tensorflow_text/python/ops/string_ops.py index d55e4b052..5c3ad8331 100644 --- a/tensorflow_text/python/ops/string_ops.py +++ b/tensorflow_text/python/ops/string_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/tokenization.py b/tensorflow_text/python/ops/tokenization.py index 8335bbc2c..407610f72 100644 --- a/tensorflow_text/python/ops/tokenization.py +++ b/tensorflow_text/python/ops/tokenization.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/trimmer_ops.py b/tensorflow_text/python/ops/trimmer_ops.py index 0dd7d863f..e7559557b 100644 --- a/tensorflow_text/python/ops/trimmer_ops.py +++ b/tensorflow_text/python/ops/trimmer_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/trimmer_ops_test.py b/tensorflow_text/python/ops/trimmer_ops_test.py index e6cfaf5e4..4fd2eba77 100644 --- a/tensorflow_text/python/ops/trimmer_ops_test.py +++ b/tensorflow_text/python/ops/trimmer_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/unicode_char_tokenizer.py b/tensorflow_text/python/ops/unicode_char_tokenizer.py index c0eef3334..8ea9e9924 100644 --- a/tensorflow_text/python/ops/unicode_char_tokenizer.py +++ b/tensorflow_text/python/ops/unicode_char_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/unicode_char_tokenizer_test.py b/tensorflow_text/python/ops/unicode_char_tokenizer_test.py index b21c95d81..6ab46dd58 100644 --- a/tensorflow_text/python/ops/unicode_char_tokenizer_test.py +++ b/tensorflow_text/python/ops/unicode_char_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/unicode_script_tokenizer.py b/tensorflow_text/python/ops/unicode_script_tokenizer.py index 7e952f38c..99dd2cbfb 100644 --- a/tensorflow_text/python/ops/unicode_script_tokenizer.py +++ b/tensorflow_text/python/ops/unicode_script_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/unicode_script_tokenizer_test.py b/tensorflow_text/python/ops/unicode_script_tokenizer_test.py index 15b59fa60..e4365594f 100644 --- a/tensorflow_text/python/ops/unicode_script_tokenizer_test.py +++ b/tensorflow_text/python/ops/unicode_script_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/utf8_binarize_op.py b/tensorflow_text/python/ops/utf8_binarize_op.py index 7a7b02903..dd285ae6c 100644 --- a/tensorflow_text/python/ops/utf8_binarize_op.py +++ b/tensorflow_text/python/ops/utf8_binarize_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/utf8_binarize_op_test.py b/tensorflow_text/python/ops/utf8_binarize_op_test.py index dd6f48f67..203e41418 100644 --- a/tensorflow_text/python/ops/utf8_binarize_op_test.py +++ b/tensorflow_text/python/ops/utf8_binarize_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/viterbi_constrained_sequence_op.py b/tensorflow_text/python/ops/viterbi_constrained_sequence_op.py index ddc87a902..245c95675 100644 --- a/tensorflow_text/python/ops/viterbi_constrained_sequence_op.py +++ b/tensorflow_text/python/ops/viterbi_constrained_sequence_op.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/viterbi_constrained_sequence_op_test.py b/tensorflow_text/python/ops/viterbi_constrained_sequence_op_test.py index 800cc4b72..b1ee39d30 100644 --- a/tensorflow_text/python/ops/viterbi_constrained_sequence_op_test.py +++ b/tensorflow_text/python/ops/viterbi_constrained_sequence_op_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/whitespace_tokenizer.py b/tensorflow_text/python/ops/whitespace_tokenizer.py index 6305b9c6d..943a07833 100644 --- a/tensorflow_text/python/ops/whitespace_tokenizer.py +++ b/tensorflow_text/python/ops/whitespace_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/whitespace_tokenizer_test.py b/tensorflow_text/python/ops/whitespace_tokenizer_test.py index f655e8f5a..27c2a1c80 100644 --- a/tensorflow_text/python/ops/whitespace_tokenizer_test.py +++ b/tensorflow_text/python/ops/whitespace_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/wordpiece_tokenizer.py b/tensorflow_text/python/ops/wordpiece_tokenizer.py index 02f3d594e..b5f0c4445 100644 --- a/tensorflow_text/python/ops/wordpiece_tokenizer.py +++ b/tensorflow_text/python/ops/wordpiece_tokenizer.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/wordpiece_tokenizer_test.py b/tensorflow_text/python/ops/wordpiece_tokenizer_test.py index fc0941b6a..75720df0c 100644 --- a/tensorflow_text/python/ops/wordpiece_tokenizer_test.py +++ b/tensorflow_text/python/ops/wordpiece_tokenizer_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/wordshape_ops.py b/tensorflow_text/python/ops/wordshape_ops.py index 6eff5dcca..e006921cf 100644 --- a/tensorflow_text/python/ops/wordshape_ops.py +++ b/tensorflow_text/python/ops/wordshape_ops.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ops/wordshape_ops_test.py b/tensorflow_text/python/ops/wordshape_ops_test.py index 20384435f..281f2a517 100644 --- a/tensorflow_text/python/ops/wordshape_ops_test.py +++ b/tensorflow_text/python/ops/wordshape_ops_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/python/ragged/ragged_tensor_to_tensor_test.py b/tensorflow_text/python/ragged/ragged_tensor_to_tensor_test.py index 56f8f93b2..4b5f29c0b 100644 --- a/tensorflow_text/python/ragged/ragged_tensor_to_tensor_test.py +++ b/tensorflow_text/python/ragged/ragged_tensor_to_tensor_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tftext.bzl b/tensorflow_text/tftext.bzl index 8343de92e..5fd352d41 100644 --- a/tensorflow_text/tftext.bzl +++ b/tensorflow_text/tftext.bzl @@ -64,6 +64,7 @@ def py_tf_text_library( "//conditions:default": ["-pthread"], }), linkshared = 1, + linkstatic = 0, # Added this line linkopts = select({ "@org_tensorflow//tensorflow:macos": [ "-Wl,-exported_symbols_list,$(location //tensorflow_text:exported_symbols.lds)", @@ -128,7 +129,7 @@ def tf_cc_library( alwayslink: If symbols should be exported """ if "kernel" in name: - alwayslink = 1 + alwayslink = 0 # These are "random" deps likely needed by each library (http://b/142433427) oss_deps = [] @@ -139,6 +140,16 @@ def tf_cc_library( oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/time") oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/types:variant") oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/functional:any_invocable") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/log:check") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/log:log") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/log:absl_check") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/log:absl_log") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/strings") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/container:btree") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/container:flat_hash_set") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/base") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/meta:type_traits") + oss_deps = oss_deps + _dedupe(deps, "@com_google_absl//absl/utility:if_constexpr") deps += select({ "@org_tensorflow//tensorflow:mobile": [ "@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite", @@ -146,7 +157,7 @@ def tf_cc_library( "//conditions:default": [ "@release_or_nightly//:tensorflow_libtensorflow_framework", "@release_or_nightly//:tensorflow_tf_header_lib", - ] + tf_deps + oss_deps, + ] + oss_deps, }) native.cc_library( name = name, @@ -157,6 +168,10 @@ def tf_cc_library( compatible_with = compatible_with, testonly = testonly, alwayslink = alwayslink, + linkstatic = select({ + "@org_tensorflow//tensorflow:mobile": 1, + "//conditions:default": 0, + }), # Added this line ) def tflite_cc_library( @@ -218,6 +233,10 @@ def tflite_cc_library( compatible_with = compatible_with, testonly = testonly, alwayslink = alwayslink, + linkstatic = select({ + "@org_tensorflow//tensorflow:mobile": 1, + "//conditions:default": 0, + }), # Added this line ) def extra_py_deps(): diff --git a/tensorflow_text/tools/__init__.py b/tensorflow_text/tools/__init__.py index 11a1afef3..8156e1480 100644 --- a/tensorflow_text/tools/__init__.py +++ b/tensorflow_text/tools/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/__init__.py b/tensorflow_text/tools/wordpiece_vocab/__init__.py index 11a1afef3..8156e1480 100644 --- a/tensorflow_text/tools/wordpiece_vocab/__init__.py +++ b/tensorflow_text/tools/wordpiece_vocab/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset.py b/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset.py index 36fa0446e..b8edfa7e2 100644 --- a/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset.py +++ b/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset_test.py b/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset_test.py index a1442a2f4..3ebec2683 100644 --- a/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset_test.py +++ b/tensorflow_text/tools/wordpiece_vocab/bert_vocab_from_dataset_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/generate_vocab.py b/tensorflow_text/tools/wordpiece_vocab/generate_vocab.py index 81ce10cac..b316e08b3 100644 --- a/tensorflow_text/tools/wordpiece_vocab/generate_vocab.py +++ b/tensorflow_text/tools/wordpiece_vocab/generate_vocab.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/generate_word_counts.py b/tensorflow_text/tools/wordpiece_vocab/generate_word_counts.py index 36442a47b..ca2be867b 100644 --- a/tensorflow_text/tools/wordpiece_vocab/generate_word_counts.py +++ b/tensorflow_text/tools/wordpiece_vocab/generate_word_counts.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/measure_wordpiece_stats.py b/tensorflow_text/tools/wordpiece_vocab/measure_wordpiece_stats.py index eb4eb12fc..42b7a66f3 100644 --- a/tensorflow_text/tools/wordpiece_vocab/measure_wordpiece_stats.py +++ b/tensorflow_text/tools/wordpiece_vocab/measure_wordpiece_stats.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/utils.py b/tensorflow_text/tools/wordpiece_vocab/utils.py index 8cf2f0285..6360a3bfa 100644 --- a/tensorflow_text/tools/wordpiece_vocab/utils.py +++ b/tensorflow_text/tools/wordpiece_vocab/utils.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/utils_test.py b/tensorflow_text/tools/wordpiece_vocab/utils_test.py index e6fbfe348..ae2302b44 100644 --- a/tensorflow_text/tools/wordpiece_vocab/utils_test.py +++ b/tensorflow_text/tools/wordpiece_vocab/utils_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner.py b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner.py index 87ddc3af4..cd3a4c39c 100644 --- a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner.py +++ b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_lib.py b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_lib.py index fb5cc4734..55f61bfa0 100644 --- a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_lib.py +++ b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_lib.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_test.py b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_test.py index 14643103c..a98ec3154 100644 --- a/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_test.py +++ b/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_test.py @@ -1,5 +1,5 @@ # coding=utf-8 -# Copyright 2024 TF.Text Authors. +# Copyright 2025 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/third_party/darts_clone/BUILD.bzl b/third_party/darts_clone/BUILD.bzl index de6a309f2..8fd5b1aee 100644 --- a/third_party/darts_clone/BUILD.bzl +++ b/third_party/darts_clone/BUILD.bzl @@ -1,5 +1,7 @@ """Darts-clone is a clone of Darts (Double-ARray Trie System).""" +load("@rules_cc//cc:cc_library.bzl", "cc_library") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) diff --git a/third_party/icu/BUILD.bzl b/third_party/icu/BUILD.bzl index 85eb556ce..ffa4b32e2 100644 --- a/third_party/icu/BUILD.bzl +++ b/third_party/icu/BUILD.bzl @@ -1,5 +1,7 @@ """Builds ICU library.""" +load("@rules_cc//cc:cc_library.bzl", "cc_library") + package( default_visibility = ["//visibility:public"], ) diff --git a/third_party/icu/data/BUILD b/third_party/icu/data/BUILD index 49fe9561a..60a1e0b4f 100644 --- a/third_party/icu/data/BUILD +++ b/third_party/icu/data/BUILD @@ -1,5 +1,7 @@ """ICU data build.""" +load("@rules_cc//cc:cc_library.bzl", "cc_library") + licenses(["notice"]) # Apache 2.0 package( diff --git a/third_party/pybind11/BUILD.bzl b/third_party/pybind11/BUILD.bzl index dcff8c20f..f6031fb0e 100644 --- a/third_party/pybind11/BUILD.bzl +++ b/third_party/pybind11/BUILD.bzl @@ -2,6 +2,8 @@ BUILD file for pybind11 package, since the github version does not have one. """ +load("@rules_cc//cc:cc_library.bzl", "cc_library") + package(default_visibility = ["//visibility:public"]) cc_library( @@ -24,6 +26,6 @@ cc_library( includes = ["include"], strip_include_prefix = "include", deps = [ - "@org_tensorflow//third_party/python_runtime:headers", + "@local_xla//third_party/python_runtime:headers", ], )