From 8535d872e8c11b478bfbb3299e14c27aacd8bf3f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 27 Jul 2015 01:51:24 +0200 Subject: [PATCH] * Set is_oov property in get_flags --- spacy/en/attrs.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/en/attrs.pyx b/spacy/en/attrs.pyx index b74dcfd2a..ff58559f6 100644 --- a/spacy/en/attrs.pyx +++ b/spacy/en/attrs.pyx @@ -4,8 +4,9 @@ from ..orth cimport is_title, is_upper, like_url, like_number, like_email from ..typedefs cimport flags_t -def get_flags(unicode string): +def get_flags(unicode string, is_oov=False): cdef flags_t flags = 0 + flags |= is_oov << IS_OOV flags |= is_alpha(string) << IS_ALPHA flags |= is_ascii(string) << IS_ASCII flags |= is_digit(string) << IS_DIGIT