Fix a bug when sentence inputed contain English words

pull/1209/head
JiehangXie 4 years ago
parent 02729a58e0
commit 927c9bbdb6

@ -105,6 +105,8 @@ class Frontend():
phones_list = []
for seg in segments:
phones = []
# Replace all English words in the sentence
seg = re.sub('[a-zA-Z]+','',seg)
seg_cut = psg.lcut(seg)
initials = []
finals = []

Loading…
Cancel
Save