* Add stubs for is_bracket/is_quote/is_left_punct/is_right_punct functions

This commit is contained in:
Matthew Honnibal 2016-02-04 13:03:04 +01:00
parent ee975d36d0
commit fe611132f0
1 changed files with 16 additions and 0 deletions

View File

@ -1,4 +1,5 @@
# -*- coding: utf8 -*- # -*- coding: utf8 -*-
# cython: infer_types=True
from __future__ import unicode_literals from __future__ import unicode_literals
import unicodedata import unicodedata
@ -48,6 +49,21 @@ cpdef bint is_ascii(unicode string):
else: else:
return True return True
cpdef bint is_bracket(unicode string):
return False
cpdef bint is_quote(unicode string):
if string in ('"', "'"):
return True
else:
return False
cpdef bint is_left_punct(unicode string):
return False
cpdef bint is_right_punct(unicode string):
return False
cpdef bint is_title(unicode string): cpdef bint is_title(unicode string):
return string.istitle() return string.istitle()