Word2Vec Embeddings in Burmese (300d)


Word Embeddings lookup annotator that maps tokens to vectors.


How to use

documentAssembler = DocumentAssembler() \
    .setInputCol("text") \

tokenizer = Tokenizer() \
    .setInputCols("document") \
embeddings = WordEmbeddingsModel.pretrained("w2v_cc_300d","my") \
    .setInputCols(["document", "token"]) \
pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings])

data = spark.createDataFrame([["ငါ Spark NLP ကိုချစ်"]]).toDF("text")

result = pipeline.fit(data).transform(data)
val documentAssembler = new DocumentAssembler() 
val tokenizer = new Tokenizer() 

val embeddings = WordEmbeddingsModel.pretrained("w2v_cc_300d","my") 
    .setInputCols(Array("document", "token")) 

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings))

val data = Seq("ငါ Spark NLP ကိုချစ်").toDF("text")

val result = pipeline.fit(data).transform(data)
import nlu
nlu.load("my.embed.w2v_cc_300d").predict("""ငါ Spark NLP ကိုချစ်""")

Model Information

Model Name: w2v_cc_300d
Type: embeddings
Compatibility: Spark NLP 3.4.1+
License: Open Source
Edition: Official
Input Labels: [document, token]
Output Labels: [embeddings]
Language: my
Size: 195.6 MB
Case sensitive: false
Dimension: 300