#include "mediapipe/tasks/cc/text/utils/text_model_utils.h"
#include "absl/algorithm/container.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/substitute.h"
#include "mediapipe/tasks/cc/common.h"
#include "mediapipe/tasks/cc/components/processors/proto/text_model_type.pb.h"
#include "mediapipe/tasks/cc/core/model_resources.h"
#include "mediapipe/tasks/cc/metadata/metadata_extractor.h"
#include "tensorflow/lite/schema/schema_generated.h"
namespace mediapipe::tasks::text::utils {
namespace {
using ::mediapipe::tasks::components::processors::proto::TextModelType;
ModelResources;
ModelMetadataExtractor;
constexpr int kNumInputTensorsForBert = …;
constexpr int kNumInputTensorsForRegex = …;
constexpr int kNumInputTensorsForStringPreprocessor = …;
constexpr int kNumInputTensorsForUSE = …;
absl::StatusOr<TextModelType::ModelType> GetIntTensorModelType(
const ModelResources& model_resources, int num_input_tensors) { … }
absl::StatusOr<TextModelType::ModelType> GetStringTensorModelType(
const ModelResources& model_resources, int num_input_tensors) { … }
}
absl::StatusOr<TextModelType::ModelType> GetModelType(
const ModelResources& model_resources) { … }
}