未验证 提交 73f9f61f 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

Merge pull request #1209 from JiehangXie/develop

Fix a bug when sentence inputed contain English words
...@@ -105,6 +105,8 @@ class Frontend(): ...@@ -105,6 +105,8 @@ class Frontend():
phones_list = [] phones_list = []
for seg in segments: for seg in segments:
phones = [] phones = []
# Replace all English words in the sentence
seg = re.sub('[a-zA-Z]+','',seg)
seg_cut = psg.lcut(seg) seg_cut = psg.lcut(seg)
initials = [] initials = []
finals = [] finals = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册