mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-11 17:56:30 +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
|
return self.length
|
||||||
|
|
||||||
def __unicode__(self):
|
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):
|
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):
|
def __str__(self):
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
|
@ -158,10 +158,10 @@ cdef class Doc:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def string(self):
|
def string(self):
|
||||||
return u''.join([t.string for t in self])
|
return self.text_with_ws
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def text_wth_ws(self):
|
def text_with_ws(self):
|
||||||
return u''.join([t.text_with_ws for t in self])
|
return u''.join([t.text_with_ws for t in self])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue
Block a user