mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Update norms example
This commit is contained in:
parent
47d066b293
commit
a857b2b511
|
@ -350,8 +350,9 @@ p
|
|||
| word exists, norms should always be in lowercase.
|
||||
|
||||
+aside-code("Accessing norms").
|
||||
doc = nlp(u"I can't")
|
||||
assert [t.norm_ for t in doc] == ['i', 'can', 'not']
|
||||
doc = nlp(u"I'm gonna")
|
||||
norms = [token.norm_ for token in doc]
|
||||
assert norms == ['i', 'am', 'going', 'to']
|
||||
|
||||
p
|
||||
| spaCy usually tries to normalise words with different spellings to a single,
|
||||
|
|
Loading…
Reference in New Issue
Block a user