Spaces:
Runtime error
Runtime error
Update text/cleaners.py
Browse files- text/cleaners.py +1 -17
text/cleaners.py
CHANGED
@@ -1,17 +1 @@
|
|
1 |
-
import
|
2 |
-
|
3 |
-
def japanese_cleaners(text):
|
4 |
-
from text.japanese import japanese_to_romaji_with_accent
|
5 |
-
text = japanese_to_romaji_with_accent(text)
|
6 |
-
if len(text) == 0 or re.match('[A-Za-z]', text[-1]):
|
7 |
-
text += '.'
|
8 |
-
return text
|
9 |
-
|
10 |
-
|
11 |
-
def japanese_cleaners2(text):
|
12 |
-
text = text.replace('・・・', '…').replace('・', ' ')
|
13 |
-
text = japanese_cleaners(text).replace('ts', 'ʦ').replace('...', '…') \
|
14 |
-
.replace('(', '').replace(')', '') \
|
15 |
-
.replace('[', '').replace(']', '') \
|
16 |
-
.replace('*', ' ').replace('{', '').replace('}', '')
|
17 |
-
return text
|
|
|
1 |
+
from ptml2ja import ml2ja_ipa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|