* Set is_oov property in get_flags

This commit is contained in:
Matthew Honnibal 2015-07-27 01:51:24 +02:00
parent 0f4d0d51ab
commit 8535d872e8
1 changed files with 2 additions and 1 deletions

View File

@ -4,8 +4,9 @@ from ..orth cimport is_title, is_upper, like_url, like_number, like_email
from ..typedefs cimport flags_t from ..typedefs cimport flags_t
def get_flags(unicode string): def get_flags(unicode string, is_oov=False):
cdef flags_t flags = 0 cdef flags_t flags = 0
flags |= is_oov << IS_OOV
flags |= is_alpha(string) << IS_ALPHA flags |= is_alpha(string) << IS_ALPHA
flags |= is_ascii(string) << IS_ASCII flags |= is_ascii(string) << IS_ASCII
flags |= is_digit(string) << IS_DIGIT flags |= is_digit(string) << IS_DIGIT