mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 02:06:31 +03:00
Update lemmaitzer docs [ci skip]
This commit is contained in:
parent
25b2b3ff45
commit
ff51fba96a
|
@ -35,8 +35,8 @@ Lemmatize a string.
|
||||||
>
|
>
|
||||||
> ```python
|
> ```python
|
||||||
> from spacy.lemmatizer import Lemmatizer
|
> from spacy.lemmatizer import Lemmatizer
|
||||||
> from spacy.lang.en import LEMMA_INDEX, LEMMA_EXC, LEMMA_RULES
|
> rules = {"noun": [["s", ""]]}
|
||||||
> lemmatizer = Lemmatizer(LEMMA_INDEX, LEMMA_EXC, LEMMA_RULES)
|
> lemmatizer = Lemmatizer(index={}, exceptions={}, rules=rules)
|
||||||
> lemmas = lemmatizer("ducks", "NOUN")
|
> lemmas = lemmatizer("ducks", "NOUN")
|
||||||
> assert lemmas == ["duck"]
|
> assert lemmas == ["duck"]
|
||||||
> ```
|
> ```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user