mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Update lex_attrs.py. Fix like_url from matching on e-mail
This commit is contained in:
parent
08e2c77368
commit
d77361d76c
|
@ -82,6 +82,8 @@ def like_url(text):
|
|||
return True
|
||||
if text[0] == '.' or text[-1] == '.':
|
||||
return False
|
||||
if '@' in text: #prevent matches on e-mail addresses
|
||||
return False
|
||||
for i in range(len(text)):
|
||||
if text[i] == '.':
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue
Block a user