{"action":"created","comment":{"url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/comments/98437150","pull_request_review_id":19076922,"id":98437150,"diff_hunk":"@@ -0,0 +1,68 @@\n+/**\n+ * This program generates a word-vector from news items stored in resources folder.\n+ * News File is located at \\dl4j-examples\\src\\main\\resources\\NewsData\\RawNewsToGenerateWordVector.txt\n+ * Word vector file : \\dl4j-examples\\src\\main\\resources\\NewsData\\NewsWordVector.txt\n+ * Note :\n+ * 1) This code is modification of original example named Word2VecRawTextExample.java\n+ * 2) Word vector generated in this program is used in Training RNN to categorise news headlines.\n+ * <p>\n+ * <b></b>KIT Solutions Pvt. Ltd. (www.kitsol.com)</b>\n+ */\n+\n+\n+package org.deeplearning4j.examples.recurrent.processnews;\n+\n+import org.datavec.api.util.ClassPathResource;\n+import org.deeplearning4j.models.embeddings.loader.WordVectorSerializer;\n+import org.deeplearning4j.models.word2vec.Word2Vec;\n+import org.deeplearning4j.text.sentenceiterator.BasicLineIterator;\n+import org.deeplearning4j.text.sentenceiterator.SentenceIterator;\n+import org.deeplearning4j.text.tokenization.tokenizer.preprocessor.CommonPreprocessor;\n+import org.deeplearning4j.text.tokenization.tokenizerfactory.DefaultTokenizerFactory;\n+import org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.io.File;\n+\n+public class PrepareWordVector {\n+\n+    private static Logger log = LoggerFactory.getLogger(PrepareWordVector.class);\n+","path":"dl4j-examples/src/main/java/org/deeplearning4j/examples/recurrent/ProcessNews/PrepareWordVector.java","position":31,"original_position":31,"commit_id":"dd37531863569d4dd51dd0d894a514837f784f6d","original_commit_id":"dd37531863569d4dd51dd0d894a514837f784f6d","user":{"login":"agibsonccc","id":1144306,"avatar_url":"https://avatars.githubusercontent.com/u/1144306?v=3","gravatar_id":"","url":"https://api.github.com/users/agibsonccc","html_url":"https://github.com/agibsonccc","followers_url":"https://api.github.com/users/agibsonccc/followers","following_url":"https://api.github.com/users/agibsonccc/following{/other_user}","gists_url":"https://api.github.com/users/agibsonccc/gists{/gist_id}","starred_url":"https://api.github.com/users/agibsonccc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agibsonccc/subscriptions","organizations_url":"https://api.github.com/users/agibsonccc/orgs","repos_url":"https://api.github.com/users/agibsonccc/repos","events_url":"https://api.github.com/users/agibsonccc/events{/privacy}","received_events_url":"https://api.github.com/users/agibsonccc/received_events","type":"User","site_admin":false},"body":"Use lombok's @Slf4j annotation instead (dl4j already uses lombok)","created_at":"2017-01-30T13:12:23Z","updated_at":"2017-01-30T13:15:01Z","html_url":"https://github.com/deeplearning4j/dl4j-examples/pull/339#discussion_r98437150","pull_request_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/comments/98437150"},"html":{"href":"https://github.com/deeplearning4j/dl4j-examples/pull/339#discussion_r98437150"},"pull_request":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339","id":101046826,"html_url":"https://github.com/deeplearning4j/dl4j-examples/pull/339","diff_url":"https://github.com/deeplearning4j/dl4j-examples/pull/339.diff","patch_url":"https://github.com/deeplearning4j/dl4j-examples/pull/339.patch","issue_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/339","number":339,"state":"open","locked":false,"title":"This is an example that predicts news category out of following categ…","user":{"login":"gks141270","id":20517647,"avatar_url":"https://avatars.githubusercontent.com/u/20517647?v=3","gravatar_id":"","url":"https://api.github.com/users/gks141270","html_url":"https://github.com/gks141270","followers_url":"https://api.github.com/users/gks141270/followers","following_url":"https://api.github.com/users/gks141270/following{/other_user}","gists_url":"https://api.github.com/users/gks141270/gists{/gist_id}","starred_url":"https://api.github.com/users/gks141270/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gks141270/subscriptions","organizations_url":"https://api.github.com/users/gks141270/orgs","repos_url":"https://api.github.com/users/gks141270/repos","events_url":"https://api.github.com/users/gks141270/events{/privacy}","received_events_url":"https://api.github.com/users/gks141270/received_events","type":"User","site_admin":false},"body":"This is an example that predicts news category by providing headlines\r\n\r\nIt can predict following categories\r\n- Crime\r\n- Politics\r\n- Bollywood\r\n- Sports\r\n\r\nIt uses Word2Vec and RNN networks. ","created_at":"2017-01-11T11:15:32Z","updated_at":"2017-01-30T13:15:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b25c1e9fd9f261dab99ec799b8f93f67f86541a8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339/commits","review_comments_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339/comments","review_comment_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/339/comments","statuses_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/statuses/dd37531863569d4dd51dd0d894a514837f784f6d","head":{"label":"gks141270:master","ref":"master","sha":"dd37531863569d4dd51dd0d894a514837f784f6d","user":{"login":"gks141270","id":20517647,"avatar_url":"https://avatars.githubusercontent.com/u/20517647?v=3","gravatar_id":"","url":"https://api.github.com/users/gks141270","html_url":"https://github.com/gks141270","followers_url":"https://api.github.com/users/gks141270/followers","following_url":"https://api.github.com/users/gks141270/following{/other_user}","gists_url":"https://api.github.com/users/gks141270/gists{/gist_id}","starred_url":"https://api.github.com/users/gks141270/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gks141270/subscriptions","organizations_url":"https://api.github.com/users/gks141270/orgs","repos_url":"https://api.github.com/users/gks141270/repos","events_url":"https://api.github.com/users/gks141270/events{/privacy}","received_events_url":"https://api.github.com/users/gks141270/received_events","type":"User","site_admin":false},"repo":{"id":71893094,"name":"dl4j-examples","full_name":"gks141270/dl4j-examples","owner":{"login":"gks141270","id":20517647,"avatar_url":"https://avatars.githubusercontent.com/u/20517647?v=3","gravatar_id":"","url":"https://api.github.com/users/gks141270","html_url":"https://github.com/gks141270","followers_url":"https://api.github.com/users/gks141270/followers","following_url":"https://api.github.com/users/gks141270/following{/other_user}","gists_url":"https://api.github.com/users/gks141270/gists{/gist_id}","starred_url":"https://api.github.com/users/gks141270/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gks141270/subscriptions","organizations_url":"https://api.github.com/users/gks141270/orgs","repos_url":"https://api.github.com/users/gks141270/repos","events_url":"https://api.github.com/users/gks141270/events{/privacy}","received_events_url":"https://api.github.com/users/gks141270/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gks141270/dl4j-examples","description":"Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)","fork":true,"url":"https://api.github.com/repos/gks141270/dl4j-examples","forks_url":"https://api.github.com/repos/gks141270/dl4j-examples/forks","keys_url":"https://api.github.com/repos/gks141270/dl4j-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gks141270/dl4j-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gks141270/dl4j-examples/teams","hooks_url":"https://api.github.com/repos/gks141270/dl4j-examples/hooks","issue_events_url":"https://api.github.com/repos/gks141270/dl4j-examples/issues/events{/number}","events_url":"https://api.github.com/repos/gks141270/dl4j-examples/events","assignees_url":"https://api.github.com/repos/gks141270/dl4j-examples/assignees{/user}","branches_url":"https://api.github.com/repos/gks141270/dl4j-examples/branches{/branch}","tags_url":"https://api.github.com/repos/gks141270/dl4j-examples/tags","blobs_url":"https://api.github.com/repos/gks141270/dl4j-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gks141270/dl4j-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gks141270/dl4j-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/gks141270/dl4j-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gks141270/dl4j-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/gks141270/dl4j-examples/languages","stargazers_url":"https://api.github.com/repos/gks141270/dl4j-examples/stargazers","contributors_url":"https://api.github.com/repos/gks141270/dl4j-examples/contributors","subscribers_url":"https://api.github.com/repos/gks141270/dl4j-examples/subscribers","subscription_url":"https://api.github.com/repos/gks141270/dl4j-examples/subscription","commits_url":"https://api.github.com/repos/gks141270/dl4j-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/gks141270/dl4j-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/gks141270/dl4j-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/gks141270/dl4j-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/gks141270/dl4j-examples/contents/{+path}","compare_url":"https://api.github.com/repos/gks141270/dl4j-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gks141270/dl4j-examples/merges","archive_url":"https://api.github.com/repos/gks141270/dl4j-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gks141270/dl4j-examples/downloads","issues_url":"https://api.github.com/repos/gks141270/dl4j-examples/issues{/number}","pulls_url":"https://api.github.com/repos/gks141270/dl4j-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/gks141270/dl4j-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/gks141270/dl4j-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gks141270/dl4j-examples/labels{/name}","releases_url":"https://api.github.com/repos/gks141270/dl4j-examples/releases{/id}","deployments_url":"https://api.github.com/repos/gks141270/dl4j-examples/deployments","created_at":"2016-10-25T12:07:28Z","updated_at":"2016-10-25T12:07:30Z","pushed_at":"2017-01-30T12:47:51Z","git_url":"git://github.com/gks141270/dl4j-examples.git","ssh_url":"git@github.com:gks141270/dl4j-examples.git","clone_url":"https://github.com/gks141270/dl4j-examples.git","svn_url":"https://github.com/gks141270/dl4j-examples","homepage":"http://deeplearning4j.org/","size":140878,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"deeplearning4j:master","ref":"master","sha":"f41f0c49954a3e8dd07fe662a447142f2fb6cbfe","user":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars.githubusercontent.com/u/10988606?v=3","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"repo":{"id":41310523,"name":"dl4j-examples","full_name":"deeplearning4j/dl4j-examples","owner":{"login":"deeplearning4j","id":10988606,"avatar_url":"https://avatars.githubusercontent.com/u/10988606?v=3","gravatar_id":"","url":"https://api.github.com/users/deeplearning4j","html_url":"https://github.com/deeplearning4j","followers_url":"https://api.github.com/users/deeplearning4j/followers","following_url":"https://api.github.com/users/deeplearning4j/following{/other_user}","gists_url":"https://api.github.com/users/deeplearning4j/gists{/gist_id}","starred_url":"https://api.github.com/users/deeplearning4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeplearning4j/subscriptions","organizations_url":"https://api.github.com/users/deeplearning4j/orgs","repos_url":"https://api.github.com/users/deeplearning4j/repos","events_url":"https://api.github.com/users/deeplearning4j/events{/privacy}","received_events_url":"https://api.github.com/users/deeplearning4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deeplearning4j/dl4j-examples","description":"Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)","fork":false,"url":"https://api.github.com/repos/deeplearning4j/dl4j-examples","forks_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/forks","keys_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/teams","hooks_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/hooks","issue_events_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/events{/number}","events_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/events","assignees_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/assignees{/user}","branches_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/branches{/branch}","tags_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/tags","blobs_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/languages","stargazers_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/stargazers","contributors_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/contributors","subscribers_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/subscribers","subscription_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/subscription","commits_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/contents/{+path}","compare_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/merges","archive_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/downloads","issues_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues{/number}","pulls_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/labels{/name}","releases_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/releases{/id}","deployments_url":"https://api.github.com/repos/deeplearning4j/dl4j-examples/deployments","created_at":"2015-08-24T15:17:43Z","updated_at":"2017-01-29T13:31:21Z","pushed_at":"2017-01-30T13:04:25Z","git_url":"git://github.com/deeplearning4j/dl4j-examples.git","ssh_url":"git@github.com:deeplearning4j/dl4j-examples.git","clone_url":"https://github.com/deeplearning4j/dl4j-examples.git","svn_url":"https://github.com/deeplearning4j/dl4j-examples","homepage":"http://deeplearning4j.org/","size":118964,"stargazers_count":304,"watchers_count":304,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":447,"mirror_url":null,"open_issues_count":40,"forks":447,"open_issues":40,"watchers":304,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339"},"html":{"href":"https://github.com/deeplearning4j/dl4j-examples/pull/339"},"issue":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/339"},"comments":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/deeplearning4j/dl4j-examples/statuses/dd37531863569d4dd51dd0d894a514837f784f6d"}}}}
{"actor":{"display_login":"agibsonccc"}}