-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
dimsim.get_candidates("大侠") works fine.
But when calling dimsim.get_candidates("龌龊"), it gives this error
Traceback (most recent call last):
File "gen_sim_data.py", line 15, in <module>
print(get_similar_phrase("龌龊"))
File "gen_sim_data.py", line 8, in get_similar_phrase
return dimsim.get_candidates(phrase, mode="simplified", theta=int(num_candid/2))[:-1]
File "/usr/local/lib/python3.7/dist-packages/dimsim/core/model.py", line 80, in get_candidates
candid = _get_close_pinyin_candids(word, theta)
File "/usr/local/lib/python3.7/dist-packages/dimsim/core/model.py", line 109, in _get_close_pinyin_candids
res.append(Pinyin(newPy))
File "/usr/local/lib/python3.7/dist-packages/dimsim/utils/pinyin.py", line 15, in __init__
self.pinyinRewrite()
File "/usr/local/lib/python3.7/dist-packages/dimsim/utils/pinyin.py", line 41, in pinyinRewrite
if 'v' in self.vowel:
TypeError: argument of type 'NoneType' is not iterable
any thoughts?
Thanks
Metadata
Metadata
Assignees
Labels
No labels