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