Description
Pretrained CamemBERT Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. lsg16k-Italian-Legal-BERT-SC
is a Italian model originally trained by dlicari
.
How to use
documentAssembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("document")
tokenizer = Tokenizer() \
.setInputCols("document") \
.setOutputCol("token")
embeddings = CamemBertEmbeddings.pretrained("camembert_embeddings_lsg16k_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_lsg16k_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: | 460.7 MB |
Case sensitive: | true |
Max sentence length: | 128 |
References
- https://huggingface.co/dlicari/lsg16k-Italian-Legal-BERT-SC