chromium/third_party/coremltools/mlmodel/format/TextClassifier.proto

// Copyright (c) 2018, Apple Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-3-clause license that can be
// found in LICENSE.txt or at https://opensource.org/licenses/BSD-3-Clause

syntax = "proto3";
option optimize_for = LITE_RUNTIME;

import public "DataStructures.proto";

package CoreML.Specification.CoreMLModels;

/*
 * A model which takes a single input string and outputs a
 * label for the input.
 */
message TextClassifier {
  /*
   * Stores the resivion number for the model, revision 1 is available on
   * iOS, tvOS 12.0+, macoOS 10.14+
   */
  uint32 revision = 1;

  /*
   * Stores the language of the model, as specified in BCP-47 format,
   * e.g. "en-US". See https://tools.ietf.org/html/bcp47
   */
  string language = 10;

  /*
   * Stores the byte representation of learned model parameters
   */
  bytes modelParameterData = 100;

  /*
   * Stores the set of output class labels
   */
  oneof ClassLabels {
    StringVector stringClassLabels = 200;
  }
}