Skip to content
Prev Previous commit
Next Next commit
minor style change
  • Loading branch information
Liquan Pei committed Aug 4, 2014
commit e2484414d65c3b8aebffa79c3cac34452cf53d38
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class Word2VecSuite extends FunSuite with LocalSparkContext {
test("Word2VecModel") {
val num = 2
val localModel = Seq(
("china" , Array(0.50f, 0.50f, 0.50f, 0.50f)),
("japan" , Array(0.40f, 0.50f, 0.50f, 0.50f)),
("taiwan", Array(0.60f, 0.50f, 0.50f, 0.50f)),
("korea" , Array(0.45f, 0.60f, 0.60f, 0.60f))
("china", Array(0.50f, 0.50f, 0.50f, 0.50f)),
("japan", Array(0.40f, 0.50f, 0.50f, 0.50f)),
("taiwan", Array(0.60f, 0.50f, 0.50f, 0.50f)),
("korea", Array(0.45f, 0.60f, 0.60f, 0.60f))
)
val model = new Word2VecModel(sc.parallelize(localModel, 2))
val syms = model.findSynonyms("china", num)
Expand Down