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 17 #ifndef LIBTEXTCLASSIFIER_ANNOTATOR_COLLECTIONS_H_ 18 #define LIBTEXTCLASSIFIER_ANNOTATOR_COLLECTIONS_H_ 19 20 #include <string> 21 22 namespace libtextclassifier3 { 23 24 // String collection names for various classes. 25 class Collections { 26 public: Address()27 static const std::string& Address() { 28 static const std::string& value = 29 *[]() { return new std::string("address"); }(); 30 return value; 31 } App()32 static const std::string& App() { 33 static const std::string& value = 34 *[]() { return new std::string("app"); }(); 35 return value; 36 } Contact()37 static const std::string& Contact() { 38 static const std::string& value = 39 *[]() { return new std::string("contact"); }(); 40 return value; 41 } Date()42 static const std::string& Date() { 43 static const std::string& value = 44 *[]() { return new std::string("date"); }(); 45 return value; 46 } DateTime()47 static const std::string& DateTime() { 48 static const std::string& value = 49 *[]() { return new std::string("datetime"); }(); 50 return value; 51 } Dictionary()52 static const std::string& Dictionary() { 53 static const std::string& value = 54 *[]() { return new std::string("dictionary"); }(); 55 return value; 56 } Duration()57 static const std::string& Duration() { 58 static const std::string& value = 59 *[]() { return new std::string("duration"); }(); 60 return value; 61 } Email()62 static const std::string& Email() { 63 static const std::string& value = 64 *[]() { return new std::string("email"); }(); 65 return value; 66 } Entity()67 static const std::string& Entity() { 68 static const std::string& value = 69 *[]() { return new std::string("entity"); }(); 70 return value; 71 } Flight()72 static const std::string& Flight() { 73 static const std::string& value = 74 *[]() { return new std::string("flight"); }(); 75 return value; 76 } Iban()77 static const std::string& Iban() { 78 static const std::string& value = 79 *[]() { return new std::string("iban"); }(); 80 return value; 81 } Isbn()82 static const std::string& Isbn() { 83 static const std::string& value = 84 *[]() { return new std::string("isbn"); }(); 85 return value; 86 } Money()87 static const std::string& Money() { 88 static const std::string& value = 89 *[]() { return new std::string("money"); }(); 90 return value; 91 } Unit()92 static const std::string& Unit() { 93 static const std::string& value = 94 *[]() { return new std::string("unit"); }(); 95 return value; 96 } Number()97 static const std::string& Number() { 98 static const std::string& value = 99 *[]() { return new std::string("number"); }(); 100 return value; 101 } Other()102 static const std::string& Other() { 103 static const std::string& value = 104 *[]() { return new std::string("other"); }(); 105 return value; 106 } PaymentCard()107 static const std::string& PaymentCard() { 108 static const std::string& value = 109 *[]() { return new std::string("payment_card"); }(); 110 return value; 111 } Percentage()112 static const std::string& Percentage() { 113 static const std::string& value = 114 *[]() { return new std::string("percentage"); }(); 115 return value; 116 } PersonName()117 static const std::string& PersonName() { 118 static const std::string& value = 119 *[]() { return new std::string("person_name"); }(); 120 return value; 121 } Phone()122 static const std::string& Phone() { 123 static const std::string& value = 124 *[]() { return new std::string("phone"); }(); 125 return value; 126 } TrackingNumber()127 static const std::string& TrackingNumber() { 128 static const std::string& value = 129 *[]() { return new std::string("tracking_number"); }(); 130 return value; 131 } Translate()132 static const std::string& Translate() { 133 static const std::string& value = 134 *[]() { return new std::string("translate"); }(); 135 return value; 136 } Url()137 static const std::string& Url() { 138 static const std::string& value = 139 *[]() { return new std::string("url"); }(); 140 return value; 141 } OtpCode()142 static const std::string& OtpCode() { 143 static const std::string& value = 144 *[]() { return new std::string("otp_code"); }(); 145 return value; 146 } 147 }; 148 149 } // namespace libtextclassifier3 150 151 #endif // LIBTEXTCLASSIFIER_ANNOTATOR_COLLECTIONS_H_ 152