You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
dimsim.get_candidates("大侠")
works fine.But when calling
dimsim.get_candidates("龌龊")
, it gives this errorany thoughts?
Thanks
The text was updated successfully, but these errors were encountered: