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 17file_identifier "TC2 "; 18 19// Next ID: 2 20namespace libtextclassifier3.PersonNameModel_; 21table PersonName { 22 // Person name which is considered by the person name annotator. This 23 // attribute should contain 'atomic' person names, e.g., 'John' and 'Doe' 24 // should be two separate person names. 25 // required 26 person_name:string (shared); 27} 28 29// Next ID: 6 30namespace libtextclassifier3; 31table PersonNameModel { 32 // Decides if the person name annotator is enabled. 33 // required 34 enabled:bool; 35 36 // List of all person names which are considered by the person name annotator. 37 person_names:[PersonNameModel_.PersonName]; 38 39 // Decides if the English genitive ending 's is stripped, e.g., if Peter's is 40 // stripped to Peter before looking for the name in the dictionary. required 41 strip_english_genitive_ending:bool; 42 43 // List of codepoints that are considered as 'end of person name' indicator in 44 // the heuristic to find the longest person name match. 45 // required 46 end_of_person_name_indicators:[int]; 47 48 // Decides if only capitalized names should be annotated. In general, a 49 // capitalized name starts with an uppercase character and continues with 50 // lower case characters. In order to capture names such as O'Conell and 51 // McFee, this heursistic considers names as capitalized if they start with an 52 // upper case character and have at least one lower case character. 53 // required 54 annotate_capitalized_names_only:bool; 55} 56 57root_type libtextclassifier3.PersonNameModel; 58