Mahiruoshi commited on
Commit
4019e19
1 Parent(s): 35b4786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,13 +90,13 @@ def sle(language,tts_input0):
90
  tts_input1 = "[JA]" + tts_input0.replace('\n','。').replace(' ',',') + "[JA]"
91
  return tts_input1
92
  def extrac(text):
 
93
  result_list = re.split(r'\n', text)
94
  final_list = []
95
  for i in result_list:
96
  if is_english(i):
97
  i = romajitable.to_kana(i).katakana
98
- comment = i.compile('【[^>]+】' )
99
- i = i.replace('\n','').replace(' ','').replace('【'+ comment + '】','')
100
  if len(i)>1:
101
  if len(i) > 20:
102
  try:
 
90
  tts_input1 = "[JA]" + tts_input0.replace('\n','。').replace(' ',',') + "[JA]"
91
  return tts_input1
92
  def extrac(text):
93
+ text = re.sub("<[^>]*>","",text)
94
  result_list = re.split(r'\n', text)
95
  final_list = []
96
  for i in result_list:
97
  if is_english(i):
98
  i = romajitable.to_kana(i).katakana
99
+ i = i.replace('\n','').replace(' ','')
 
100
  if len(i)>1:
101
  if len(i) > 20:
102
  try: