Description
Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported into Spark NLP. AraBertMo_base_V1
is a Arabic model orginally trained by Ebtihal
.
Predicted Entities
How to use
documentAssembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("document")
tokenizer = Tokenizer() \
.setInputCols("document") \
.setOutputCol("token")
embeddings = BertEmbeddings.pretrained("bert_embeddings_AraBertMo_base_V1","ar") \
.setInputCols(["document", "token"]) \
.setOutputCol("embeddings")
pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])
data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text")
result = pipeline.fit(data).transform(data)
Model Information
Model Name: | bert_embeddings_AraBertMo_base_V1 |
Compatibility: | Spark NLP 5.0.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [sentence, token] |
Output Labels: | [bert] |
Language: | ar |
Size: | 407.8 MB |
Case sensitive: | true |