Skip to content

Commit

Permalink
db-common: [#9] ligvo languages and parts of speech
Browse files Browse the repository at this point in the history
  • Loading branch information
sszuev committed Mar 11, 2024
1 parent 2bca710 commit 2e210f5
Showing 1 changed file with 54 additions and 2 deletions.
56 changes: 54 additions & 2 deletions db-common/src/main/kotlin/documents/xml/LingvoMappings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,69 @@ internal object LingvoMappings {

private val LANGUAGE_MAP: Map<String, String> = mapOf(
"1033" to "en",
"1049" to "ru",
"1025" to "ar", // Arabic
"1026" to "bg", // Bulgarian
"1028" to "ch", // Chinese
"1029" to "cs", // Czech
"1030" to "da", // Danish
"1031" to "de", // German
"1032" to "el", // Greek
"1034" to "es", // Spanish (Traditional)
"1035" to "fi", // Finnish
"1036" to "fr", // French
"1038" to "hu", // Hungarian
"1039" to "is", // Icelandic
"1040" to "it", // Italian
"1043" to "ni", // Dutch
"1044" to "no", // Norwegian (Bokmal)
"1045" to "pl", // Polish
"1048" to "ro", // Romanian
"1049" to "ru", // Russian
"1051" to "sk", // Slovak
"1053" to "sv", // Swedish
"1055" to "tr", // Turkish
"1057" to "in", // Indonesian
"1058" to "uk", // Ukrainian
"1059" to "be", // Belarusian
"1060" to "sl", // Slovenian
"1061" to "et", // Estonian
"1062" to "lv", // Latvian
"1063" to "lt", // Lithuanian
"1067" to "hy", // Armenian
"1069" to "eu", // Basque
"1078" to "af", // Afrikaans
"1079" to "ka", // Georgian
"1086" to "ms", // Malay
"1087" to "kk", // Kazakh
"1089" to "sw", // Swahili
"1092" to "tt", // Tatar
"1142" to "la", // Latin
"1561" to "ba", // Bashkir
"2052" to "ch", // Chinese traditional
"2068" to "no", // Norwegian (Nynorsk)
"2070" to "pt", // Portuguese
"3082" to "es", // Spanish (Modern)
"3098" to "sr", // Serbian (Cyrillic)
"32811" to "hy", // Armenian Western
)
private val PART_OF_SPEECH_MAP = mapOf(
"1" to "noun",
"2" to "adjective",
"3" to "verb",
"4" to "phrasal",
"5" to "phrasal verb",
"6" to "adverb",
"7" to "conjuction",
"8" to "idiom",
"9" to "numeral",
"10" to "preposition",
"11" to "pronoun",
"12" to "question word",
)
private val STATUS_MAP = mapOf(
"2" to DocumentCardStatus.UNKNOWN,
"3" to DocumentCardStatus.IN_PROCESS,
"4" to DocumentCardStatus.LEARNED
"4" to DocumentCardStatus.LEARNED,
)

fun toLanguageTag(lingvoId: String): String {
Expand Down

0 comments on commit 2e210f5

Please sign in to comment.