From d77361d76c599705ec74c3e0fdd45214676c78e7 Mon Sep 17 00:00:00 2001 From: Bri-Will Date: Mon, 11 Dec 2017 14:13:28 -0800 Subject: [PATCH] Update lex_attrs.py. Fix like_url from matching on e-mail --- spacy/lang/lex_attrs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/lang/lex_attrs.py b/spacy/lang/lex_attrs.py index f0363b05f..8a1bc2b50 100644 --- a/spacy/lang/lex_attrs.py +++ b/spacy/lang/lex_attrs.py @@ -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