Home
last modified time | relevance | path

Searched refs:LangId (Results 1 – 4 of 4) sorted by relevance

/external/libtextclassifier/lang_id/
Dlang-id.h42 class LangId {
51 explicit LangId(const std::string &filename);
54 explicit LangId(int fd);
57 explicit LangId(const char *ptr, size_t length);
59 virtual ~LangId();
105 TC_DISALLOW_COPY_AND_ASSIGN(LangId);
Dlang-id.cc350 LangId::LangId(const std::string &filename) : pimpl_(new LangIdImpl(filename)) { in LangId() function in libtextclassifier::nlp_core::lang_id::LangId
359 LangId::LangId(int fd) : pimpl_(new LangIdImpl(fd)) { in LangId() function in libtextclassifier::nlp_core::lang_id::LangId
368 LangId::LangId(const char *ptr, size_t length) in LangId() function in libtextclassifier::nlp_core::lang_id::LangId
377 LangId::~LangId() = default;
379 void LangId::SetProbabilityThreshold(float threshold) { in SetProbabilityThreshold()
383 void LangId::SetDefaultLanguage(const std::string &lang) { in SetDefaultLanguage()
387 std::string LangId::FindLanguage(const std::string &text) const { in FindLanguage()
391 std::vector<std::pair<std::string, float>> LangId::FindLanguages( in FindLanguages()
396 bool LangId::is_valid() const { return pimpl_->is_valid(); } in is_valid()
398 int LangId::version() const { return pimpl_->version(); } in version()
/external/libtextclassifier/
Dtextclassifier_jni.cc29 using libtextclassifier::nlp_core::lang_id::LangId;
216 return reinterpret_cast<jlong>(new LangId(fd)); in Java_android_view_textclassifier_LangId_nativeNew()
248 LangId* lang_id = reinterpret_cast<LangId*>(ptr); in Java_android_view_textclassifier_LangId_nativeFindLanguages()
259 LangId* lang_id = reinterpret_cast<LangId*>(ptr); in Java_android_view_textclassifier_LangId_nativeClose()
265 std::unique_ptr<LangId> lang_id(new LangId(fd)); in Java_android_view_textclassifier_LangId_nativeGetVersion()
/external/libtextclassifier/tests/
Dlang-id_test.cc40 LangId *CreateLanguageDetector() { return new LangId(GetModelPath()); } in CreateLanguageDetector()
45 std::unique_ptr<LangId> lang_id(CreateLanguageDetector()); in TEST()
59 std::unique_ptr<LangId> lang_id(CreateLanguageDetector()); in TEST()
129 std::unique_ptr<LangId> lang_id(CreateLanguageDetector()); in CheckPredictionForGibberishStrings()