mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-09 23:53:10 +03:00
Fix unicode in lightning tour example (resolves #1356)
This commit is contained in:
parent
ebd2e5ff54
commit
b51dcee3ce
|
@ -58,13 +58,13 @@ p
|
||||||
assert token.shape_ == 'Xxxxx'
|
assert token.shape_ == 'Xxxxx'
|
||||||
for lexeme in nlp.vocab:
|
for lexeme in nlp.vocab:
|
||||||
if lexeme.is_alpha:
|
if lexeme.is_alpha:
|
||||||
lexeme.shape_ = 'W'
|
lexeme.shape_ = u'W'
|
||||||
elif lexeme.is_digit:
|
elif lexeme.is_digit:
|
||||||
lexeme.shape_ = 'D'
|
lexeme.shape_ = u'D'
|
||||||
elif lexeme.is_punct:
|
elif lexeme.is_punct:
|
||||||
lexeme.shape_ = 'P'
|
lexeme.shape_ = u'P'
|
||||||
else:
|
else:
|
||||||
lexeme.shape_ = 'M'
|
lexeme.shape_ = u'M'
|
||||||
assert token.shape_ == 'W'
|
assert token.shape_ == 'W'
|
||||||
|
|
||||||
+h(2, "examples-numpy-arrays") Export to numpy arrays
|
+h(2, "examples-numpy-arrays") Export to numpy arrays
|
||||||
|
|
Loading…
Reference in New Issue
Block a user