French drbert_casm2 BertForTokenClassification from camila-ud

Description

Pretrained BertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.drbert_casm2 is a French model originally trained by camila-ud.

Predicted Entities

Download Copy S3 URI

How to use

documentAssembler = DocumentAssembler() \
    .setInputCol("text") \
    .setOutputCol("documents")
    
    
tokenClassifier = BertForTokenClassification.pretrained("drbert_casm2","fr") \
            .setInputCols(["documents","token"]) \
            .setOutputCol("ner")

pipeline = Pipeline().setStages([documentAssembler, tokenClassifier])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)
val documentAssembler = new DocumentAssembler()
    .setInputCol("text") 
    .setOutputCol("embeddings")
    
val tokenClassifier = BertForTokenClassification  
    .pretrained("drbert_casm2", "fr")
    .setInputCols(Array("documents","token")) 
    .setOutputCol("ner") 

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenClassifier))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)

Model Information

Model Name: drbert_casm2
Compatibility: Spark NLP 5.5.0+
License: Open Source
Edition: Official
Input Labels: [document, token]
Output Labels: [ner]
Language: fr
Size: 408.2 MB

References

References

https://huggingface.co/camila-ud/DrBERT-CASM2