From bb2541ffd3880fa9c34a00918230d07fab0115ab Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 23 Aug 2017 12:11:52 +0200 Subject: [PATCH] Fix PROB attr for OOV words --- spacy/lang/lex_attrs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/lang/lex_attrs.py b/spacy/lang/lex_attrs.py index 4c3284b1e..d4beebd26 100644 --- a/spacy/lang/lex_attrs.py +++ b/spacy/lang/lex_attrs.py @@ -137,6 +137,7 @@ LEX_ATTRS = { attrs.IS_UPPER: lambda string: string.isupper(), attrs.IS_STOP: lambda string: False, attrs.IS_OOV: lambda string: True, + attrs.PROB: lambda string: -20., attrs.LIKE_EMAIL: like_email, attrs.LIKE_NUM: like_num, attrs.IS_PUNCT: is_punct,