Lemma UD model for Latin (pos_perseus)

Description

Pretrained Lemmatizer model (pos_perseus) trained on Universal Dependencies 2.9 (UD_Latin-Perseus) in Latin language.

Open in Colab Download Copy S3 URICopied!

How to use


document = DocumentAssembler()\ 
.setInputCol("text")\ 
.setOutputCol("document")

sentence = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")\ 
.setInputCols(["document"])\ 
.setOutputCol("sentence")

tokenizer = Tokenizer()\ 
.setInputCols(["sentence"])\ 
.setOutputCol("token") 

pos = PerceptronModel.pretrained("pos_perseus", "la")\ 
.setInputCols(["sentence", "token"])\ 
.setOutputCol("pos")

pipeline = Pipeline(stages=[document, sentence, tokenizer, pos])

data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text")

result = pipeline.fit(data).transform(data)

Model Information

Model Name: pos_perseus
Compatibility: Spark NLP 3.4.3+
License: Open Source
Edition: Official
Input Labels: [sentence, form]
Output Labels: [pos]
Language: la
Size: 937.4 KB

References

Model is trained on Universal Dependencies (treebank 2.9) UD_Latin-Perseus https://github.com/UniversalDependencies/UD_Latin-Perseus