mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
updated like_num
This commit is contained in:
parent
3cca4ed798
commit
7d96d477ea
|
@ -31,8 +31,8 @@ def like_num(text):
|
||||||
if text in _num_words:
|
if text in _num_words:
|
||||||
return True
|
return True
|
||||||
if text.count('-') == 1:
|
if text.count('-') == 1:
|
||||||
pre, num = text.split('-')
|
_, num = text.split('-')
|
||||||
if pre in ['Ke', 'ke'] and (num.isdigit() or num in _num_words):
|
if num.isdigit() or num in _num_words:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user