#include "tensorflow_lite_support/cc/task/processor/regex_preprocessor.h"
#include "absl/status/status.h"
#include "tensorflow_lite_support/cc/common.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/cc/task/core/task_utils.h"
namespace tflite {
namespace task {
namespace processor {
namespace {
StatusCode;
TensorMetadata;
CreateStatusWithPayload;
StatusOr;
TfLiteSupportStatus;
RegexTokenizer;
TokenizerResult;
PopulateTensor;
StatusOr<absl::string_view> CheckAndLoadFirstAssociatedFile(
const flatbuffers::Vector<flatbuffers::Offset<tflite::AssociatedFile>>*
associated_files,
const tflite::metadata::ModelMetadataExtractor* metadata_extractor) { … }
}
StatusOr<std::unique_ptr<RegexPreprocessor>> RegexPreprocessor::Create(
tflite::task::core::TfLiteEngine* engine, int input_tensor_index) { … }
absl::Status RegexPreprocessor::Init() { … }
StatusOr<const tflite::ProcessUnit*>
RegexPreprocessor::TryFindRegexTokenizerMetadata() { … }
StatusOr<std::unique_ptr<RegexTokenizer>>
RegexPreprocessor::CreateTokenizerFromMetadata(
const tflite::ProcessUnit* tokenizer_metadata,
const tflite::metadata::ModelMetadataExtractor* metadata_extractor) { … }
absl::Status RegexPreprocessor::Preprocess(const std::string& input_text) { … }
absl::Status RegexPreprocessor::RegexPreprocess(const std::string& input_text) { … }
}
}
}