French autotrain_historic_french_51085121376 CamemBertForTokenClassification from peanutacake

Description

Pretrained CamemBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.autotrain_historic_french_51085121376 is a French model originally trained by peanutacake.

Download Copy S3 URI

How to use



documentAssembler = DocumentAssembler() \
    .setInputCol("text") \
    .setOutputCol("document")
    
tokenizer = Tokenizer() \
        .setInputCols(["document"]) \
        .setOutputCol("token")
        
    
tokenClassifier = CamemBertForTokenClassification.pretrained("autotrain_historic_french_51085121376","fr") \
            .setInputCols(["document","token"]) \
            .setOutputCol("ner")

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

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)



val documentAssembler = new DocumentAssembler()
    .setInputCol("text") 
    .setOutputCol("document")

val tokenizer = Tokenizer() \
        .setInputCols(Array("document")) \
        .setOutputCol("token")

val tokenClassifier = CamemBertForTokenClassification  
    .pretrained("autotrain_historic_french_51085121376", "fr")
    .setInputCols(Array("document","token")) 
    .setOutputCol("ner") 

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

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


Model Information

Model Name: autotrain_historic_french_51085121376
Compatibility: Spark NLP 5.2.4+
License: Open Source
Edition: Official
Input Labels: [documents, token]
Output Labels: [ner]
Language: fr
Size: 400.2 MB

References

https://huggingface.co/peanutacake/autotrain-historic-fr-51085121376