From ed0db95183c1a77e4d57a71cce40ec84d78973b2 Mon Sep 17 00:00:00 2001 From: Kit Date: Mon, 8 Jan 2018 03:28:50 +0100 Subject: [PATCH] Find lowercased forms of ordinal words, where possible --- spacy/lang/fr/lex_attrs.py | 2 ++ spacy/lang/nl/lex_attrs.py | 2 ++ spacy/lang/pt/lex_attrs.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/spacy/lang/fr/lex_attrs.py b/spacy/lang/fr/lex_attrs.py index faffd7fa2..5cf7170b9 100644 --- a/spacy/lang/fr/lex_attrs.py +++ b/spacy/lang/fr/lex_attrs.py @@ -33,6 +33,8 @@ def like_num(text): return True if text.lower() in _num_words: return True + if text.lower() in _ordinal_words: + return True return False diff --git a/spacy/lang/nl/lex_attrs.py b/spacy/lang/nl/lex_attrs.py index ee38c45bc..ba391e0b2 100644 --- a/spacy/lang/nl/lex_attrs.py +++ b/spacy/lang/nl/lex_attrs.py @@ -32,6 +32,8 @@ def like_num(text): return True if text.lower() in _num_words: return True + if text.lower() in _ordinal_words: + return True return False diff --git a/spacy/lang/pt/lex_attrs.py b/spacy/lang/pt/lex_attrs.py index ce79b7d91..cd2efadb3 100644 --- a/spacy/lang/pt/lex_attrs.py +++ b/spacy/lang/pt/lex_attrs.py @@ -30,6 +30,8 @@ def like_num(text): return True if text.lower() in _num_words: return True + if text.lower() in _ordinal_words: + return True return False