You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import spacy
nlp = spacy.load('en')
text = "This is a string "
doc = nlp(text)
print(doc.text_with_ws)
print([token.text_with_ws for token in doc])
assert(doc.text_with_ws == text)
Gives
'This is a string'
['This ', 'is ', 'a ', 'string']
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-51-da27fad27bad> in <module>()
5 print([t.text_with_ws for t in doc])
6
----> 7 assert(doc.text_with_ws == text)
AssertionError:
Your Environment
Operating System: OSX 10.12.2
Python Version Used: 3.5
spaCy Version Used: 1.6.0
Environment Information:
The text was updated successfully, but these errors were encountered:
ines
added
the
bug
Bugs and behaviour differing from documentation
label
Jan 31, 2017
latkins
added a commit
to latkins/spaCy
that referenced
this issue
Jan 31, 2017
There appears to be a bug when parsing a string:
Gives
Your Environment
Operating System: OSX 10.12.2
Python Version Used: 3.5
spaCy Version Used: 1.6.0
Environment Information:
The text was updated successfully, but these errors were encountered: