Skip to content

Commit

Permalink
add Shan (shn) translation literals (#376)
Browse files Browse the repository at this point in the history
* add Shan (shn) translaiton literals
---------
Co-authored-by: Clémentine Fourrier <22726840+clefourrier@users.noreply.github.com>
  • Loading branch information
NoerNova authored Oct 25, 2024
1 parent 7a82c86 commit 083154d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/lighteval/tasks/templates/utils/translation_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,29 @@ def __getattribute__(self, name: str) -> str:
semicolon=";",
),
Language.SERBOCROATIAN: TranslationLiterals(language=Language.SERBOCROATIAN), # Deprecated
Language.SHAN: TranslationLiterals(
language=Language.SHAN,
question_word="ၶေႃႈထၢမ်",
answer="ၶေႃႈတွပ်ႇ",
confirmation_word="ၸွင်ႇၸႂ်ႈ",
yes="ၸႂ်ႈ",
no="ဢမ်ႇ",
also="လႄႈ",
cause_word="ၵွပ်ႈပိူဝ်ႈ",
effect_word="ၵွပ်ႈၼၼ်",
true="တႄႉ",
false="ဢမ်ႇတႄႉ",
neither="ဢမ်ႇၸႂ်ႈတင်းသွင်ဢၼ်",
or_word="ဢမ်ႇၼၼ်",
full_stop=".",
comma=",",
question_mark="?",
exclamation_mark="!",
word_space="",
sentence_space=" ",
colon=":",
indices=["ၵ", "ၶ", "င", "ၸ", "သ", "ၺ"],
),
Language.SINDHI: TranslationLiterals(language=Language.SINDHI),
Language.SINHALA: TranslationLiterals(language=Language.SINHALA),
Language.SLOVAK: TranslationLiterals(
Expand Down
3 changes: 2 additions & 1 deletion src/lighteval/utils/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class Language(Enum):
SORANI = "ckb"
CEBUANO = "ceb"
WAR = "war"
SHAN = "shn"


# This mapping was created for beleble, it converts iso_639_3 individual codes to iso_639_3 macro codes
Expand Down Expand Up @@ -211,7 +212,7 @@ class Language(Enum):
# 'lin': Language.LINGALA,
# 'mri': Language.MAORI,
"pan": Language.PUNJABI,
# 'shn': Language.SHAN,
"shn": Language.SHAN,
"spa": Language.SPANISH,
"fil": Language.TAGALOG,
"uzn": Language.UZBEK,
Expand Down

0 comments on commit 083154d

Please sign in to comment.