• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17include "annotator/model.fbs";
18
19file_identifier "TC2 ";
20
21// Next ID: 2
22namespace libtextclassifier3.PersonNameModel_;
23table PersonName {
24  // Person name which is considered by the person name annotator. This
25  // attribute should contain 'atomic' person names, e.g., 'John' and 'Doe'
26  // should be two separate person names.
27  // required
28  person_name:string (shared);
29}
30
31// Next ID: 7
32namespace libtextclassifier3;
33table PersonNameModel {
34  // Decides if the person name annotator is enabled.
35  // required
36  enabled:bool;
37
38  // List of all person names which are considered by the person name annotator.
39  person_names:[PersonNameModel_.PersonName];
40
41  // Decides if the English genitive ending 's is stripped, e.g., if Peter's is
42  // stripped to Peter before looking for the name in the dictionary. required
43  strip_english_genitive_ending:bool;
44
45  // List of codepoints that are considered as 'end of person name' indicator in
46  // the heuristic to find the longest person name match.
47  // required
48  end_of_person_name_indicators:[int];
49
50  // Decides if only capitalized names should be annotated. In general, a
51  // capitalized name starts with an uppercase character and continues with
52  // lower case characters. In order to capture names such as O'Conell and
53  // McFee, this heursistic considers names as capitalized if they start with an
54  // upper case character and have at least one lower case character.
55  // required
56  annotate_capitalized_names_only:bool;
57
58  // Enabled modes.
59  enabled_modes:ModeFlag = ALL;
60}
61
62root_type libtextclassifier3.PersonNameModel;
63