Persian albert_persian_farsi_base_v2_ner_peyma AlbertForTokenClassification from m3hrdadfi

Description

Pretrained AlbertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.albert_persian_farsi_base_v2_ner_peyma is a Persian model originally trained by m3hrdadfi.

Download Copy S3 URI

How to use



document_assembler = DocumentAssembler() \
    .setInputCol("text") \
    .setOutputCol("documents")
    
    
sequenceClassifier = AlbertForTokenClassification.pretrained("albert_persian_farsi_base_v2_ner_peyma","fa") \
            .setInputCols(["documents","token"]) \
            .setOutputCol("ner")

pipeline = Pipeline().setStages([document_assembler, sequenceClassifier])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)



val document_assembler = new DocumentAssembler()
    .setInputCol("text") 
    .setOutputCol("embeddings")
    
val sequenceClassifier = AlbertForTokenClassification  
    .pretrained("albert_persian_farsi_base_v2_ner_peyma", "fa")
    .setInputCols(Array("documents","token")) 
    .setOutputCol("ner") 

val pipeline = new Pipeline().setStages(Array(document_assembler, sequenceClassifier))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


Model Information

Model Name: albert_persian_farsi_base_v2_ner_peyma
Compatibility: Spark NLP 5.1.2+
License: Open Source
Edition: Official
Input Labels: [documents, token]
Output Labels: [ner]
Language: fa
Size: 66.4 MB

References

https://huggingface.co/m3hrdadfi/albert-fa-base-v2-ner-peyma