mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Merge pull request #794 from ematvey/count_by_doc_update
Small `Doc.count_by` documentation update
This commit is contained in:
commit
ad0e4e4532
|
@ -500,7 +500,8 @@ cdef class Doc:
|
||||||
by the values of the given attribute ID.
|
by the values of the given attribute ID.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
from spacy.en import English, attrs
|
from spacy.en import English
|
||||||
|
from spacy import attrs
|
||||||
nlp = English()
|
nlp = English()
|
||||||
tokens = nlp(u'apple apple orange banana')
|
tokens = nlp(u'apple apple orange banana')
|
||||||
tokens.count_by(attrs.ORTH)
|
tokens.count_by(attrs.ORTH)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user