Universe

spacy-lefff

POS and French lemmatization with Lefff

spacy v2.0 extension and pipeline component for adding a French POS and lemmatizer based on Lefff.

Example

import spacy from spacy_lefff import LefffLemmatizer, POSTagger nlp = spacy.load('fr') pos = POSTagger() french_lemmatizer = LefffLemmatizer(after_melt=True) nlp.add_pipe(pos, name='pos', after='parser') nlp.add_pipe(french_lemmatizer, name='lefff', after='pos') doc = nlp(u"Paris est une ville très chère.") for d in doc: print(d.text, d.pos_, d._.melt_tagger, d._.lefff_lemma, d.tag_, d.lemma_)
Author info

Sami Moustachir

GitHubsammous/spacy-lefff

Categories pipeline

Submit your project

If you have a project that you want the spaCy community to make use of, you can suggest it by submitting a pull request to the spaCy website repository. The Universe database is open-source and collected in a simple JSON file. For more details on the formats and available fields, see the documentation. Looking for inspiration your own spaCy plugin or extension? Check out the project idea label on the issue tracker.

Read the docsJSON source