MCPcopy Create free account
hub / github.com/aboSamoor/pycld2 / LanguageRecognizedScript

Function LanguageRecognizedScript

cld2/internal/lang_script.cc:228–233  ·  view source on GitHub ↗

n is in 0..3. Trailing entries are filled with UNKNOWN_LANGUAGE (which never participates in language recognition)

Source from the content-addressed store, hash-verified

226// n is in 0..3. Trailing entries are filled with
227// UNKNOWN_LANGUAGE (which never participates in language recognition)
228ULScript LanguageRecognizedScript(Language lang, int n) {
229 int i_lang = lang;
230 if (i_lang < 0) {i_lang = UNKNOWN_LANGUAGE;}
231 if (i_lang >= NUM_LANGUAGES) {i_lang = UNKNOWN_LANGUAGE;}
232 return static_cast<ULScript>(kLanguageToScripts[i_lang][n]);
233}
234
235// Given the Language, returns its string name used as the output by
236// the lang/enc identifier, e.g. "Korean"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected