Merge pull request #1209 from JiehangXie/develop

Fix a bug when sentence inputed contain English words
pull/1210/head
TianYuan 3 years ago committed by GitHub
commit 73f9f61fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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