mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
* Fix typo text_wth_ws --> text_with_ws. Reroute .string attribute to text_with_ws, to deprecate .string in future
This commit is contained in:
parent
3e9961d2c4
commit
54a98eaf19
|
@ -116,10 +116,10 @@ cdef class Doc:
|
|||
return self.length
|
||||
|
||||
def __unicode__(self):
|
||||
return u''.join([t.string for t in self])
|
||||
return u''.join([t.text_with_ws for t in self])
|
||||
|
||||
def __bytes__(self):
|
||||
return u''.join([t.string for t in self]).encode('utf-8')
|
||||
return u''.join([t.text_with_ws for t in self]).encode('utf-8')
|
||||
|
||||
def __str__(self):
|
||||
if six.PY3:
|
||||
|
@ -158,10 +158,10 @@ cdef class Doc:
|
|||
|
||||
@property
|
||||
def string(self):
|
||||
return u''.join([t.string for t in self])
|
||||
return self.text_with_ws
|
||||
|
||||
@property
|
||||
def text_wth_ws(self):
|
||||
def text_with_ws(self):
|
||||
return u''.join([t.text_with_ws for t in self])
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue
Block a user