Move TextPreprocessing to "processors" folder.
PiperOrigin-RevId: 490532670
This commit is contained in:
committed by
Copybara-Service
parent
54d1744c8f
commit
bfa57310c4
@@ -59,3 +59,12 @@ mediapipe_proto_library(
|
||||
"//mediapipe/framework:calculator_proto",
|
||||
],
|
||||
)
|
||||
|
||||
mediapipe_proto_library(
|
||||
name = "text_preprocessing_graph_options_proto",
|
||||
srcs = ["text_preprocessing_graph_options.proto"],
|
||||
deps = [
|
||||
"//mediapipe/framework:calculator_options_proto",
|
||||
"//mediapipe/framework:calculator_proto",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Copyright 2022 The MediaPipe Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package mediapipe.tasks.components.processors.proto;
|
||||
|
||||
import "mediapipe/framework/calculator.proto";
|
||||
|
||||
message TextPreprocessingGraphOptions {
|
||||
extend mediapipe.CalculatorOptions {
|
||||
optional TextPreprocessingGraphOptions ext = 476978751;
|
||||
}
|
||||
|
||||
// The type of text preprocessor required for the TFLite model.
|
||||
enum PreprocessorType {
|
||||
UNSPECIFIED_PREPROCESSOR = 0;
|
||||
// Used for the BertPreprocessorCalculator.
|
||||
BERT_PREPROCESSOR = 1;
|
||||
// Used for the RegexPreprocessorCalculator.
|
||||
REGEX_PREPROCESSOR = 2;
|
||||
// Used for the TextToTensorCalculator.
|
||||
STRING_PREPROCESSOR = 3;
|
||||
}
|
||||
optional PreprocessorType preprocessor_type = 1;
|
||||
|
||||
// The maximum input sequence length for the TFLite model. Used with
|
||||
// BERT_PREPROCESSOR and REGEX_PREPROCESSOR.
|
||||
optional int32 max_seq_len = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user