#include "mediapipe/tasks/cc/text/tokenizers/tokenizer_utils.h"
#include <memory>
#include <string>
#include <utility>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "flatbuffers/flatbuffers.h"
#include "mediapipe/framework/port/status_macros.h"
#include "mediapipe/tasks/cc/common.h"
#include "mediapipe/tasks/cc/text/tokenizers/bert_tokenizer.h"
#include "mediapipe/tasks/cc/text/tokenizers/sentencepiece_tokenizer.h"
#include "mediapipe/tasks/metadata/metadata_schema_generated.h"
namespace mediapipe {
namespace tasks {
namespace text {
namespace tokenizers {
CreateStatusWithPayload;
MediaPipeTasksStatus;
namespace {
absl::StatusOr<absl::string_view> CheckAndLoadFirstAssociatedFile(
const flatbuffers::Vector<flatbuffers::Offset<tflite::AssociatedFile>>*
associated_files,
const metadata::ModelMetadataExtractor* metadata_extractor) { … }
}
absl::StatusOr<std::unique_ptr<RegexTokenizer>> CreateRegexTokenizerFromOptions(
const tflite::RegexTokenizerOptions* options,
const metadata::ModelMetadataExtractor* metadata_extractor) { … }
absl::StatusOr<std::unique_ptr<Tokenizer>> CreateTokenizerFromProcessUnit(
const tflite::ProcessUnit* tokenizer_process_unit,
const metadata::ModelMetadataExtractor* metadata_extractor) { … }
}
}
}
}