mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
* Add Token.sent_start property, re Issue #235
This commit is contained in:
parent
4917cbb484
commit
01e59e4e6e
|
@ -279,6 +279,18 @@ cdef class Token:
|
||||||
def __get__(self):
|
def __get__(self):
|
||||||
return self.c.r_kids
|
return self.c.r_kids
|
||||||
|
|
||||||
|
property sent_start:
|
||||||
|
def __get__(self):
|
||||||
|
return self.c.sent_start
|
||||||
|
|
||||||
|
def __set__(self, bint value):
|
||||||
|
if self.doc.is_parsed:
|
||||||
|
raise ValueError(
|
||||||
|
'Refusing to write to token.sent_start if its document is parsed, '
|
||||||
|
'because this may cause inconsistent state. '
|
||||||
|
'See https://github.com/spacy-io/spaCy/issues/235 for workarounds.')
|
||||||
|
self.c.sent_start = value
|
||||||
|
|
||||||
property lefts:
|
property lefts:
|
||||||
def __get__(self):
|
def __get__(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user