Irish Lemmatizer


This model uses context and language knowledge to assign all forms and inflections of a word to a single root. This enables the pipeline to treat the past and present tense of a verb, for example, as the same word instead of two completely different words. The lemmatizer takes into consideration the context surrounding a word to determine which root is correct when the word form alone is ambiguous.

Open in Colab Download

How to use

lemmatizer = LemmatizerModel.pretrained("lemma", "ga") \
        .setInputCols(["token"]) \
nlp_pipeline = Pipeline(stages=[document_assembler, tokenizer, lemmatizer])
light_pipeline = LightPipeline([['']]).toDF("text")))
results = light_pipeline.fullAnnotate("Seachas a bheith ina rí ar an tuaisceart, is dochtúir Sasanach é John Snow agus ceannaire i bhforbairt ainéistéise agus sláinteachas míochaine.")

val lemmatizer = LemmatizerModel.pretrained("lemma", "ga")


[Row(annotatorType='token', begin=0, end=6, result='Seachas', metadata={'sentence': '0'}, embeddings=[]),
Row(annotatorType='token', begin=8, end=8, result='a', metadata={'sentence': '0'}, embeddings=[]),
Row(annotatorType='token', begin=10, end=15, result='bheith', metadata={'sentence': '0'}, embeddings=[]),
Row(annotatorType='token', begin=17, end=19, result='i', metadata={'sentence': '0'}, embeddings=[]),
Row(annotatorType='token', begin=21, end=22, result='rí', metadata={'sentence': '0'}, embeddings=[]),

Model Information

Model Name: lemma
Type: lemmatizer
Compatibility: Spark NLP 2.5.5+
Edition: Official
Input labels: [token]
Output labels: [lemma]
Language: ga
Case sensitive: false
License: Open Source

Data Source

The model is imported from