Italian Legal Camembert Embedding Cased model

Description

Pretrained Camembert Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. Italian-Legal-BERT-SC is a Italian model originally trained by dlicari.

Download Copy S3 URI

How to use

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

tokenizer = Tokenizer() \
    .setInputCols("document") \
    .setOutputCol("token")
  
embeddings = CamemBertEmbeddings.pretrained("camembert_embeddings_Italian_Legal_BERT_SC","it") \
    .setInputCols(["document", "token"]) \
    .setOutputCol("embeddings")
    
pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])

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

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

Model Information

Model Name: camembert_embeddings_Italian_Legal_BERT_SC
Compatibility: Spark NLP 4.2.7+
License: Open Source
Edition: Official
Input Labels: [sentence]
Output Labels: [bert_sentence]
Language: it
Size: 415.1 MB
Case sensitive: true
Max sentence length: 128

References

  • https://huggingface.co/dlicari/Italian-Legal-BERT-SC