From 54a98eaf1901dba8d44cada0008775de9cb372c4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 16 Jan 2016 17:13:50 +0100 Subject: [PATCH] * Fix typo text_wth_ws --> text_with_ws. Reroute .string attribute to text_with_ws, to deprecate .string in future --- spacy/tokens/doc.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 4692e20cc..9bef56b66 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -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