Spaces:
Running
Running
Upload symbols.py
Browse files- common/text/symbols.py +5 -1
common/text/symbols.py
CHANGED
|
@@ -68,6 +68,10 @@ def get_symbols(symbol_set='english_basic'):
|
|
| 68 |
_accented = 'áäæçéêëïńñöøćčžđšŧ'
|
| 69 |
_letters = 'AÁÆÅÄBCČDĐEFGHIÏJKLMNŊŃÑOØÖPQRSŠTŦUVWXYZŽaáæåäbcčdđefghiïjklmnŋńñoøöpqrsštŧuvwxyzž'
|
| 70 |
symbols = list(_punctuation + _letters)# + _arpabet
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
else:
|
| 72 |
raise Exception("{} symbol set does not exist".format(symbol_set))
|
| 73 |
|
|
@@ -75,7 +79,7 @@ def get_symbols(symbol_set='english_basic'):
|
|
| 75 |
|
| 76 |
|
| 77 |
def get_pad_idx(symbol_set='english_basic'):
|
| 78 |
-
if symbol_set in {'english_basic', 'english_basic_lowercase', 'smj_expanded', 'sme_expanded', 'sma_expanded', 'all_sami'}:
|
| 79 |
return 0
|
| 80 |
else:
|
| 81 |
raise Exception("{} symbol set not used yet".format(symbol_set))
|
|
|
|
| 68 |
_accented = 'áäæçéêëïńñöøćčžđšŧ'
|
| 69 |
_letters = 'AÁÆÅÄBCČDĐEFGHIÏJKLMNŊŃÑOØÖPQRSŠTŦUVWXYZŽaáæåäbcčdđefghiïjklmnŋńñoøöpqrsštŧuvwxyzž'
|
| 70 |
symbols = list(_punctuation + _letters)# + _arpabet
|
| 71 |
+
elif symbol_set == 'uralic':
|
| 72 |
+
_punctuation = '!"\'(),-./:;?… '
|
| 73 |
+
_letters = 'aAáÁbBcCčČdDđeEfFgGhHiIïjJkKlLmMnNŋoOõÕpPqrRsSšŠtTŧuUvVwWxyYüÜzZžåÅäÄæÆöÖøØ'
|
| 74 |
+
symbols = list(_punctuation + _letters)
|
| 75 |
else:
|
| 76 |
raise Exception("{} symbol set does not exist".format(symbol_set))
|
| 77 |
|
|
|
|
| 79 |
|
| 80 |
|
| 81 |
def get_pad_idx(symbol_set='english_basic'):
|
| 82 |
+
if symbol_set in {'english_basic', 'english_basic_lowercase', 'smj_expanded', 'sme_expanded', 'sma_expanded', 'all_sami', 'uralic'}:
|
| 83 |
return 0
|
| 84 |
else:
|
| 85 |
raise Exception("{} symbol set not used yet".format(symbol_set))
|