English distilbert_base_uncased_finetuned_ner_slhoefel DistilBertForTokenClassification from slhoefel

Description

Pretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.distilbert_base_uncased_finetuned_ner_slhoefel is a English model originally trained by slhoefel.

Download Copy S3 URI

How to use



documentAssembler = DocumentAssembler() \
    .setInputCol("text") \
    .setOutputCol("documents")
    
    
tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_base_uncased_finetuned_ner_slhoefel","en") \
            .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 = DistilBertForTokenClassification  
    .pretrained("distilbert_base_uncased_finetuned_ner_slhoefel", "en")
    .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: distilbert_base_uncased_finetuned_ner_slhoefel
Compatibility: Spark NLP 5.2.0+
License: Open Source
Edition: Official
Input Labels: [documents, token]
Output Labels: [ner]
Language: en
Size: 247.2 MB

References

https://huggingface.co/slhoefel/distilbert-base-uncased-finetuned-ner