From 32dc812e814c98873068fea87b4eecc2e2babed8 Mon Sep 17 00:00:00 2001 From: Raviteja Gorijala Date: Mon, 24 Mar 2025 11:09:17 -0700 Subject: [PATCH 01/19] add @absl_py//absl:app dep to tensorflow_build_info PiperOrigin-RevId: 740004896 --- oss_scripts/pip_package/BUILD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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( From 5564b829bec8b5bd74c0b2bbe5cd5f434fd09070 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Mon, 16 Jun 2025 09:55:56 -0700 Subject: [PATCH 02/19] Fix nightly builds. - Update pybind11 workspace to reflect XLA refactoring. - Add new rules_shell dependency. - Remove python 3.9 build (will not be supported in future) PiperOrigin-RevId: 772068591 --- WORKSPACE | 7 +++++++ oss_scripts/build_docs.py | 2 +- oss_scripts/docker_builds.sh | 2 +- oss_scripts/pip_package/setup.nightly.py | 2 +- oss_scripts/pip_package/setup.py | 2 +- oss_scripts/pip_package/tensorflow_build_info.py | 2 +- tensorflow_text/__init__.py | 2 +- tensorflow_text/core/kernels/boise_offset_converter.cc | 2 +- tensorflow_text/core/kernels/boise_offset_converter.h | 2 +- .../core/kernels/boise_offset_converter_kernel.cc | 2 +- .../core/kernels/boise_offset_converter_kernel.h | 2 +- .../core/kernels/boise_offset_converter_kernel_template.h | 2 +- .../core/kernels/boise_offset_converter_test.cc | 2 +- tensorflow_text/core/kernels/byte_splitter.cc | 2 +- tensorflow_text/core/kernels/byte_splitter.h | 2 +- tensorflow_text/core/kernels/byte_splitter_kernel.cc | 2 +- tensorflow_text/core/kernels/byte_splitter_kernel.h | 2 +- .../core/kernels/byte_splitter_kernel_template.h | 2 +- tensorflow_text/core/kernels/byte_splitter_test.cc | 2 +- tensorflow_text/core/kernels/byte_splitter_tflite.cc | 2 +- tensorflow_text/core/kernels/byte_splitter_tflite.h | 2 +- tensorflow_text/core/kernels/constrained_sequence.cc | 2 +- tensorflow_text/core/kernels/constrained_sequence.h | 2 +- .../core/kernels/constrained_sequence_kernel.cc | 2 +- .../constrained_sequence_kernel_input_validation_test.cc | 2 +- tensorflow_text/core/kernels/darts_clone_trie_builder.cc | 2 +- tensorflow_text/core/kernels/darts_clone_trie_builder.h | 2 +- tensorflow_text/core/kernels/darts_clone_trie_test.cc | 2 +- tensorflow_text/core/kernels/darts_clone_trie_wrapper.h | 2 +- tensorflow_text/core/kernels/disjoint_set_forest.h | 2 +- tensorflow_text/core/kernels/disjoint_set_forest_test.cc | 2 +- .../kernels/exp_greedy_constrained_sequence_kernel_test.cc | 2 +- .../exp_viterbi_constrained_sequence_kernel_test.cc | 2 +- tensorflow_text/core/kernels/fast_bert_normalizer.h | 2 +- .../core/kernels/fast_bert_normalizer_kernel_template.h | 2 +- .../core/kernels/fast_bert_normalizer_model_builder.cc | 2 +- .../core/kernels/fast_bert_normalizer_model_builder.h | 2 +- tensorflow_text/core/kernels/fast_bert_normalizer_test.cc | 2 +- .../core/kernels/fast_bert_normalizer_tf_kernel.cc | 2 +- .../core/kernels/fast_bert_normalizer_tf_kernel.h | 2 +- .../core/kernels/fast_bert_normalizer_tflite.cc | 2 +- tensorflow_text/core/kernels/fast_bert_normalizer_tflite.h | 2 +- tensorflow_text/core/kernels/fast_wordpiece_tokenizer.cc | 2 +- tensorflow_text/core/kernels/fast_wordpiece_tokenizer.h | 2 +- .../core/kernels/fast_wordpiece_tokenizer_kernel.cc | 2 +- .../core/kernels/fast_wordpiece_tokenizer_kernel.h | 2 +- .../kernels/fast_wordpiece_tokenizer_kernel_template.h | 2 +- .../core/kernels/fast_wordpiece_tokenizer_model_builder.cc | 2 +- .../core/kernels/fast_wordpiece_tokenizer_model_builder.h | 2 +- .../core/kernels/fast_wordpiece_tokenizer_test.cc | 2 +- .../core/kernels/fast_wordpiece_tokenizer_tflite.cc | 2 +- .../core/kernels/fast_wordpiece_tokenizer_tflite.h | 2 +- .../core/kernels/fast_wordpiece_tokenizer_utils.h | 2 +- .../core/kernels/fast_wordpiece_tokenizer_utils_test.cc | 2 +- .../kernels/log_greedy_constrained_sequence_kernel_test.cc | 2 +- .../log_viterbi_constrained_sequence_kernel_test.cc | 2 +- tensorflow_text/core/kernels/mst_op_kernels.cc | 2 +- tensorflow_text/core/kernels/mst_solver.h | 2 +- .../core/kernels/mst_solver_random_comparison_test.cc | 2 +- tensorflow_text/core/kernels/mst_solver_test.cc | 2 +- tensorflow_text/core/kernels/ngrams_kernel.cc | 2 +- tensorflow_text/core/kernels/ngrams_kernel.h | 2 +- tensorflow_text/core/kernels/ngrams_kernel_template.h | 2 +- tensorflow_text/core/kernels/ngrams_kernel_test.cc | 2 +- tensorflow_text/core/kernels/ngrams_tflite.cc | 2 +- tensorflow_text/core/kernels/ngrams_tflite.h | 2 +- tensorflow_text/core/kernels/ngrams_tflite_test.cc | 2 +- tensorflow_text/core/kernels/normalize_kernels.cc | 2 +- tensorflow_text/core/kernels/normalize_kernels_test.cc | 2 +- tensorflow_text/core/kernels/phrase_tokenizer.cc | 2 +- tensorflow_text/core/kernels/phrase_tokenizer.h | 2 +- tensorflow_text/core/kernels/phrase_tokenizer_kernel.cc | 2 +- tensorflow_text/core/kernels/phrase_tokenizer_kernel.h | 2 +- .../core/kernels/phrase_tokenizer_kernel_template.h | 2 +- .../core/kernels/phrase_tokenizer_model_builder.cc | 2 +- .../core/kernels/phrase_tokenizer_model_builder.h | 2 +- tensorflow_text/core/kernels/phrase_tokenizer_test.cc | 2 +- .../core/kernels/ragged_tensor_to_tensor_tflite.cc | 2 +- .../core/kernels/ragged_tensor_to_tensor_tflite.h | 2 +- .../core/kernels/ragged_tensor_to_tensor_tflite_test.cc | 2 +- tensorflow_text/core/kernels/regex_split.cc | 2 +- tensorflow_text/core/kernels/regex_split.h | 2 +- tensorflow_text/core/kernels/regex_split_kernels.cc | 2 +- tensorflow_text/core/kernels/regex_split_test.cc | 2 +- tensorflow_text/core/kernels/rouge_l_kernel.cc | 2 +- tensorflow_text/core/kernels/rouge_l_kernel_test.cc | 2 +- tensorflow_text/core/kernels/round_robin_trimmer.h | 2 +- tensorflow_text/core/kernels/round_robin_trimmer_kernel.cc | 2 +- tensorflow_text/core/kernels/round_robin_trimmer_kernel.h | 2 +- .../core/kernels/round_robin_trimmer_kernel_template.h | 2 +- tensorflow_text/core/kernels/round_robin_trimmer_test.cc | 2 +- tensorflow_text/core/kernels/round_robin_trimmer_tflite.cc | 2 +- tensorflow_text/core/kernels/round_robin_trimmer_tflite.h | 2 +- tensorflow_text/core/kernels/sentence_breaking_kernels.cc | 2 +- tensorflow_text/core/kernels/sentence_breaking_utils.cc | 2 +- tensorflow_text/core/kernels/sentence_breaking_utils.h | 2 +- .../core/kernels/sentence_breaking_utils_test.cc | 2 +- tensorflow_text/core/kernels/sentence_fragmenter.cc | 2 +- tensorflow_text/core/kernels/sentence_fragmenter.h | 2 +- tensorflow_text/core/kernels/sentence_fragmenter_v2.cc | 2 +- tensorflow_text/core/kernels/sentence_fragmenter_v2.h | 2 +- .../core/kernels/sentence_fragmenter_v2_kernel.cc | 2 +- .../core/kernels/sentence_fragmenter_v2_kernel.h | 2 +- .../core/kernels/sentence_fragmenter_v2_kernel_template.h | 2 +- .../core/kernels/sentence_fragmenter_v2_test.cc | 2 +- .../core/kernels/sentence_fragmenter_v2_tflite.cc | 2 +- .../core/kernels/sentence_fragmenter_v2_tflite.h | 2 +- .../core/kernels/sentencepiece/double_array_trie.h | 2 +- .../kernels/sentencepiece/double_array_trie_builder.cc | 2 +- .../core/kernels/sentencepiece/double_array_trie_builder.h | 2 +- .../core/kernels/sentencepiece/double_array_trie_test.cc | 2 +- .../core/kernels/sentencepiece/model_converter.cc | 2 +- .../core/kernels/sentencepiece/model_converter.h | 2 +- .../core/kernels/sentencepiece/optimized_decoder.cc | 2 +- .../core/kernels/sentencepiece/optimized_decoder.h | 2 +- .../core/kernels/sentencepiece/optimized_decoder_test.cc | 2 +- .../core/kernels/sentencepiece/optimized_encoder.cc | 2 +- .../core/kernels/sentencepiece/optimized_encoder.h | 2 +- .../core/kernels/sentencepiece/optimized_encoder_test.cc | 2 +- .../core/kernels/sentencepiece/py_tflite_registerer.cc | 2 +- .../core/kernels/sentencepiece/py_tflite_registerer.h | 2 +- .../core/kernels/sentencepiece/sentencepiece_constants.h | 2 +- .../core/kernels/sentencepiece/sentencepiece_detokenizer.h | 2 +- .../sentencepiece/sentencepiece_detokenizer_kernel.cc | 2 +- .../sentencepiece/sentencepiece_detokenizer_tflite.cc | 2 +- .../core/kernels/sentencepiece/sentencepiece_tokenizer.h | 2 +- .../sentencepiece/sentencepiece_tokenizer_kernel.cc | 2 +- .../sentencepiece/sentencepiece_tokenizer_tflite.cc | 2 +- tensorflow_text/core/kernels/sentencepiece/utils.h | 2 +- tensorflow_text/core/kernels/sentencepiece_kernels.cc | 2 +- tensorflow_text/core/kernels/spanning_tree_iterator.cc | 2 +- tensorflow_text/core/kernels/spanning_tree_iterator.h | 2 +- .../core/kernels/spanning_tree_iterator_test.cc | 2 +- .../core/kernels/split_merge_tokenize_kernel.cc | 2 +- tensorflow_text/core/kernels/string_vocab.cc | 2 +- tensorflow_text/core/kernels/string_vocab.h | 2 +- tensorflow_text/core/kernels/text_kernels_test_util.cc | 2 +- tensorflow_text/core/kernels/text_kernels_test_util.h | 2 +- .../core/kernels/tokenizer_from_logits_kernel.cc | 2 +- tensorflow_text/core/kernels/trimmer.h | 2 +- .../core/kernels/unicode_script_tokenize_kernel.cc | 2 +- .../core/kernels/unicode_script_tokenize_kernel_test.cc | 2 +- tensorflow_text/core/kernels/utf8_binarize.cc | 2 +- tensorflow_text/core/kernels/utf8_binarize.h | 2 +- tensorflow_text/core/kernels/utf8_binarize_kernel.cc | 2 +- tensorflow_text/core/kernels/utf8_binarize_kernel.h | 2 +- .../core/kernels/utf8_binarize_kernel_template.h | 2 +- tensorflow_text/core/kernels/utf8_binarize_test.cc | 2 +- tensorflow_text/core/kernels/utf8_binarize_tflite.cc | 2 +- tensorflow_text/core/kernels/utf8_binarize_tflite.h | 2 +- tensorflow_text/core/kernels/whitespace_tokenize_kernel.cc | 2 +- .../core/kernels/whitespace_tokenize_kernel_test.cc | 2 +- tensorflow_text/core/kernels/whitespace_tokenizer.cc | 2 +- tensorflow_text/core/kernels/whitespace_tokenizer.h | 2 +- .../core/kernels/whitespace_tokenizer_config_builder.cc | 2 +- .../core/kernels/whitespace_tokenizer_config_builder.h | 2 +- .../kernels/whitespace_tokenizer_config_builder_test.cc | 2 +- .../core/kernels/whitespace_tokenizer_kernel.cc | 2 +- tensorflow_text/core/kernels/whitespace_tokenizer_kernel.h | 2 +- .../core/kernels/whitespace_tokenizer_kernel_template.h | 2 +- tensorflow_text/core/kernels/whitespace_tokenizer_test.cc | 2 +- .../core/kernels/whitespace_tokenizer_tflite.cc | 2 +- tensorflow_text/core/kernels/whitespace_tokenizer_tflite.h | 2 +- tensorflow_text/core/kernels/wordpiece_kernel.cc | 2 +- tensorflow_text/core/kernels/wordpiece_kernel_test.cc | 2 +- tensorflow_text/core/kernels/wordpiece_tokenizer.cc | 2 +- tensorflow_text/core/kernels/wordpiece_tokenizer.h | 2 +- tensorflow_text/core/ops/boise_offset_converter_op.cc | 2 +- tensorflow_text/core/ops/boise_offset_converter_op_test.cc | 2 +- tensorflow_text/core/ops/byte_splitter_op.cc | 2 +- tensorflow_text/core/ops/byte_splitter_op_test.cc | 2 +- tensorflow_text/core/ops/constrained_sequence_op.cc | 2 +- tensorflow_text/core/ops/fast_bert_normalizer_op.cc | 2 +- tensorflow_text/core/ops/fast_sentencepiece_ops.cc | 2 +- tensorflow_text/core/ops/fast_wordpiece_tokenizer_op.cc | 2 +- .../core/ops/fast_wordpiece_tokenizer_op_test.cc | 2 +- tensorflow_text/core/ops/mst_ops.cc | 2 +- tensorflow_text/core/ops/ngrams_op.cc | 2 +- tensorflow_text/core/ops/normalize_ops.cc | 2 +- tensorflow_text/core/ops/phrase_tokenizer_op.cc | 2 +- tensorflow_text/core/ops/regex_split_ops.cc | 2 +- tensorflow_text/core/ops/rouge_l_op.cc | 2 +- tensorflow_text/core/ops/sentence_breaking_ops.cc | 2 +- tensorflow_text/core/ops/sentence_fragmenter_v2_op.cc | 2 +- tensorflow_text/core/ops/sentence_fragmenter_v2_op_test.cc | 2 +- tensorflow_text/core/ops/sentencepiece_ops.cc | 2 +- tensorflow_text/core/ops/split_merge_tokenize_op.cc | 2 +- tensorflow_text/core/ops/tokenizer_from_logits_op.cc | 2 +- tensorflow_text/core/ops/trimmer_ops.cc | 2 +- tensorflow_text/core/ops/trimmer_ops_test.cc | 2 +- tensorflow_text/core/ops/unicode_script_tokenize_op.cc | 2 +- tensorflow_text/core/ops/utf8_binarize_op.cc | 2 +- tensorflow_text/core/ops/utf8_binarize_op_test.cc | 2 +- tensorflow_text/core/ops/whitespace_tokenize_op.cc | 2 +- tensorflow_text/core/ops/whitespace_tokenizer_op.cc | 2 +- tensorflow_text/core/ops/wordpiece_op.cc | 2 +- .../pybinds/pywrap_fast_bert_normalizer_model_builder.cc | 2 +- .../pywrap_fast_bert_normalizer_model_builder_test.py | 2 +- .../pywrap_fast_wordpiece_tokenizer_model_builder.cc | 2 +- .../pywrap_fast_wordpiece_tokenizer_model_builder_test.py | 2 +- tensorflow_text/core/pybinds/pywrap_model_converter.cc | 2 +- .../core/pybinds/pywrap_phrase_tokenizer_model_builder.cc | 2 +- .../pybinds/pywrap_phrase_tokenizer_model_builder_test.py | 2 +- .../pybinds/pywrap_whitespace_tokenizer_config_builder.cc | 2 +- .../pywrap_whitespace_tokenizer_config_builder_test.py | 2 +- tensorflow_text/core/pybinds/tflite_registrar.cc | 2 +- tensorflow_text/python/__init__.py | 2 +- tensorflow_text/python/benchmarks/__init__.py | 2 +- tensorflow_text/python/benchmarks/benchmark_utils.py | 2 +- tensorflow_text/python/benchmarks/ops_benchmarks.py | 2 +- tensorflow_text/python/benchmarks/tokenizers_benchmarks.py | 2 +- tensorflow_text/python/keras/__init__.py | 2 +- tensorflow_text/python/keras/layers/__init__.py | 2 +- tensorflow_text/python/keras/layers/todense.py | 2 +- tensorflow_text/python/keras/layers/todense_test.py | 2 +- tensorflow_text/python/keras/layers/tokenization_layers.py | 2 +- .../python/keras/layers/tokenization_layers_test.py | 2 +- tensorflow_text/python/metrics/__init__.py | 2 +- .../python/metrics/text_similarity_metric_ops.py | 2 +- .../python/metrics/text_similarity_metric_ops_test.py | 2 +- tensorflow_text/python/numpy/__init__.py | 2 +- tensorflow_text/python/numpy/viterbi_decode.py | 2 +- tensorflow_text/python/numpy/viterbi_decode_test.py | 2 +- tensorflow_text/python/ops/__init__.py | 2 +- tensorflow_text/python/ops/bert_tokenizer.py | 2 +- tensorflow_text/python/ops/bert_tokenizer_test.py | 2 +- tensorflow_text/python/ops/boise_offset_converter.py | 2 +- tensorflow_text/python/ops/boise_offset_converter_test.py | 2 +- tensorflow_text/python/ops/byte_splitter.py | 2 +- tensorflow_text/python/ops/byte_splitter_test.py | 2 +- tensorflow_text/python/ops/coerce_to_valid_utf8_op_test.py | 2 +- tensorflow_text/python/ops/create_feature_bitmask_op.py | 2 +- .../python/ops/create_feature_bitmask_op_test.py | 2 +- tensorflow_text/python/ops/fast_bert_normalizer.py | 2 +- tensorflow_text/python/ops/fast_bert_normalizer_test.py | 2 +- tensorflow_text/python/ops/fast_bert_tokenizer.py | 2 +- tensorflow_text/python/ops/fast_bert_tokenizer_test.py | 2 +- tensorflow_text/python/ops/fast_sentencepiece_tokenizer.py | 2 +- .../python/ops/fast_sentencepiece_tokenizer_test.py | 2 +- tensorflow_text/python/ops/fast_wordpiece_tokenizer.py | 2 +- .../python/ops/fast_wordpiece_tokenizer_test.py | 2 +- tensorflow_text/python/ops/gather_with_default_op_test.py | 2 +- .../python/ops/greedy_constrained_sequence_op.py | 2 +- .../python/ops/greedy_constrained_sequence_op_test.py | 2 +- tensorflow_text/python/ops/hub_module_splitter.py | 2 +- tensorflow_text/python/ops/hub_module_splitter_test.py | 2 +- tensorflow_text/python/ops/hub_module_tokenizer.py | 2 +- tensorflow_text/python/ops/hub_module_tokenizer_test.py | 2 +- tensorflow_text/python/ops/item_selector_ops.py | 2 +- tensorflow_text/python/ops/item_selector_ops_test.py | 2 +- tensorflow_text/python/ops/masking_ops.py | 2 +- tensorflow_text/python/ops/masking_ops_test.py | 2 +- tensorflow_text/python/ops/mst_ops.py | 2 +- tensorflow_text/python/ops/mst_ops_test.py | 2 +- tensorflow_text/python/ops/ngrams_op.py | 2 +- tensorflow_text/python/ops/ngrams_op_test.py | 2 +- tensorflow_text/python/ops/normalize_ops.py | 2 +- tensorflow_text/python/ops/normalize_ops_test.py | 2 +- tensorflow_text/python/ops/pad_along_dimension_op.py | 2 +- tensorflow_text/python/ops/pad_along_dimension_op_test.py | 2 +- tensorflow_text/python/ops/pad_model_inputs_ops.py | 2 +- tensorflow_text/python/ops/pad_model_inputs_ops_test.py | 2 +- tensorflow_text/python/ops/phrase_tokenizer.py | 2 +- tensorflow_text/python/ops/phrase_tokenizer_test.py | 2 +- tensorflow_text/python/ops/pointer_ops.py | 2 +- tensorflow_text/python/ops/regex_split_ops.py | 2 +- tensorflow_text/python/ops/regex_split_ops_test.py | 2 +- tensorflow_text/python/ops/segment_combiner_ops.py | 2 +- tensorflow_text/python/ops/segment_combiner_ops_test.py | 2 +- tensorflow_text/python/ops/sentence_breaking_ops.py | 2 +- tensorflow_text/python/ops/sentence_breaking_ops_test.py | 2 +- tensorflow_text/python/ops/sentencepiece_tokenizer.py | 2 +- tensorflow_text/python/ops/sentencepiece_tokenizer_test.py | 2 +- tensorflow_text/python/ops/sliding_window_op.py | 2 +- tensorflow_text/python/ops/sliding_window_op_test.py | 2 +- tensorflow_text/python/ops/span_alignment_op_test.py | 2 +- tensorflow_text/python/ops/span_overlaps_op_test.py | 2 +- .../python/ops/split_merge_from_logits_tokenizer.py | 2 +- .../python/ops/split_merge_from_logits_tokenizer_test.py | 2 +- tensorflow_text/python/ops/split_merge_tokenizer.py | 2 +- tensorflow_text/python/ops/split_merge_tokenizer_test.py | 2 +- tensorflow_text/python/ops/splitter.py | 2 +- .../python/ops/state_based_sentence_breaker_op.py | 2 +- .../python/ops/state_based_sentence_breaker_op_test.py | 2 +- tensorflow_text/python/ops/string_ops.py | 2 +- tensorflow_text/python/ops/tokenization.py | 2 +- tensorflow_text/python/ops/trimmer_ops.py | 2 +- tensorflow_text/python/ops/trimmer_ops_test.py | 2 +- tensorflow_text/python/ops/unicode_char_tokenizer.py | 2 +- tensorflow_text/python/ops/unicode_char_tokenizer_test.py | 2 +- tensorflow_text/python/ops/unicode_script_tokenizer.py | 2 +- .../python/ops/unicode_script_tokenizer_test.py | 2 +- tensorflow_text/python/ops/utf8_binarize_op.py | 2 +- tensorflow_text/python/ops/utf8_binarize_op_test.py | 2 +- .../python/ops/viterbi_constrained_sequence_op.py | 2 +- .../python/ops/viterbi_constrained_sequence_op_test.py | 2 +- tensorflow_text/python/ops/whitespace_tokenizer.py | 2 +- tensorflow_text/python/ops/whitespace_tokenizer_test.py | 2 +- tensorflow_text/python/ops/wordpiece_tokenizer.py | 2 +- tensorflow_text/python/ops/wordpiece_tokenizer_test.py | 2 +- tensorflow_text/python/ops/wordshape_ops.py | 2 +- tensorflow_text/python/ops/wordshape_ops_test.py | 2 +- .../python/ragged/ragged_tensor_to_tensor_test.py | 2 +- tensorflow_text/tools/__init__.py | 2 +- tensorflow_text/tools/wordpiece_vocab/__init__.py | 2 +- .../tools/wordpiece_vocab/bert_vocab_from_dataset.py | 2 +- .../tools/wordpiece_vocab/bert_vocab_from_dataset_test.py | 2 +- tensorflow_text/tools/wordpiece_vocab/generate_vocab.py | 2 +- .../tools/wordpiece_vocab/generate_word_counts.py | 2 +- .../tools/wordpiece_vocab/measure_wordpiece_stats.py | 2 +- tensorflow_text/tools/wordpiece_vocab/utils.py | 2 +- tensorflow_text/tools/wordpiece_vocab/utils_test.py | 2 +- .../tools/wordpiece_vocab/wordpiece_tokenizer_learner.py | 2 +- .../wordpiece_vocab/wordpiece_tokenizer_learner_lib.py | 2 +- .../wordpiece_vocab/wordpiece_tokenizer_learner_test.py | 2 +- third_party/pybind11/BUILD.bzl | 2 +- 316 files changed, 322 insertions(+), 315 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 7bb229a12..b5b90f39b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -83,6 +83,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/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/setup.nightly.py b/oss_scripts/pip_package/setup.nightly.py index 05c429edb..1f4949329 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. diff --git a/oss_scripts/pip_package/setup.py b/oss_scripts/pip_package/setup.py index 4986549c5..4b7422c37 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. 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/tensorflow_text/__init__.py b/tensorflow_text/__init__.py index 5b0777fc0..d40d3b6cc 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. 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..b7fafefaa 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. 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/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..5daedff81 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. 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..fb0e9a02c 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. 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..664316ddf 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. 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/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/pywrap_fast_bert_normalizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc index acb1f53b9..0df5eac64 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. 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..0980a13d9 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. 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..ad66949c0 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. 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..118608def 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. 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..a76bcff22 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. 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/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/pybind11/BUILD.bzl b/third_party/pybind11/BUILD.bzl index dcff8c20f..c5f5da7ce 100644 --- a/third_party/pybind11/BUILD.bzl +++ b/third_party/pybind11/BUILD.bzl @@ -24,6 +24,6 @@ cc_library( includes = ["include"], strip_include_prefix = "include", deps = [ - "@org_tensorflow//third_party/python_runtime:headers", + "@local_xla//third_party/python_runtime:headers", ], ) From 105720db46a4c67f94d1264862f4691ce76e15ff Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Wed, 2 Jul 2025 09:37:46 -0700 Subject: [PATCH 03/19] iterate over Unicode White_Space directly, rather than testing each of 1.1M code points #Cleanup PiperOrigin-RevId: 778538165 --- .../whitespace_tokenizer_config_builder.cc | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index 6e79c2573..e3a4d026b 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -14,62 +14,53 @@ #include "tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h" -#include #include -#include "icu4c/source/common/unicode/appendable.h" -#include "icu4c/source/common/unicode/bytestream.h" -#include "icu4c/source/common/unicode/edits.h" -#include "icu4c/source/common/unicode/normalizer2.h" -#include "icu4c/source/common/unicode/schriter.h" -#include "icu4c/source/common/unicode/stringoptions.h" -#include "icu4c/source/common/unicode/stringpiece.h" #include "icu4c/source/common/unicode/uchar.h" -#include "icu4c/source/common/unicode/ucnv.h" -#include "icu4c/source/common/unicode/ucnv_err.h" #include "icu4c/source/common/unicode/umachine.h" #include "icu4c/source/common/unicode/uniset.h" -#include "icu4c/source/common/unicode/unistr.h" #include "icu4c/source/common/unicode/uset.h" -#include "icu4c/source/common/unicode/utf.h" #include "icu4c/source/common/unicode/utf8.h" #include "icu4c/source/common/unicode/utypes.h" namespace tensorflow { namespace text { +namespace { + +const icu::UnicodeSet& WhiteSpaceSet() { + // Will not fail because the data is hardcoded in the ICU library. + UErrorCode error_code = U_ZERO_ERROR; + const USet* c_set = u_getBinaryPropertySet(UCHAR_WHITE_SPACE, &error_code); + // assert(U_SUCCESS(error_code)); + const icu::UnicodeSet* set = icu::UnicodeSet::fromUSet(c_set); + return *set; +} + +} // namespace + std::string BuildWhitespaceString() { - icu::UnicodeString unicode_string; - icu::UnicodeStringAppendable appendable_unicode_string(unicode_string); - // The maximum codepoint in Unicode is 0x0010FFFF. - for (UChar32 cp = 0; cp <= 0x0010FFFF; ++cp) { - if (U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp)) { - appendable_unicode_string.appendCodePoint(cp); - } - } std::string str; - unicode_string.toUTF8String(str); + char buf[U8_MAX_LENGTH]; + for (auto cp : WhiteSpaceSet().codePoints()) { + int len = 0; + U8_APPEND_UNSAFE(buf, len, cp); + str.append(buf, len); + } return str; } std::string BuildWhitespaceTokenizerConfig() { - // The maximum codepoint in Unicode is 0x0010FFFF. - UChar32 max_unicode_char = 0x0010FFFF; + const icu::UnicodeSet& set = WhiteSpaceSet(); + int range_count = set.getRangeCount(); + UChar32 largest_whitespace = set.getRangeEnd(range_count - 1); // The string will hold our bit array - std::string bitset((max_unicode_char >> 3) + 1, 0); - auto bitdata = bitset.begin(); - UChar32 largest_whitespace = 0; - int shift = 0; - for (UChar32 cp = 0; cp <= max_unicode_char; ++cp, ++shift) { - if (shift == 8) { - ++bitdata; - shift = 0; - } - bool is_whitespace = U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp); - largest_whitespace = is_whitespace ? cp : largest_whitespace; - *bitdata |= is_whitespace << shift; + std::string bitset((largest_whitespace >> 3) + 1, 0); + for (auto cp : set.codePoints()) { + int index = cp >> 3; + bitset[index] |= 1 << (cp & 7); } - return bitset.substr(0, (largest_whitespace >> 3) + 1); + return bitset; } } // namespace text From b74a866395b76e152fe7d62d2c30775c73550e21 Mon Sep 17 00:00:00 2001 From: Ivo Ristovski List Date: Mon, 4 Aug 2025 03:06:31 -0700 Subject: [PATCH 04/19] No public description PiperOrigin-RevId: 790668084 --- tensorflow_text/BUILD | 1 + tensorflow_text/core/kernels/BUILD | 2 ++ tensorflow_text/core/kernels/sentencepiece/BUILD | 2 ++ tensorflow_text/core/ops/BUILD | 2 ++ third_party/darts_clone/BUILD.bzl | 2 ++ third_party/icu/BUILD.bzl | 2 ++ third_party/icu/data/BUILD | 2 ++ third_party/pybind11/BUILD.bzl | 2 ++ 8 files changed, 15 insertions(+) diff --git a/tensorflow_text/BUILD b/tensorflow_text/BUILD index 9ded881dc..8078fd391 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 diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index eda400af7..3206db5bc 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") 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/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/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 c5f5da7ce..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( From 1ef5f7279a0e7945e3998eaf5f27af2baf7e3e27 Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Mon, 18 Aug 2025 09:13:35 -0700 Subject: [PATCH 05/19] No public description PiperOrigin-RevId: 796452056 --- tensorflow_text/core/kernels/BUILD | 1 + tensorflow_text/core/kernels/sentencepiece_kernels.cc | 3 ++- tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index 3206db5bc..8e6fc14d2 100644 --- a/tensorflow_text/core/kernels/BUILD +++ b/tensorflow_text/core/kernels/BUILD @@ -1018,6 +1018,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/sentencepiece_kernels.cc b/tensorflow_text/core/kernels/sentencepiece_kernels.cc index fb0e9a02c..4cc91495b 100644 --- a/tensorflow_text/core/kernels/sentencepiece_kernels.cc +++ b/tensorflow_text/core/kernels/sentencepiece_kernels.cc @@ -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/split_merge_tokenize_kernel.cc b/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc index 664316ddf..6a5372dd0 100644 --- a/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc +++ b/tensorflow_text/core/kernels/split_merge_tokenize_kernel.cc @@ -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)); From aa839b19768fb359a64d26f36d740eb65103c1bf Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Mon, 18 Aug 2025 10:36:59 -0700 Subject: [PATCH 06/19] Change input size from int16_t to int32_t to support large inputs. PiperOrigin-RevId: 796484892 --- .../sentencepiece_tokenizer_kernel.cc | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc index 5daedff81..ea4564928 100644 --- a/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc +++ b/tensorflow_text/core/kernels/sentencepiece/sentencepiece_tokenizer_kernel.cc @@ -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]; } } From 921aaafca7f9c88d1a6471ef9f030bcbf765c6f4 Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Wed, 22 Oct 2025 18:15:07 -0700 Subject: [PATCH 07/19] Update ICU version PiperOrigin-RevId: 822813535 --- WORKSPACE | 8 ++++---- oss_scripts/pip_package/requirements.in | 3 +-- oss_scripts/pip_package/setup.py | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b5b90f39b..b8d0f7640 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,11 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "icu", - strip_prefix = "icu-release-64-2", - sha256 = "dfc62618aa4bd3ca14a3df548cd65fe393155edd213e49c39f3a30ccd618fc27", + strip_prefix = "icu-release-77-1", + sha256 = "e424ba5282d95ad38b52639a08fb82164f0b0cbd7f17b53ae16bf14f8541855f", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-64-2.zip", - "https://github.com/unicode-org/icu/archive/release-64-2.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-77-1.zip", + "https://github.com/unicode-org/icu/archive/release-77-1.zip", ], build_file = "//third_party/icu:BUILD.bzl", patches = ["//third_party/icu:udata.patch"], diff --git a/oss_scripts/pip_package/requirements.in b/oss_scripts/pip_package/requirements.in index 9cc9f75d0..d976e5656 100644 --- a/oss_scripts/pip_package/requirements.in +++ b/oss_scripts/pip_package/requirements.in @@ -1,8 +1,7 @@ setuptools==70.0.0 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 +tensorflow==2.20 tf-keras tensorflow-datasets tensorflow-metadata diff --git a/oss_scripts/pip_package/setup.py b/oss_scripts/pip_package/setup.py index 4b7422c37..257846be2 100644 --- a/oss_scripts/pip_package/setup.py +++ b/oss_scripts/pip_package/setup.py @@ -88,12 +88,12 @@ def finalize_options(self): 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', From 27cb27cce8a35dd778e1accf6ca894b6c0cc3dea Mon Sep 17 00:00:00 2001 From: Ruslan Date: Wed, 29 Oct 2025 15:47:15 +0000 Subject: [PATCH 08/19] Fix build issues for the 2.20 --- WORKSPACE | 2 -- oss_scripts/configure.sh | 4 +++- oss_scripts/pip_package/requirements.in | 5 ++--- oss_scripts/pip_package/setup.nightly.py | 2 +- oss_scripts/pip_package/setup.py | 2 +- tensorflow_text/__init__.py | 2 +- tensorflow_text/core/kernels/BUILD | 5 +++++ .../core/kernels/darts_clone_trie_builder.cc | 1 + tensorflow_text/tftext.bzl | 10 ++++++++++ 9 files changed, 24 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b8d0f7640..fcaa867b8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -11,8 +11,6 @@ http_archive( "https://github.com/unicode-org/icu/archive/release-77-1.zip", ], build_file = "//third_party/icu:BUILD.bzl", - patches = ["//third_party/icu:udata.patch"], - patch_args = ["-p1"], ) http_archive( diff --git a/oss_scripts/configure.sh b/oss_scripts/configure.sh index a7f4e96a6..efcf8a249 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" \ No newline at end of file diff --git a/oss_scripts/pip_package/requirements.in b/oss_scripts/pip_package/requirements.in index d976e5656..954edccd0 100644 --- a/oss_scripts/pip_package/requirements.in +++ b/oss_scripts/pip_package/requirements.in @@ -1,7 +1,6 @@ setuptools==70.0.0 dm-tree==0.1.8 # Limit for macos support. numpy -tensorflow==2.20 +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 1f4949329..c5433e2df 100644 --- a/oss_scripts/pip_package/setup.nightly.py +++ b/oss_scripts/pip_package/setup.nightly.py @@ -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 257846be2..58ebf443b 100644 --- a/oss_scripts/pip_package/setup.py +++ b/oss_scripts/pip_package/setup.py @@ -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): diff --git a/tensorflow_text/__init__.py b/tensorflow_text/__init__.py index d40d3b6cc..a6b4e8bb4 100644 --- a/tensorflow_text/__init__.py +++ b/tensorflow_text/__init__.py @@ -110,4 +110,4 @@ ] remove_undocumented(__name__, _allowed_symbols) -__version__ = "2.13.0" +__version__ = "2.20.0" diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index 8e6fc14d2..26f829efc 100644 --- a/tensorflow_text/core/kernels/BUILD +++ b/tensorflow_text/core/kernels/BUILD @@ -337,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", ], ) @@ -873,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", ], ) diff --git a/tensorflow_text/core/kernels/darts_clone_trie_builder.cc b/tensorflow_text/core/kernels/darts_clone_trie_builder.cc index b7fafefaa..4eb492b14 100644 --- a/tensorflow_text/core/kernels/darts_clone_trie_builder.cc +++ b/tensorflow_text/core/kernels/darts_clone_trie_builder.cc @@ -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/tftext.bzl b/tensorflow_text/tftext.bzl index 8343de92e..f122e8bce 100644 --- a/tensorflow_text/tftext.bzl +++ b/tensorflow_text/tftext.bzl @@ -139,6 +139,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", From 596cc57bdc7f788bae33e33bfa68a32c06877dc2 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Wed, 12 Nov 2025 21:08:37 +0000 Subject: [PATCH 09/19] Add stable version for the org_tensorflow. Update setuptools version in the requirements.in file. Commented out dynamic update of the tensorflow in the prepare_tf_ped --- WORKSPACE | 5 ++--- oss_scripts/pip_package/requirements.in | 2 +- oss_scripts/prepare_tf_dep.sh | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index fcaa867b8..e071041e3 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,10 +54,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" ], ) diff --git a/oss_scripts/pip_package/requirements.in b/oss_scripts/pip_package/requirements.in index 954edccd0..c376cc304 100644 --- a/oss_scripts/pip_package/requirements.in +++ b/oss_scripts/pip_package/requirements.in @@ -1,4 +1,4 @@ -setuptools==70.0.0 +setuptools==78.1.1 dm-tree==0.1.8 # Limit for macos support. numpy tensorflow 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 From f10af1099a9c55ffd8597fd905e0745b97b29daf Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 13 Nov 2025 11:46:21 -0500 Subject: [PATCH 10/19] Core file appeared in the wheel file, but it still has an import problem --- tensorflow_text/BUILD | 2 +- tensorflow_text/core/BUILD | 15 ++ tensorflow_text/core/__init__.py | 0 tensorflow_text/core/pybinds/BUILD | 228 +++++++---------------- tensorflow_text/core/pybinds/__init__.py | 0 5 files changed, 88 insertions(+), 157 deletions(-) create mode 100644 tensorflow_text/core/BUILD create mode 100644 tensorflow_text/core/__init__.py create mode 100644 tensorflow_text/core/pybinds/__init__.py diff --git a/tensorflow_text/BUILD b/tensorflow_text/BUILD index 8078fd391..2c9c5ca01 100644 --- a/tensorflow_text/BUILD +++ b/tensorflow_text/BUILD @@ -123,7 +123,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/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/pybinds/BUILD b/tensorflow_text/core/pybinds/BUILD index 68b03161b..1083fbd33 100644 --- a/tensorflow_text/core/pybinds/BUILD +++ b/tensorflow_text/core/pybinds/BUILD @@ -1,195 +1,111 @@ -# 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", - ], -) - -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..e69de29bb From a97b091c58c2fbb17dc7989bb2c0a0c43f59f560 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 13 Nov 2025 13:49:52 -0500 Subject: [PATCH 11/19] Looks like now core package is present there properly --- oss_scripts/pip_package/setup.py | 2 +- tensorflow_text/BUILD | 1 + tensorflow_text/core/pybinds/BUILD | 2 ++ tensorflow_text/core/pybinds/__init__.py | 9 +++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/oss_scripts/pip_package/setup.py b/oss_scripts/pip_package/setup.py index 58ebf443b..9c06a4090 100644 --- a/oss_scripts/pip_package/setup.py +++ b/oss_scripts/pip_package/setup.py @@ -81,7 +81,7 @@ 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}, diff --git a/tensorflow_text/BUILD b/tensorflow_text/BUILD index 2c9c5ca01..5713407d6 100644 --- a/tensorflow_text/BUILD +++ b/tensorflow_text/BUILD @@ -74,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", ], diff --git a/tensorflow_text/core/pybinds/BUILD b/tensorflow_text/core/pybinds/BUILD index 1083fbd33..083c6ea8f 100644 --- a/tensorflow_text/core/pybinds/BUILD +++ b/tensorflow_text/core/pybinds/BUILD @@ -2,6 +2,8 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) +exports_files(["__init__.py"]) + cc_binary( name = "_pywrap_fast_bert_normalizer_model_builder.so", srcs = ["pywrap_fast_bert_normalizer_model_builder.cc"], diff --git a/tensorflow_text/core/pybinds/__init__.py b/tensorflow_text/core/pybinds/__init__.py index e69de29bb..8654a7e55 100644 --- a/tensorflow_text/core/pybinds/__init__.py +++ 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 From d4cdf0dfc13f40d1fc543415727a6d616dfa5111 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 13 Nov 2025 19:54:16 +0000 Subject: [PATCH 12/19] return the old version of the ICU --- WORKSPACE | 10 +-- .../whitespace_tokenizer_config_builder.cc | 63 +++++++++++-------- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e071041e3..eb6075f8e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,13 +4,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "icu", - strip_prefix = "icu-release-77-1", - sha256 = "e424ba5282d95ad38b52639a08fb82164f0b0cbd7f17b53ae16bf14f8541855f", + strip_prefix = "icu-release-64-2", + sha256 = "dfc62618aa4bd3ca14a3df548cd65fe393155edd213e49c39f3a30ccd618fc27", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-77-1.zip", - "https://github.com/unicode-org/icu/archive/release-77-1.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-64-2.zip", + "https://github.com/unicode-org/icu/archive/release-64-2.zip", ], build_file = "//third_party/icu:BUILD.bzl", + patches = ["//third_party/icu:udata.patch"], + patch_args = ["-p1"], ) http_archive( diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index e3a4d026b..6e79c2573 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -14,53 +14,62 @@ #include "tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h" +#include #include +#include "icu4c/source/common/unicode/appendable.h" +#include "icu4c/source/common/unicode/bytestream.h" +#include "icu4c/source/common/unicode/edits.h" +#include "icu4c/source/common/unicode/normalizer2.h" +#include "icu4c/source/common/unicode/schriter.h" +#include "icu4c/source/common/unicode/stringoptions.h" +#include "icu4c/source/common/unicode/stringpiece.h" #include "icu4c/source/common/unicode/uchar.h" +#include "icu4c/source/common/unicode/ucnv.h" +#include "icu4c/source/common/unicode/ucnv_err.h" #include "icu4c/source/common/unicode/umachine.h" #include "icu4c/source/common/unicode/uniset.h" +#include "icu4c/source/common/unicode/unistr.h" #include "icu4c/source/common/unicode/uset.h" +#include "icu4c/source/common/unicode/utf.h" #include "icu4c/source/common/unicode/utf8.h" #include "icu4c/source/common/unicode/utypes.h" namespace tensorflow { namespace text { -namespace { - -const icu::UnicodeSet& WhiteSpaceSet() { - // Will not fail because the data is hardcoded in the ICU library. - UErrorCode error_code = U_ZERO_ERROR; - const USet* c_set = u_getBinaryPropertySet(UCHAR_WHITE_SPACE, &error_code); - // assert(U_SUCCESS(error_code)); - const icu::UnicodeSet* set = icu::UnicodeSet::fromUSet(c_set); - return *set; -} - -} // namespace - std::string BuildWhitespaceString() { - std::string str; - char buf[U8_MAX_LENGTH]; - for (auto cp : WhiteSpaceSet().codePoints()) { - int len = 0; - U8_APPEND_UNSAFE(buf, len, cp); - str.append(buf, len); + icu::UnicodeString unicode_string; + icu::UnicodeStringAppendable appendable_unicode_string(unicode_string); + // The maximum codepoint in Unicode is 0x0010FFFF. + for (UChar32 cp = 0; cp <= 0x0010FFFF; ++cp) { + if (U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp)) { + appendable_unicode_string.appendCodePoint(cp); + } } + std::string str; + unicode_string.toUTF8String(str); return str; } std::string BuildWhitespaceTokenizerConfig() { - const icu::UnicodeSet& set = WhiteSpaceSet(); - int range_count = set.getRangeCount(); - UChar32 largest_whitespace = set.getRangeEnd(range_count - 1); + // The maximum codepoint in Unicode is 0x0010FFFF. + UChar32 max_unicode_char = 0x0010FFFF; // The string will hold our bit array - std::string bitset((largest_whitespace >> 3) + 1, 0); - for (auto cp : set.codePoints()) { - int index = cp >> 3; - bitset[index] |= 1 << (cp & 7); + std::string bitset((max_unicode_char >> 3) + 1, 0); + auto bitdata = bitset.begin(); + UChar32 largest_whitespace = 0; + int shift = 0; + for (UChar32 cp = 0; cp <= max_unicode_char; ++cp, ++shift) { + if (shift == 8) { + ++bitdata; + shift = 0; + } + bool is_whitespace = U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp); + largest_whitespace = is_whitespace ? cp : largest_whitespace; + *bitdata |= is_whitespace << shift; } - return bitset; + return bitset.substr(0, (largest_whitespace >> 3) + 1); } } // namespace text From e77f32a004eaef4facad39fe0a2649754c1bf314 Mon Sep 17 00:00:00 2001 From: "TF.Text Team" Date: Wed, 2 Jul 2025 09:37:46 -0700 Subject: [PATCH 13/19] iterate over Unicode White_Space directly, rather than testing each of 1.1M code points #Cleanup PiperOrigin-RevId: 778538165 --- .../whitespace_tokenizer_config_builder.cc | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index 6e79c2573..e3a4d026b 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -14,62 +14,53 @@ #include "tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h" -#include #include -#include "icu4c/source/common/unicode/appendable.h" -#include "icu4c/source/common/unicode/bytestream.h" -#include "icu4c/source/common/unicode/edits.h" -#include "icu4c/source/common/unicode/normalizer2.h" -#include "icu4c/source/common/unicode/schriter.h" -#include "icu4c/source/common/unicode/stringoptions.h" -#include "icu4c/source/common/unicode/stringpiece.h" #include "icu4c/source/common/unicode/uchar.h" -#include "icu4c/source/common/unicode/ucnv.h" -#include "icu4c/source/common/unicode/ucnv_err.h" #include "icu4c/source/common/unicode/umachine.h" #include "icu4c/source/common/unicode/uniset.h" -#include "icu4c/source/common/unicode/unistr.h" #include "icu4c/source/common/unicode/uset.h" -#include "icu4c/source/common/unicode/utf.h" #include "icu4c/source/common/unicode/utf8.h" #include "icu4c/source/common/unicode/utypes.h" namespace tensorflow { namespace text { +namespace { + +const icu::UnicodeSet& WhiteSpaceSet() { + // Will not fail because the data is hardcoded in the ICU library. + UErrorCode error_code = U_ZERO_ERROR; + const USet* c_set = u_getBinaryPropertySet(UCHAR_WHITE_SPACE, &error_code); + // assert(U_SUCCESS(error_code)); + const icu::UnicodeSet* set = icu::UnicodeSet::fromUSet(c_set); + return *set; +} + +} // namespace + std::string BuildWhitespaceString() { - icu::UnicodeString unicode_string; - icu::UnicodeStringAppendable appendable_unicode_string(unicode_string); - // The maximum codepoint in Unicode is 0x0010FFFF. - for (UChar32 cp = 0; cp <= 0x0010FFFF; ++cp) { - if (U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp)) { - appendable_unicode_string.appendCodePoint(cp); - } - } std::string str; - unicode_string.toUTF8String(str); + char buf[U8_MAX_LENGTH]; + for (auto cp : WhiteSpaceSet().codePoints()) { + int len = 0; + U8_APPEND_UNSAFE(buf, len, cp); + str.append(buf, len); + } return str; } std::string BuildWhitespaceTokenizerConfig() { - // The maximum codepoint in Unicode is 0x0010FFFF. - UChar32 max_unicode_char = 0x0010FFFF; + const icu::UnicodeSet& set = WhiteSpaceSet(); + int range_count = set.getRangeCount(); + UChar32 largest_whitespace = set.getRangeEnd(range_count - 1); // The string will hold our bit array - std::string bitset((max_unicode_char >> 3) + 1, 0); - auto bitdata = bitset.begin(); - UChar32 largest_whitespace = 0; - int shift = 0; - for (UChar32 cp = 0; cp <= max_unicode_char; ++cp, ++shift) { - if (shift == 8) { - ++bitdata; - shift = 0; - } - bool is_whitespace = U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp); - largest_whitespace = is_whitespace ? cp : largest_whitespace; - *bitdata |= is_whitespace << shift; + std::string bitset((largest_whitespace >> 3) + 1, 0); + for (auto cp : set.codePoints()) { + int index = cp >> 3; + bitset[index] |= 1 << (cp & 7); } - return bitset.substr(0, (largest_whitespace >> 3) + 1); + return bitset; } } // namespace text From 32a403f2cc2564752a8b39abcabd14f566c0d227 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 13 Nov 2025 20:07:47 +0000 Subject: [PATCH 14/19] Revert "return the old version of the ICU" This reverts commit d4cdf0dfc13f40d1fc543415727a6d616dfa5111. --- WORKSPACE | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index eb6075f8e..e071041e3 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,15 +4,13 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "icu", - strip_prefix = "icu-release-64-2", - sha256 = "dfc62618aa4bd3ca14a3df548cd65fe393155edd213e49c39f3a30ccd618fc27", + strip_prefix = "icu-release-77-1", + sha256 = "e424ba5282d95ad38b52639a08fb82164f0b0cbd7f17b53ae16bf14f8541855f", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-64-2.zip", - "https://github.com/unicode-org/icu/archive/release-64-2.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-77-1.zip", + "https://github.com/unicode-org/icu/archive/release-77-1.zip", ], build_file = "//third_party/icu:BUILD.bzl", - patches = ["//third_party/icu:udata.patch"], - patch_args = ["-p1"], ) http_archive( From e60dce302d2eff429f7de3cda3defa970526ce5b Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 13 Nov 2025 20:53:17 +0000 Subject: [PATCH 15/19] Revert "Revert "return the old version of the ICU"" This reverts commit 32a403f2cc2564752a8b39abcabd14f566c0d227. --- WORKSPACE | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e071041e3..eb6075f8e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,13 +4,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "icu", - strip_prefix = "icu-release-77-1", - sha256 = "e424ba5282d95ad38b52639a08fb82164f0b0cbd7f17b53ae16bf14f8541855f", + strip_prefix = "icu-release-64-2", + sha256 = "dfc62618aa4bd3ca14a3df548cd65fe393155edd213e49c39f3a30ccd618fc27", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-77-1.zip", - "https://github.com/unicode-org/icu/archive/release-77-1.zip", + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-64-2.zip", + "https://github.com/unicode-org/icu/archive/release-64-2.zip", ], build_file = "//third_party/icu:BUILD.bzl", + patches = ["//third_party/icu:udata.patch"], + patch_args = ["-p1"], ) http_archive( From 082ce5a8c3da394561c2355ea00a5a9036caada0 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Wed, 19 Nov 2025 10:36:18 -0500 Subject: [PATCH 16/19] Revert "iterate over Unicode White_Space directly, rather than testing each of 1.1M code points" This reverts commit e77f32a004eaef4facad39fe0a2649754c1bf314. --- .../whitespace_tokenizer_config_builder.cc | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc index e3a4d026b..6e79c2573 100644 --- a/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.cc @@ -14,53 +14,62 @@ #include "tensorflow_text/core/kernels/whitespace_tokenizer_config_builder.h" +#include #include +#include "icu4c/source/common/unicode/appendable.h" +#include "icu4c/source/common/unicode/bytestream.h" +#include "icu4c/source/common/unicode/edits.h" +#include "icu4c/source/common/unicode/normalizer2.h" +#include "icu4c/source/common/unicode/schriter.h" +#include "icu4c/source/common/unicode/stringoptions.h" +#include "icu4c/source/common/unicode/stringpiece.h" #include "icu4c/source/common/unicode/uchar.h" +#include "icu4c/source/common/unicode/ucnv.h" +#include "icu4c/source/common/unicode/ucnv_err.h" #include "icu4c/source/common/unicode/umachine.h" #include "icu4c/source/common/unicode/uniset.h" +#include "icu4c/source/common/unicode/unistr.h" #include "icu4c/source/common/unicode/uset.h" +#include "icu4c/source/common/unicode/utf.h" #include "icu4c/source/common/unicode/utf8.h" #include "icu4c/source/common/unicode/utypes.h" namespace tensorflow { namespace text { -namespace { - -const icu::UnicodeSet& WhiteSpaceSet() { - // Will not fail because the data is hardcoded in the ICU library. - UErrorCode error_code = U_ZERO_ERROR; - const USet* c_set = u_getBinaryPropertySet(UCHAR_WHITE_SPACE, &error_code); - // assert(U_SUCCESS(error_code)); - const icu::UnicodeSet* set = icu::UnicodeSet::fromUSet(c_set); - return *set; -} - -} // namespace - std::string BuildWhitespaceString() { - std::string str; - char buf[U8_MAX_LENGTH]; - for (auto cp : WhiteSpaceSet().codePoints()) { - int len = 0; - U8_APPEND_UNSAFE(buf, len, cp); - str.append(buf, len); + icu::UnicodeString unicode_string; + icu::UnicodeStringAppendable appendable_unicode_string(unicode_string); + // The maximum codepoint in Unicode is 0x0010FFFF. + for (UChar32 cp = 0; cp <= 0x0010FFFF; ++cp) { + if (U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp)) { + appendable_unicode_string.appendCodePoint(cp); + } } + std::string str; + unicode_string.toUTF8String(str); return str; } std::string BuildWhitespaceTokenizerConfig() { - const icu::UnicodeSet& set = WhiteSpaceSet(); - int range_count = set.getRangeCount(); - UChar32 largest_whitespace = set.getRangeEnd(range_count - 1); + // The maximum codepoint in Unicode is 0x0010FFFF. + UChar32 max_unicode_char = 0x0010FFFF; // The string will hold our bit array - std::string bitset((largest_whitespace >> 3) + 1, 0); - for (auto cp : set.codePoints()) { - int index = cp >> 3; - bitset[index] |= 1 << (cp & 7); + std::string bitset((max_unicode_char >> 3) + 1, 0); + auto bitdata = bitset.begin(); + UChar32 largest_whitespace = 0; + int shift = 0; + for (UChar32 cp = 0; cp <= max_unicode_char; ++cp, ++shift) { + if (shift == 8) { + ++bitdata; + shift = 0; + } + bool is_whitespace = U_IS_UNICODE_CHAR(cp) && u_isUWhiteSpace(cp); + largest_whitespace = is_whitespace ? cp : largest_whitespace; + *bitdata |= is_whitespace << shift; } - return bitset; + return bitset.substr(0, (largest_whitespace >> 3) + 1); } } // namespace text From 7b58334b7d598866785805f37b154cdc9798951e Mon Sep 17 00:00:00 2001 From: Ruslan Date: Wed, 19 Nov 2025 15:41:46 -0500 Subject: [PATCH 17/19] Code state when build whl has issue with lib double registration --- oss_scripts/configure.sh | 2 +- oss_scripts/run_build.sh | 2 +- .../pywrap_fast_bert_normalizer_model_builder.cc | 2 +- ...wrap_fast_wordpiece_tokenizer_model_builder.cc | 2 +- .../core/pybinds/pywrap_model_converter.cc | 2 +- .../pywrap_phrase_tokenizer_model_builder.cc | 2 +- .../pywrap_whitespace_tokenizer_config_builder.cc | 2 +- tensorflow_text/tftext.bzl | 15 ++++++++++++--- 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/oss_scripts/configure.sh b/oss_scripts/configure.sh index efcf8a249..08d748662 100755 --- a/oss_scripts/configure.sh +++ b/oss_scripts/configure.sh @@ -86,4 +86,4 @@ 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" \ No newline at end of file +#write_to_bazelrc "build --define=with_tflite_ops=true" 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/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_fast_bert_normalizer_model_builder.cc index 0df5eac64..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 @@ -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_wordpiece_tokenizer_model_builder.cc b/tensorflow_text/core/pybinds/pywrap_fast_wordpiece_tokenizer_model_builder.cc index 0980a13d9..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 @@ -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_model_converter.cc b/tensorflow_text/core/pybinds/pywrap_model_converter.cc index ad66949c0..5fcc3c8aa 100644 --- a/tensorflow_text/core/pybinds/pywrap_model_converter.cc +++ b/tensorflow_text/core/pybinds/pywrap_model_converter.cc @@ -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 118608def..88198e362 100644 --- a/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_phrase_tokenizer_model_builder.cc @@ -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_whitespace_tokenizer_config_builder.cc b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc index a76bcff22..c63aaadd8 100644 --- a/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc +++ b/tensorflow_text/core/pybinds/pywrap_whitespace_tokenizer_config_builder.cc @@ -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/tftext.bzl b/tensorflow_text/tftext.bzl index f122e8bce..1b7f37eee 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 = [] @@ -154,7 +155,7 @@ def tf_cc_library( "@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite", ], "//conditions:default": [ - "@release_or_nightly//:tensorflow_libtensorflow_framework", + # "@release_or_nightly//:tensorflow_libtensorflow_framework", # Commented out this line "@release_or_nightly//:tensorflow_tf_header_lib", ] + tf_deps + oss_deps, }) @@ -167,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( @@ -215,7 +220,7 @@ def tflite_cc_library( "@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite", ], "//conditions:default": [ - "@release_or_nightly//:tensorflow_libtensorflow_framework", + # "@release_or_nightly//:tensorflow_libtensorflow_framework", # Commented out this line "@release_or_nightly//:tensorflow_tf_header_lib", ] + oss_deps, }) @@ -228,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(): From bfdc8c72ad338030d8776dceb0ac26c2e8f820fb Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 21 Nov 2025 21:28:18 +0000 Subject: [PATCH 18/19] Changes in the header. Need to validate properly --- tensorflow_text/tftext.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow_text/tftext.bzl b/tensorflow_text/tftext.bzl index 1b7f37eee..5fd352d41 100644 --- a/tensorflow_text/tftext.bzl +++ b/tensorflow_text/tftext.bzl @@ -155,9 +155,9 @@ def tf_cc_library( "@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite", ], "//conditions:default": [ - # "@release_or_nightly//:tensorflow_libtensorflow_framework", # Commented out this line + "@release_or_nightly//:tensorflow_libtensorflow_framework", "@release_or_nightly//:tensorflow_tf_header_lib", - ] + tf_deps + oss_deps, + ] + oss_deps, }) native.cc_library( name = name, @@ -220,7 +220,7 @@ def tflite_cc_library( "@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite", ], "//conditions:default": [ - # "@release_or_nightly//:tensorflow_libtensorflow_framework", # Commented out this line + "@release_or_nightly//:tensorflow_libtensorflow_framework", "@release_or_nightly//:tensorflow_tf_header_lib", ] + oss_deps, }) From 2b3ee8c1994374db75c3cdf8f3a7dea4a51fe1ac Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 4 Dec 2025 19:29:13 -0500 Subject: [PATCH 19/19] Fix the protobuf build issue --- WORKSPACE | 14 ++ oss_scripts/BUILD | 4 + oss_scripts/protobuf.patch | 197 ++++++++++++++++++++++++ tensorflow_text/core/pybinds/BUILD | 230 ++++++++++++++++++++--------- 4 files changed, 372 insertions(+), 73 deletions(-) create mode 100644 oss_scripts/BUILD create mode 100644 oss_scripts/protobuf.patch diff --git a/WORKSPACE b/WORKSPACE index eb6075f8e..477d3b31f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -89,6 +89,20 @@ http_archive( url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz", ) +http_archive( + name = "com_google_protobuf", + sha256 = "f645e6e42745ce922ca5388b1883ca583bafe4366cc74cf35c3c9299005136e2", + strip_prefix = "protobuf-5.28.3", + urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v5.28.3.zip"], + patches = ["//oss_scripts:protobuf.patch"], + patch_args = ["-p1"], + patch_cmds = [ + "sed -i 's/name[[:space:]]*=[[:space:]]*\"eg\",/name = \"eg\", features = [\"-layering_check\"],/g' src/google/protobuf/compiler/java/full/BUILD.bazel", + "sed -i 's/\"names.h\",/\"names.h\", \"generator.h\",/g' src/google/protobuf/compiler/java/BUILD.bazel", + "grep \"layering_check\" src/google/protobuf/compiler/java/full/BUILD.bazel || exit 1", + ], +) + # Initialize hermetic Python load("@org_tensorflow//third_party/py:python_init_rules.bzl", "python_init_rules") diff --git a/oss_scripts/BUILD b/oss_scripts/BUILD new file mode 100644 index 000000000..5aa262f4c --- /dev/null +++ b/oss_scripts/BUILD @@ -0,0 +1,4 @@ +# This file makes the directory a Bazel package. +package(default_visibility = ["//visibility:public"]) + +exports_files(["protobuf.patch"]) diff --git a/oss_scripts/protobuf.patch b/oss_scripts/protobuf.patch new file mode 100644 index 000000000..502c679f6 --- /dev/null +++ b/oss_scripts/protobuf.patch @@ -0,0 +1,197 @@ +--- a/src/google/protobuf/map_field.h ++++ b/src/google/protobuf/map_field.h +@@ -710,7 +710,7 @@ + typedef MapField MapFieldType; + }; + +-class PROTOBUF_EXPORT DynamicMapField final ++class DynamicMapField final + : public TypeDefinedMapFieldBase { + public: + explicit DynamicMapField(const Message* default_entry); +diff --git a/build_defs/BUILD.bazel b/build_defs/BUILD.bazel +--- a/build_defs/BUILD.bazel ++++ b/build_defs/BUILD.bazel +@@ -1,6 +1,7 @@ + # Internal Starlark definitions for Protobuf. + + load("@bazel_skylib//lib:selects.bzl", "selects") ++load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") + load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") + load("//bazel:cc_proto_library.bzl", starlark_cc_proto_library = "cc_proto_library") + load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test") +@@ -13,6 +14,20 @@ + ], + ) + ++bool_flag( ++ name = "use_dlls", ++ build_setting_default = False, ++ visibility = ["//visibility:public"], ++) ++ ++config_setting( ++ name = "config_use_dlls", ++ flag_values = { ++ ":use_dlls": "True", ++ }, ++ visibility = ["//visibility:public"], ++) ++ + create_compiler_config_setting( + name = "config_msvc_cl", + value = "msvc-cl", +diff --git a/python/dist/system_python.bzl b/python/dist/system_python.bzl +--- a/python/dist/system_python.bzl ++++ b/python/dist/system_python.bzl +@@ -73,11 +73,10 @@ + load("@bazel_skylib//rules:common_settings.bzl", "string_flag") + load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") + +-cc_library( +- name = "python_headers", +- hdrs = glob(["python/**/*.h"], allow_empty = True), +- includes = ["python"], +- visibility = ["//visibility:public"], ++alias( ++ name = "python_headers", ++ actual = "@python//:python_headers", ++ visibility = ["//visibility:public"], + ) + + string_flag( +@@ -219,7 +218,7 @@ + python3 = repository_ctx.which("python3") + python_version = _get_python_version(repository_ctx) + +- if path and python_version[0] == "3": ++ if False: + _populate_package(repository_ctx, path, python3, python_version) + else: + # buildifier: disable=print +diff --git a/src/google/protobuf/arena.cc b/src/google/protobuf/arena.cc +--- a/src/google/protobuf/arena.cc ++++ b/src/google/protobuf/arena.cc +@@ -554,7 +554,7 @@ + new internal::ThreadLocalStorage(); + return *thread_cache_->Get(); + } +-#elif defined(PROTOBUF_USE_DLLS) && defined(_WIN32) ++#elif defined(_WIN32) + ThreadSafeArena::ThreadCache& ThreadSafeArena::thread_cache() { + static PROTOBUF_THREAD_LOCAL ThreadCache thread_cache; + return thread_cache; +diff --git a/BUILD.bazel b/BUILD.bazel +--- a/BUILD.bazel ++++ b/BUILD.bazel +@@ -424,7 +424,8 @@ + "//:cpp_features_proto", + "//:descriptor_proto", + ], +- command_line = "--cpp_out=$(OUT)", ++ command_line = "--cpp_out=dllexport_decl=PROTOBUF_EXPORT:$(OUT)", ++# command_line = "--cpp_out=$(OUT)", + runtime = "//src/google/protobuf", + visibility = ["//visibility:public"], + ) +diff --git a/src/google/protobuf/io/BUILD.bazel b/src/google/protobuf/io/BUILD.bazel +--- a/src/google/protobuf/io/BUILD.bazel ++++ b/src/google/protobuf/io/BUILD.bazel +@@ -22,6 +22,13 @@ + "zero_copy_stream_impl.h", + "zero_copy_stream_impl_lite.h", + ], ++ local_defines = select({ ++ "//build_defs:config_use_dlls": [ ++ "PROTOBUF_USE_DLLS", ++ "LIBPROTOBUF_EXPORTS", ++ ], ++ "//conditions:default": [], ++ }), + copts = COPTS, + strip_include_prefix = "/src", + deps = [ +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc +--- a/src/google/protobuf/port_def.inc ++++ b/src/google/protobuf/port_def.inc +@@ -456,7 +456,7 @@ + #endif + + // Lexan sets both MSV_VER and clang, so handle it with the clang path. +-#if defined(_MSC_VER) && !defined(__clang__) ++#if defined(_MSC_VER) + // MSVC 17 currently seems to raise an error about constant-initialized pointers. + # if PROTOBUF_MSC_VER_MIN(1930) + # define PROTOBUF_CONSTINIT +diff --git a/src/google/protobuf/thread_safe_arena.h b/src/google/protobuf/thread_safe_arena.h +--- a/src/google/protobuf/thread_safe_arena.h ++++ b/src/google/protobuf/thread_safe_arena.h +@@ -248,7 +248,7 @@ + // iOS does not support __thread keyword so we use a custom thread local + // storage class we implemented. + static ThreadCache& thread_cache(); +-#elif defined(PROTOBUF_USE_DLLS) && defined(_WIN32) ++#elif defined(_WIN32) + // Thread local variables cannot be exposed through MSVC DLL interface but we + // can wrap them in static functions. + static ThreadCache& thread_cache(); +diff --git a/src/google/protobuf/BUILD.bazel b/src/google/protobuf/BUILD.bazel +--- a/src/google/protobuf/BUILD.bazel ++++ b/src/google/protobuf/BUILD.bazel +@@ -411,6 +411,13 @@ + "serial_arena.h", + "thread_safe_arena.h", + ], ++ local_defines = select({ ++ "//build_defs:config_use_dlls": [ ++ "PROTOBUF_USE_DLLS", ++ "LIBPROTOBUF_EXPORTS", ++ ], ++ "//conditions:default": [], ++ }), + strip_include_prefix = "/src", + visibility = [ + "//:__subpackages__", +@@ -509,7 +516,15 @@ + "serial_arena.h", + "thread_safe_arena.h", + "wire_format_lite.h", ++ "port.h", + ], ++ local_defines = select({ ++ "//build_defs:config_use_dlls": [ ++ "PROTOBUF_USE_DLLS", ++ "LIBPROTOBUF_EXPORTS", ++ ], ++ "//conditions:default": [], ++ }), + copts = COPTS + select({ + "//build_defs:config_msvc": [], + "//conditions:default": [ +@@ -615,6 +630,13 @@ + ], + hdrs = PROTOBUF_HEADERS, + copts = COPTS, ++ local_defines = select({ ++ "//build_defs:config_use_dlls": [ ++ "PROTOBUF_USE_DLLS", ++ "LIBPROTOBUF_EXPORTS", ++ ], ++ "//conditions:default": [], ++ }), + linkopts = LINK_OPTS, + strip_include_prefix = "/src", + visibility = [ +diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py +--- a/python/google/protobuf/__init__.py ++++ b/python/google/protobuf/__init__.py +@@ -8,3 +8,9 @@ + # Copyright 2007 Google Inc. All Rights Reserved. + + __version__ = '5.28.3' ++ ++if __name__ != '__main__': ++ try: ++ __import__('pkg_resources').declare_namespace(__name__) ++ except ImportError: ++ __path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/tensorflow_text/core/pybinds/BUILD b/tensorflow_text/core/pybinds/BUILD index 083c6ea8f..ba99cc017 100644 --- a/tensorflow_text/core/pybinds/BUILD +++ b/tensorflow_text/core/pybinds/BUILD @@ -1,113 +1,197 @@ -package(default_visibility = ["//visibility:public"]) +# Code that exposes C++ libraries to Python via pybind11. + +# Placeholder: load py_test +load("@org_tensorflow//tensorflow:tensorflow.bzl", "pybind_extension") licenses(["notice"]) exports_files(["__init__.py"]) -cc_binary( - name = "_pywrap_fast_bert_normalizer_model_builder.so", - srcs = ["pywrap_fast_bert_normalizer_model_builder.cc"], +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 = [ - "//tensorflow_text/core/kernels:fast_bert_normalizer_model_builder", - "@pybind11//:pybind11", + "@pybind11", + # lite:framework tensorflow dep, + # lite/c:common tensorflow dep, + # lite/kernels:builtin_ops tensorflow dep, + "//tensorflow_text/core/kernels:tflite_ops", ], - linkshared = 1, - copts = ["-fPIC"], ) -py_library( +pybind_extension( name = "pywrap_fast_bert_normalizer_model_builder", - srcs = [], - data = [":_pywrap_fast_bert_normalizer_model_builder.so"], - visibility = ["//visibility:public"], + 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", + ], ) -cc_binary( - name = "_pywrap_fast_wordpiece_tokenizer_model_builder.so", - srcs = ["pywrap_fast_wordpiece_tokenizer_model_builder.cc"], +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 = [ - "//tensorflow_text/core/kernels:fast_wordpiece_tokenizer_model_builder", - "@pybind11//:pybind11", + ":pywrap_fast_bert_normalizer_model_builder", + "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep ], - linkshared = 1, - copts = ["-fPIC"], ) -py_library( +pybind_extension( 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"], + 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/sentencepiece:model_converter", - "@pybind11//:pybind11", + "//tensorflow_text/core/kernels:fast_wordpiece_tokenizer_model_builder", + "@pybind11", ], - linkshared = 1, - copts = ["-fPIC"], ) -py_library( - name = "pywrap_model_converter", - srcs = [], - data = [":_pywrap_model_converter.so"], - visibility = ["//visibility:public"], +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", + ], + deps = [ + ":pywrap_fast_wordpiece_tokenizer_model_builder", + "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep + ], ) -cc_binary( - name = "_pywrap_phrase_tokenizer_model_builder.so", +pybind_extension( + name = "pywrap_phrase_tokenizer_model_builder", 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_library( - name = "pywrap_phrase_tokenizer_model_builder", - srcs = [], - data = [":_pywrap_phrase_tokenizer_model_builder.so"], - visibility = ["//visibility:public"], +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 + ], ) -cc_binary( - name = "_pywrap_whitespace_tokenizer_config_builder.so", - srcs = ["pywrap_whitespace_tokenizer_config_builder.cc"], +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", + ], deps = [ - "//tensorflow_text/core/kernels:whitespace_tokenizer_config_builder", - "@pybind11//:pybind11", + "//tensorflow_text/core/kernels/sentencepiece:model_converter", + "@pybind11", ], - linkshared = 1, - copts = ["-fPIC"], ) -py_library( +pybind_extension( name = "pywrap_whitespace_tokenizer_config_builder", - srcs = [], - data = [":_pywrap_whitespace_tokenizer_config_builder.so"], - visibility = ["//visibility:public"], -) - -cc_binary( - name = "_tflite_registrar.so", - srcs = ["tflite_registrar.cc"], + 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:tflite_ops", - "@pybind11//:pybind11", + "//tensorflow_text/core/kernels:whitespace_tokenizer_config_builder", + "@pybind11", ], - linkshared = 1, - copts = ["-fPIC"], ) -py_library( - name = "tflite_registrar", - srcs = [], - data = [":_tflite_registrar.so"], - visibility = ["//visibility:public"], -) +py_test( + name = "pywrap_whitespace_tokenizer_config_builder_test", + srcs = ["pywrap_whitespace_tokenizer_config_builder_test.py"], + deps = [ + ":pywrap_whitespace_tokenizer_config_builder", + "@release_or_nightly//:tensorflow_pkg", # tensorflow package dep + ], +) \ No newline at end of file