Skip to content

Conversation

@AtlasPilotPuppy
Copy link
Contributor

This pull request refers to issue: https://issues.apache.org/jira/browse/SPARK-3838

Python example for word2vec
@mengxr

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@AtlasPilotPuppy AtlasPilotPuppy changed the title [examples][mllib][python] SPARK-3838 [SPARK-3838][examples][mllib][python] Word2Vec example in python Oct 27, 2014
@mengxr
Copy link
Contributor

mengxr commented Oct 27, 2014

@anantasty Could you also update the example code in https://github.com/apache/spark/blob/master/docs/mllib-feature-extraction.md? Thanks!

@AtlasPilotPuppy
Copy link
Contributor Author

@mengxr I updated the example code as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The input to Word2Vec should be sentences instead of individual words, though it doesn't affect the implementation. The following command extract 16 words per line.

grep -o -E '\w+(\W+\w+){0,15}' text8 > text8_lines

@AtlasPilotPuppy
Copy link
Contributor Author

@mengxr I just implemented those changes.
I kept the command line args very simple instead of using arg parse etc just for the sake of simplicity.
Thanks for the review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inp -> sentences, [row] -> row.split(' ')

@mengxr
Copy link
Contributor

mengxr commented Oct 28, 2014

ok to test

@mengxr
Copy link
Contributor

mengxr commented Oct 28, 2014

test this please

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22364 has started for PR 2952 at commit 3d3c9ee.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 28, 2014

Test build #22364 has finished for PR 2952 at commit 3d3c9ee.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22364/
Test FAILed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use file_path

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left that old line in there thanks for that!

@AtlasPilotPuppy
Copy link
Contributor Author

@davies @mengxr Just made the suggested changes.

@SparkQA
Copy link

SparkQA commented Oct 31, 2014

Test build #22598 has started for PR 2952 at commit 4bd439e.

  • This patch merges cleanly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the indent or remove this line.

@SparkQA
Copy link

SparkQA commented Oct 31, 2014

Test build #22598 has finished for PR 2952 at commit 4bd439e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22598/
Test PASSed.

@davies
Copy link
Contributor

davies commented Oct 31, 2014

@mengxr I think it's ready to merge.

@AtlasPilotPuppy
Copy link
Contributor Author

@mengxr @davies Thanks for the time and guidance

@SparkQA
Copy link

SparkQA commented Oct 31, 2014

Test build #22618 has started for PR 2952 at commit 87bd723.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 31, 2014

Test build #22618 has finished for PR 2952 at commit 87bd723.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22618/
Test FAILed.

@AtlasPilotPuppy
Copy link
Contributor Author

The URL shows 0 failures I am not sure why it says the tests fail.

@mengxr
Copy link
Contributor

mengxr commented Oct 31, 2014

test this please

@SparkQA
Copy link

SparkQA commented Oct 31, 2014

Test build #22658 has started for PR 2952 at commit 87bd723.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Nov 1, 2014

Test build #22658 has finished for PR 2952 at commit 87bd723.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22658/
Test PASSed.

@mengxr
Copy link
Contributor

mengxr commented Nov 1, 2014

LGTM. Merged into master. Thanks!

@asfgit asfgit closed this in e07fb6a Nov 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants