Mahiruoshi
commited on
Commit
•
2329276
1
Parent(s):
df4962a
Update text/cleaners.py
Browse files- text/cleaners.py +6 -6
text/cleaners.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import re
|
2 |
-
from text.english import english_to_lazy_ipa, english_to_ipa2, english_to_lazy_ipa2
|
3 |
from text.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3
|
4 |
from text.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2
|
5 |
# from text.sanskrit import devanagari_to_ipa
|
@@ -109,11 +109,11 @@ def cjke_cleaners(text):
|
|
109 |
for korean_text in korean_texts:
|
110 |
cleaned_text = korean_to_ipa(korean_text[4:-4])
|
111 |
text = text.replace(korean_text, cleaned_text+' ', 1)
|
112 |
-
for english_text in english_texts:
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
text = text[:-1]
|
118 |
if re.match(r'[^\.,!\?\-…~]', text[-1]):
|
119 |
text += '.'
|
|
|
1 |
import re
|
2 |
+
#from text.english import english_to_lazy_ipa, english_to_ipa2, english_to_lazy_ipa2
|
3 |
from text.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3
|
4 |
from text.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2
|
5 |
# from text.sanskrit import devanagari_to_ipa
|
|
|
109 |
for korean_text in korean_texts:
|
110 |
cleaned_text = korean_to_ipa(korean_text[4:-4])
|
111 |
text = text.replace(korean_text, cleaned_text+' ', 1)
|
112 |
+
#for english_text in english_texts:
|
113 |
+
# cleaned_text = english_to_ipa2(english_text[4:-4])
|
114 |
+
# cleaned_text = cleaned_text.replace('ɑ', 'a').replace(
|
115 |
+
# 'ɔ', 'o').replace('ɛ', 'e').replace('ɪ', 'i').replace('ʊ', 'u')
|
116 |
+
# text = text.replace(english_text, cleaned_text+' ', 1)
|
117 |
text = text[:-1]
|
118 |
if re.match(r'[^\.,!\?\-…~]', text[-1]):
|
119 |
text += '.'
|