Description
Pretrained MarianTransformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.adem_and_wisbo_are_out
is a Arabic model originally trained by alieddine.
How to use
documentAssembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("document")
sentenceDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx") \
.setInputCols(["document"]) \
.setOutputCol("translation")
marian = MarianTransformer.pretrained("adem_and_wisbo_are_out","ar") \
.setInputCols(["sentence"]) \
.setOutputCol("embeddings")
pipeline = Pipeline().setStages([documentAssembler, sentenceDL, marian])
data = spark.createDataFrame([["I love spark-nlp"]]).toDF("text")
pipelineModel = pipeline.fit(data)
pipelineDF = pipelineModel.transform(data)
val documentAssembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")
val marian = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")
.setInputCols(Array("document"))
.setOutputCol("sentence")
val embeddings = MarianTransformer.pretrained("adem_and_wisbo_are_out","ar")
.setInputCols(Array("sentence"))
.setOutputCol("translation")
val pipeline = new Pipeline().setStages(Array(documentAssembler, sentenceDL, marian))
val data = Seq("I love spark-nlp").toDF("text")
val pipelineModel = pipeline.fit(data)
val pipelineDF = pipelineModel.transform(data)
Model Information
Model Name: | adem_and_wisbo_are_out |
Compatibility: | Spark NLP 5.5.1+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [sentences] |
Output Labels: | [translation] |
Language: | ar |
Size: | 527.9 MB |
References
https://huggingface.co/alieddine/adem-and-wisbo-are-out