Files
mediapipe/mediapipe/tasks/cc/components/proto/text_preprocessing_graph_options.proto
T
2022-10-08 09:44:08 -07:00

43 lines
1.5 KiB
Protocol Buffer

/* 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.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;
}