Part of Speech for Dutch


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_alpino", "nl") \
    .setInputCols(["document", "token"]) \
nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos])
light_pipeline = LightPipeline([['']]).toDF("text")))
results = light_pipeline.fullAnnotate("Behalve dat hij de koning van het noorden is, is John Snow een Engelse arts en een leider in de ontwikkeling van anesthesie en medische hygiëne.")

val pos = PerceptronModel.pretrained("pos_ud_alpino", "nl")
    .setInputCols(Array("document", "token"))


[Row(annotatorType='pos', begin=0, end=6, result='SCONJ', metadata={'word': 'Behalve'}, embeddings=[]),
Row(annotatorType='pos', begin=8, end=10, result='SCONJ', metadata={'word': 'dat'}, embeddings=[]),
Row(annotatorType='pos', begin=12, end=14, result='PRON', metadata={'word': 'hij'}, embeddings=[]),
Row(annotatorType='pos', begin=16, end=17, result='DET', metadata={'word': 'de'}, embeddings=[]),
Row(annotatorType='pos', begin=19, end=24, result='NOUN', metadata={'word': 'koning'}, embeddings=[]),

Model Information

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

Data Source

The model is imported from