mirror of https://github.com/explosion/spaCy.git
* Wire up new attributes
This commit is contained in:
parent
9703ccc3de
commit
e5c96c969f
|
@ -82,6 +82,22 @@ class Language(object):
|
||||||
def is_title(string):
|
def is_title(string):
|
||||||
return orth.is_title(string)
|
return orth.is_title(string)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def is_bracket(string):
|
||||||
|
return orth.is_bracket(string)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def is_quote(string):
|
||||||
|
return orth.is_quote(string)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def is_left_punct(string):
|
||||||
|
return orth.is_left_punct(string)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def is_right_punct(string):
|
||||||
|
return orth.is_right_punct(string)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_upper(string):
|
def is_upper(string):
|
||||||
return orth.is_upper(string)
|
return orth.is_upper(string)
|
||||||
|
@ -121,6 +137,10 @@ class Language(object):
|
||||||
attrs.IS_SPACE: cls.is_space,
|
attrs.IS_SPACE: cls.is_space,
|
||||||
attrs.IS_TITLE: cls.is_title,
|
attrs.IS_TITLE: cls.is_title,
|
||||||
attrs.IS_UPPER: cls.is_upper,
|
attrs.IS_UPPER: cls.is_upper,
|
||||||
|
attrs.IS_BRACKET: cls.is_bracket,
|
||||||
|
attrs.IS_QUOTE: cls.is_quote,
|
||||||
|
attrs.IS_LEFT_PUNCT: cls.is_left_punct,
|
||||||
|
attrs.IS_RIGHT_PUNCT: cls.is_right_punct,
|
||||||
attrs.LIKE_URL: cls.like_url,
|
attrs.LIKE_URL: cls.like_url,
|
||||||
attrs.LIKE_NUM: cls.like_num,
|
attrs.LIKE_NUM: cls.like_num,
|
||||||
attrs.LIKE_EMAIL: cls.like_email,
|
attrs.LIKE_EMAIL: cls.like_email,
|
||||||
|
|
Loading…
Reference in New Issue