diff --git a/tensorflow_text/core/kernels/BUILD b/tensorflow_text/core/kernels/BUILD index 252cc2b03..a5d1deb45 100644 --- a/tensorflow_text/core/kernels/BUILD +++ b/tensorflow_text/core/kernels/BUILD @@ -7,7 +7,10 @@ load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library") licenses(["notice"]) # Visibility rules -package(default_visibility = ["//visibility:public"]) +package(default_visibility = [ + "//inputmethod/keyboard:__subpackages__", + "//visibility:public", +]) exports_files(["LICENSE"]) diff --git a/tensorflow_text/core/ops/regex_split_ops.cc b/tensorflow_text/core/ops/regex_split_ops.cc index 14dda57e6..6aa5f4fac 100644 --- a/tensorflow_text/core/ops/regex_split_ops.cc +++ b/tensorflow_text/core/ops/regex_split_ops.cc @@ -19,7 +19,7 @@ namespace tensorflow { namespace text { -Status RegexSplitOpShape(shape_inference::InferenceContext* c) { +absl::Status RegexSplitOpShape(shape_inference::InferenceContext* c) { shape_inference::ShapeHandle unused; TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 1, &unused)); TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused)); diff --git a/tensorflow_text/core/ops/rouge_l_op.cc b/tensorflow_text/core/ops/rouge_l_op.cc index b84780674..9896697ec 100644 --- a/tensorflow_text/core/ops/rouge_l_op.cc +++ b/tensorflow_text/core/ops/rouge_l_op.cc @@ -21,7 +21,7 @@ using shape_inference::DimensionHandle; using shape_inference::InferenceContext; using shape_inference::ShapeHandle; -Status RougeLShapeFn(InferenceContext* c); +absl::Status RougeLShapeFn(InferenceContext* c); REGISTER_OP("RougeL") .Input("hyp_values: Tvalues") @@ -67,7 +67,7 @@ p_measure: a 1D Tensor of shape [S-1] containing LCS P-measure scores r_measure: a 1D Tensor of shape [S-1] containing LCS R-measure scores )doc"); -Status RougeLShapeFn(InferenceContext* c) { +absl::Status RougeLShapeFn(InferenceContext* c) { ShapeHandle unused; // Check rank of inner values diff --git a/tensorflow_text/core/ops/sentence_breaking_ops.cc b/tensorflow_text/core/ops/sentence_breaking_ops.cc index 1ed26b648..f27fda413 100644 --- a/tensorflow_text/core/ops/sentence_breaking_ops.cc +++ b/tensorflow_text/core/ops/sentence_breaking_ops.cc @@ -20,7 +20,7 @@ namespace tensorflow { namespace text { -Status SentenceFragmentShapeFn( +absl::Status SentenceFragmentShapeFn( ::tensorflow::shape_inference::InferenceContext* c) { for (int i = 0; i < c->num_outputs(); ++i) { c->set_output(i, c->UnknownShapeOfRank(1)); diff --git a/tensorflow_text/core/ops/split_merge_tokenize_op.cc b/tensorflow_text/core/ops/split_merge_tokenize_op.cc index 0afe2aa83..ce147fd60 100644 --- a/tensorflow_text/core/ops/split_merge_tokenize_op.cc +++ b/tensorflow_text/core/ops/split_merge_tokenize_op.cc @@ -23,7 +23,7 @@ using shape_inference::DimensionHandle; using shape_inference::InferenceContext; using shape_inference::ShapeHandle; -Status SplitMergeTokenizeWithOffsetsShapeFn(InferenceContext* c); +absl::Status SplitMergeTokenizeWithOffsetsShapeFn(InferenceContext* c); REGISTER_OP("SplitMergeTokenizeWithOffsets") .Input("input_values: string") @@ -76,7 +76,7 @@ REGISTER_OP("SplitMergeTokenizeWithOffsets") A 2D RaggedTensor can be constructed from this and output_row_splits. )doc"); -Status SplitMergeTokenizeWithOffsetsShapeFn(InferenceContext* c) { +absl::Status SplitMergeTokenizeWithOffsetsShapeFn(InferenceContext* c) { ShapeHandle input_values = c->input(0); ShapeHandle labels = c->input(1); ShapeHandle row_splits = c->input(2); diff --git a/tensorflow_text/core/ops/tokenizer_from_logits_op.cc b/tensorflow_text/core/ops/tokenizer_from_logits_op.cc index 9a5e22a66..49e59b09b 100644 --- a/tensorflow_text/core/ops/tokenizer_from_logits_op.cc +++ b/tensorflow_text/core/ops/tokenizer_from_logits_op.cc @@ -22,7 +22,7 @@ using shape_inference::DimensionHandle; using shape_inference::InferenceContext; using shape_inference::ShapeHandle; -Status TokenizerFromLogitsShapeFn(InferenceContext* c); +absl::Status TokenizerFromLogitsShapeFn(InferenceContext* c); REGISTER_OP("TokenizerFromLogits") .Input("strings: string") @@ -100,7 +100,7 @@ REGISTER_OP("TokenizerFromLogits") A 2D RaggedTensor can be constructed from this and row_splits. )doc"); -Status TokenizerFromLogitsShapeFn(InferenceContext* c) { +absl::Status TokenizerFromLogitsShapeFn(InferenceContext* c) { ShapeHandle strings = c->input(0); ShapeHandle logits = c->input(1); ShapeHandle force_split_at_break_character = c->input(2); diff --git a/tensorflow_text/core/ops/wordpiece_op.cc b/tensorflow_text/core/ops/wordpiece_op.cc index 5f158fe34..790a828fb 100644 --- a/tensorflow_text/core/ops/wordpiece_op.cc +++ b/tensorflow_text/core/ops/wordpiece_op.cc @@ -21,7 +21,7 @@ using shape_inference::DimensionHandle; using shape_inference::InferenceContext; using shape_inference::ShapeHandle; -Status WordpieceTokenizeWithOffsetsShapeFn(InferenceContext* c); +absl::Status WordpieceTokenizeWithOffsetsShapeFn(InferenceContext* c); REGISTER_OP("WordpieceTokenizeWithOffsets") .Input("input_values: string") @@ -90,7 +90,7 @@ REGISTER_OP("WordpieceTokenizeWithOffsets") A 2D RaggedTensor can be constructed from this and output_row_lengths. )doc"); -Status WordpieceTokenizeWithOffsetsShapeFn(InferenceContext* c) { +absl::Status WordpieceTokenizeWithOffsetsShapeFn(InferenceContext* c) { ShapeHandle input_values = c->input(0); ShapeHandle vocab_lookup_table = c->input(1); string output_row_partition_type; @@ -112,5 +112,4 @@ Status WordpieceTokenizeWithOffsetsShapeFn(InferenceContext* c) { return absl::OkStatus(); } - } // namespace tensorflow