cdleong commited on
Commit
2b29a37
1 Parent(s): 79fe79b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -4,9 +4,11 @@ import langcodes
4
  from langcodes import LanguageTagError
5
  from pathlib import Path
6
  from operator import itemgetter
 
7
  # TODO: reverse transliterate?
8
 
9
 
 
10
  def get_lang_description_from_mapping_name(string_to_check):
11
  if "generic-Latn" == string_to_check:
12
  return "Generic Latin Script"
@@ -83,7 +85,12 @@ if __name__ == "__main__":
83
  epi = epitran.Epitran(selected_mapping)
84
 
85
 
86
- input_text = st.text_area(label="Whatever you type here will be transliterated!", value="Gari langu linaloangama limejaa na mikunga")
 
 
 
 
 
87
 
88
  # combined_code = "-".join([iso_lang_code, iso_script_code])
89
  # st.write(f"Combined code: {combined_code}")
 
4
  from langcodes import LanguageTagError
5
  from pathlib import Path
6
  from operator import itemgetter
7
+ from collections import defaultdict
8
  # TODO: reverse transliterate?
9
 
10
 
11
+
12
  def get_lang_description_from_mapping_name(string_to_check):
13
  if "generic-Latn" == string_to_check:
14
  return "Generic Latin Script"
 
85
  epi = epitran.Epitran(selected_mapping)
86
 
87
 
88
+
89
+ examples = defaultdict(lambda: 'In the beginning was the Word, and the Word was with God, and the Word was God.')
90
+ examples['cmn-Hans'] = '太初有道,道与神同在,道就是神。'
91
+ examples['swa-Latn'] = 'Mwanzoni Kabla ulimwengu haujaumbwa alikuwepo Neno Huyo Neno alikuwa pamoja na Mungu, na Neno alikuwa Mungu.'
92
+
93
+ input_text = st.text_area(label="Whatever you type here will be transliterated!", value=examples[selected_mapping])
94
 
95
  # combined_code = "-".join([iso_lang_code, iso_script_code])
96
  # st.write(f"Combined code: {combined_code}")