Skip to content

Commit 6ac03ac

Browse files
committed
Add test case.
1 parent 3ba2a10 commit 6ac03ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/pyspark/mllib/feature.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ class Word2Vec(object):
547547
>>> sameModel = Word2VecModel.load(sc, path)
548548
>>> model.transform("a") == sameModel.transform("a")
549549
True
550+
>>> syms = sameModel.findSynonyms("a", 2)
551+
>>> [s[0] for s in syms]
552+
[u'b', u'c']
550553
>>> from shutil import rmtree
551554
>>> try:
552555
... rmtree(path)

0 commit comments

Comments
 (0)