chromium/third_party/tflite_support/src/tensorflow_lite_support/cc/task/processor/regex_preprocessor.cc

/* Copyright 2021 The TensorFlow 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.
==============================================================================*/
#include "tensorflow_lite_support/cc/task/processor/regex_preprocessor.h"

#include "absl/status/status.h"  // from @com_google_absl
#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) {}

}  // namespace

/* static */
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) {}

}  // namespace processor
}  // namespace task
}  // namespace tflite