Description
Pretrained Longformer Embeddings model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. longformer_legal_embeddings
is a Spanish model originally trained by Narrative
.
How to use
embeddings = LongformerEmbeddings\
.pretrained("longformer_legal_embeddings","es")\
.setInputCols(["document", "token"])\
.setOutputCol("embeddings")
val embeddings = LongformerEmbeddings.pretrained("longformer_legal_embeddings","es")
.setInputCols("document", "token")
.setOutputCol("embeddings")
import nlu
nlu.load("es.embed.longformer.legal").predict("""Put your text here.""")
Model Information
Model Name: | longformer_legal_embeddings |
Compatibility: | Spark NLP 4.2.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [sentence, token] |
Output Labels: | [embeddings] |
Language: | es |
Size: | 564.1 MB |
Case sensitive: | true |
Max sentence length: | 4096 |
References
https://huggingface.co/Narrativa/legal-longformer-base-4096-spanish