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 NLP_SAFT_COMPONENTS_LANG_ID_MOBILE_LIGHT_SENTENCE_H_ 18 #define NLP_SAFT_COMPONENTS_LANG_ID_MOBILE_LIGHT_SENTENCE_H_ 19 20 #include <string> 21 #include <vector> 22 23 namespace libtextclassifier3 { 24 namespace mobile { 25 namespace lang_id { 26 27 // Very simplified alternative to heavy sentence.proto, for the purpose of 28 // LangId. It turns out that in this case, all we need is a vector of strings, 29 // which uses a lot less code size than a Sentence proto. 30 using LightSentence = std::vector<string>; 31 32 } // namespace lang_id 33 } // namespace mobile 34 } // namespace nlp_saft 35 36 #endif // NLP_SAFT_COMPONENTS_LANG_ID_MOBILE_LIGHT_SENTENCE_H_ 37