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