Skip to content

Instantly share code, notes, and snippets.

@innermond
Created March 11, 2022 08:14
Show Gist options
  • Save innermond/de0c11e09d67ccc0bc2b21505130b4ee to your computer and use it in GitHub Desktop.
Save innermond/de0c11e09d67ccc0bc2b21505130b4ee to your computer and use it in GitHub Desktop.
elastic 8.1 search map corespondence between language codes and long names (from https://www.elastic.co/guide/en/machine-learning/8.1/ml-nlp-classify-text.html)
$lang = [
'af' => 'afrikaans',
'hr' => 'croatian',
'pa' => 'punjabi',
'am' => 'amharic',
'ht' => 'haitian',
'pl' => 'polish',
'ar' => 'arabic',
'hu' => 'hungarian',
'ps' => 'pashto',
'az' => 'azerbaijani',
'hy' => 'armenian',
'pt' => 'portuguese',
'be' => 'belarusian',
'id' => 'indonesian',
'ro' => 'romanian',
'bg' => 'bulgarian',
'ig' => 'igbo',
'ru' => 'russian',
'bg-latn' => 'bulgarian',
'is' => 'icelandic',
'ru-latn' => 'russian',
'bn' => 'bengali',
'it' => 'italian',
'sd' => 'sindhi',
'bs' => 'bosnian',
'iw' => 'hebrew',
'si' => 'sinhala',
'ca' => 'catalan',
'ja' => 'japanese',
'sk' => 'slovak',
'ceb' => 'cebuano',
'ja-latn' => 'japanese',
'sl' => 'slovenian',
'co' => 'corsican',
'jv' => 'javanese',
'sm' => 'samoan',
'cs' => 'czech',
'ka' => 'georgian',
'sn' => 'shona',
'cy' => 'welsh',
'kk' => 'kazakh',
'so' => 'somali',
'da' => 'danish',
'km' => 'central khmer',
'sq' => 'albanian',
'de' => 'german',
'kn' => 'kannada',
'sr' => 'serbian',
'el' => 'greek, modern',
'ko' => 'korean',
'st' => 'southern sotho',
'el-latn' => 'greek, modern',
'ku' => 'kurdish',
'su' => 'sundanese',
'en' => 'english',
'ky' => 'kirghiz',
'sv' => 'swedish',
'eo' => 'esperanto',
'la' => 'latin',
'sw' => 'swahili',
'es' => 'spanish, castilian',
'lb' => 'luxembourgish',
'ta' => 'tamil',
'et' => 'estonian',
'lo' => 'lao',
'te' => 'telugu',
'eu' => 'basque',
'lt' => 'lithuanian',
'tg' => 'tajik',
'fa' => 'persian',
'lv' => 'latvian',
'th' => 'thai',
'fi' => 'finnish',
'mg' => 'malagasy',
'tr' => 'turkish',
'fil' => 'filipino',
'mi' => 'maori',
'uk' => 'ukrainian',
'fr' => 'french',
'mk' => 'macedonian',
'ur' => 'urdu',
'fy' => 'western frisian',
'ml' => 'malayalam',
'uz' => 'uzbek',
'ga' => 'irish',
'mn' => 'mongolian',
'vi' => 'vietnamese',
'gd' => 'gaelic',
'mr' => 'marathi',
'xh' => 'xhosa',
'gl' => 'galician',
'ms' => 'malay',
'yi' => 'yiddish',
'gu' => 'gujarati',
'mt' => 'maltese',
'yo' => 'yoruba',
'ha' => 'hausa',
'my' => 'burmese',
'zh' => 'chinese',
'haw' => 'hawaiian',
'ne' => 'nepali',
'zh-latn' => 'chinese',
'hi' => 'hindi',
'nl' => 'dutch, flemish',
'zu' => 'zulu',
'hi-latn' => 'hindi',
'no' => 'norwegian',
'hmn' => 'hmong',
'ny' => 'chichewa',
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment