Part of Speech for Breton


This model annotates the part of speech of tokens in a text. The parts of speech annotated include PRON (pronoun), CCONJ (coordinating conjunction), and 15 others. The part of speech model is useful for extracting the grammatical structure of a piece of text automatically.

Open in Colab Download

How to use

pos = PerceptronModel.pretrained("pos_ud_keb", "br") \
    .setInputCols(["document", "token"]) \
nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos])
light_pipeline = LightPipeline([['']]).toDF("text")))
results = light_pipeline.fullAnnotate("Distaolit dimp hon dleoù evel m'hor bo ivez distaolet d'hon dleourion.")
val pos = PerceptronModel.pretrained("pos_ud_keb", "br")
    .setInputCols(Array("document", "token"))
val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos))
val result =["Distaolit dimp hon dleoù evel m'hor bo ivez distaolet d'hon dleourion."].toDS.toDF("text")).transform(data)
import nlu

text = ["""Distaolit dimp hon dleoù evel m'hor bo ivez distaolet d'hon dleourion."""]
pos_df = nlu.load('br.pos').predict(text, output_level='token')


[Row(annotatorType='pos', begin=0, end=8, result='VERB', metadata={'word': 'Distaolit'}),
Row(annotatorType='pos', begin=10, end=13, result='VERB', metadata={'word': 'dimp'}),
Row(annotatorType='pos', begin=15, end=17, result='DET', metadata={'word': 'hon'}),
Row(annotatorType='pos', begin=19, end=23, result='NOUN', metadata={'word': 'dleoù'}),
Row(annotatorType='pos', begin=25, end=28, result='ADP', metadata={'word': 'evel'}),

Model Information

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

Data Source

The model is imported from