DebasishDhal99
commited on
Commit
·
a84190a
1
Parent(s):
7439772
Adding check special combination function
Browse files
polish.py
CHANGED
@@ -10,6 +10,13 @@ polish_dict = {'a':'a','A':'A','ą':'an','Ą':'An','b':'b','B':'B','ć':'ch','Ć
|
|
10 |
cyrillic_equiv_dict = {'щ':'sh','Щ':'Sh','х':'kh','Х':'Kh','ч':'ch','Ч':'Ch','ϳ':'j','Ј':'J','ж':'zh','Ж':'Zh', 'ш':'sh','Ш':'Sh',
|
11 |
'ц':'ts','Ц':'Ts'}
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
def polish_letter_to_eng(letter):
|
14 |
if letter in polish_dict:
|
15 |
return polish_dict[letter]
|
|
|
10 |
cyrillic_equiv_dict = {'щ':'sh','Щ':'Sh','х':'kh','Х':'Kh','ч':'ch','Ч':'Ch','ϳ':'j','Ј':'J','ж':'zh','Ж':'Zh', 'ш':'sh','Ш':'Sh',
|
11 |
'ц':'ts','Ц':'Ts'}
|
12 |
|
13 |
+
def check_special_comb(word):
|
14 |
+
for comb in special_combs:
|
15 |
+
if comb in word:
|
16 |
+
word = word.replace(comb,special_combs[comb])
|
17 |
+
return word
|
18 |
+
|
19 |
+
|
20 |
def polish_letter_to_eng(letter):
|
21 |
if letter in polish_dict:
|
22 |
return polish_dict[letter]
|