{"action":"created","comment":{"url":"https://api.github.com/repos/piskvorky/gensim/pulls/comments/61594950","id":61594950,"diff_hunk":"@@ -245,11 +248,40 @@ def show_topic(self, topicid, topn=10):\n     def print_topic(self, topicid, topn=10):\n         return ' + '.join(['%.3f*%s' % v for v in self.show_topic(topicid, topn)])\n \n+\n+    def get_version(self, direc_path):\n+        \"\"\"\"\n+\n+        function to return the version of `mallet`\n+\n+        \"\"\"\n+        try:\n+            \"\"\"\n+            Check version of mallet via jar file\n+            \"\"\"\n+            archive = zipfile.ZipFile(direc_path, 'r')\n+            if u'cc/mallet/regression/' not in archive.namelist():     \n+                return '2.0.7'\n+            else:\n+                return '2.0.8RC3'\n+        except Exception:\n+            \n+            xml_path = direc_path.split(\"bin\")[0]\n+            try:\n+                doc = et.parse(xml_path + \"pom.xml\").getroot()\n+                namespace = doc.tag[:doc.tag.index('}') + 1]\n+                return doc.find(namespace + 'version').text.split(\"-\")[0]\n+            except Exception:\n+                return \"No version file to detect\"\n+        \n+\n+\n     def read_doctopics(self, fname, eps=1e-6, renorm=True):\n         \"\"\"\n         Yield document topic vectors from MALLET's \"doc-topics\" format, as sparse gensim vectors.\n \n         \"\"\"\n+        mallet_version = self.get_version(self.mallet_path)","path":"gensim/models/wrappers/ldamallet.py","position":47,"original_position":47,"commit_id":"cb9c5e75b6b9ebde96a991d1348bf20aa7d7b925","original_commit_id":"cb9c5e75b6b9ebde96a991d1348bf20aa7d7b925","user":{"login":"RishabGoel","id":15091983,"avatar_url":"https://avatars.githubusercontent.com/u/15091983?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGoel","html_url":"https://github.com/RishabGoel","followers_url":"https://api.github.com/users/RishabGoel/followers","following_url":"https://api.github.com/users/RishabGoel/following{/other_user}","gists_url":"https://api.github.com/users/RishabGoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGoel/subscriptions","organizations_url":"https://api.github.com/users/RishabGoel/orgs","repos_url":"https://api.github.com/users/RishabGoel/repos","events_url":"https://api.github.com/users/RishabGoel/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGoel/received_events","type":"User","site_admin":false},"body":"Thanks for pointing them out. I will do all of these changes and update the PR.","created_at":"2016-04-29T15:23:46Z","updated_at":"2016-04-29T15:23:46Z","html_url":"https://github.com/piskvorky/gensim/pull/664#discussion_r61594950","pull_request_url":"https://api.github.com/repos/piskvorky/gensim/pulls/664","_links":{"self":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/comments/61594950"},"html":{"href":"https://github.com/piskvorky/gensim/pull/664#discussion_r61594950"},"pull_request":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/664"}}},"pull_request":{"url":"https://api.github.com/repos/piskvorky/gensim/pulls/664","id":66057310,"html_url":"https://github.com/piskvorky/gensim/pull/664","diff_url":"https://github.com/piskvorky/gensim/pull/664.diff","patch_url":"https://github.com/piskvorky/gensim/pull/664.patch","issue_url":"https://api.github.com/repos/piskvorky/gensim/issues/664","number":664,"state":"open","locked":false,"title":"error due to mallet 2.0.7 solved","user":{"login":"RishabGoel","id":15091983,"avatar_url":"https://avatars.githubusercontent.com/u/15091983?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGoel","html_url":"https://github.com/RishabGoel","followers_url":"https://api.github.com/users/RishabGoel/followers","following_url":"https://api.github.com/users/RishabGoel/following{/other_user}","gists_url":"https://api.github.com/users/RishabGoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGoel/subscriptions","organizations_url":"https://api.github.com/users/RishabGoel/orgs","repos_url":"https://api.github.com/users/RishabGoel/repos","events_url":"https://api.github.com/users/RishabGoel/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGoel/received_events","type":"User","site_admin":false},"body":"purposing a solution for :  gensim==0.12.4 mallet wrapper is not compatible with mallet-2.0.7 #599 ","created_at":"2016-04-11T20:31:53Z","updated_at":"2016-04-29T15:23:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8db5b8705c57f6532575fa938d8132b24a09fa85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/piskvorky/gensim/pulls/664/commits","review_comments_url":"https://api.github.com/repos/piskvorky/gensim/pulls/664/comments","review_comment_url":"https://api.github.com/repos/piskvorky/gensim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piskvorky/gensim/issues/664/comments","statuses_url":"https://api.github.com/repos/piskvorky/gensim/statuses/cb9c5e75b6b9ebde96a991d1348bf20aa7d7b925","head":{"label":"RishabGoel:develop","ref":"develop","sha":"cb9c5e75b6b9ebde96a991d1348bf20aa7d7b925","user":{"login":"RishabGoel","id":15091983,"avatar_url":"https://avatars.githubusercontent.com/u/15091983?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGoel","html_url":"https://github.com/RishabGoel","followers_url":"https://api.github.com/users/RishabGoel/followers","following_url":"https://api.github.com/users/RishabGoel/following{/other_user}","gists_url":"https://api.github.com/users/RishabGoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGoel/subscriptions","organizations_url":"https://api.github.com/users/RishabGoel/orgs","repos_url":"https://api.github.com/users/RishabGoel/repos","events_url":"https://api.github.com/users/RishabGoel/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGoel/received_events","type":"User","site_admin":false},"repo":{"id":55614530,"name":"gensim","full_name":"RishabGoel/gensim","owner":{"login":"RishabGoel","id":15091983,"avatar_url":"https://avatars.githubusercontent.com/u/15091983?v=3","gravatar_id":"","url":"https://api.github.com/users/RishabGoel","html_url":"https://github.com/RishabGoel","followers_url":"https://api.github.com/users/RishabGoel/followers","following_url":"https://api.github.com/users/RishabGoel/following{/other_user}","gists_url":"https://api.github.com/users/RishabGoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RishabGoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RishabGoel/subscriptions","organizations_url":"https://api.github.com/users/RishabGoel/orgs","repos_url":"https://api.github.com/users/RishabGoel/repos","events_url":"https://api.github.com/users/RishabGoel/events{/privacy}","received_events_url":"https://api.github.com/users/RishabGoel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RishabGoel/gensim","description":"Topic Modelling for Humans","fork":true,"url":"https://api.github.com/repos/RishabGoel/gensim","forks_url":"https://api.github.com/repos/RishabGoel/gensim/forks","keys_url":"https://api.github.com/repos/RishabGoel/gensim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RishabGoel/gensim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RishabGoel/gensim/teams","hooks_url":"https://api.github.com/repos/RishabGoel/gensim/hooks","issue_events_url":"https://api.github.com/repos/RishabGoel/gensim/issues/events{/number}","events_url":"https://api.github.com/repos/RishabGoel/gensim/events","assignees_url":"https://api.github.com/repos/RishabGoel/gensim/assignees{/user}","branches_url":"https://api.github.com/repos/RishabGoel/gensim/branches{/branch}","tags_url":"https://api.github.com/repos/RishabGoel/gensim/tags","blobs_url":"https://api.github.com/repos/RishabGoel/gensim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RishabGoel/gensim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RishabGoel/gensim/git/refs{/sha}","trees_url":"https://api.github.com/repos/RishabGoel/gensim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RishabGoel/gensim/statuses/{sha}","languages_url":"https://api.github.com/repos/RishabGoel/gensim/languages","stargazers_url":"https://api.github.com/repos/RishabGoel/gensim/stargazers","contributors_url":"https://api.github.com/repos/RishabGoel/gensim/contributors","subscribers_url":"https://api.github.com/repos/RishabGoel/gensim/subscribers","subscription_url":"https://api.github.com/repos/RishabGoel/gensim/subscription","commits_url":"https://api.github.com/repos/RishabGoel/gensim/commits{/sha}","git_commits_url":"https://api.github.com/repos/RishabGoel/gensim/git/commits{/sha}","comments_url":"https://api.github.com/repos/RishabGoel/gensim/comments{/number}","issue_comment_url":"https://api.github.com/repos/RishabGoel/gensim/issues/comments{/number}","contents_url":"https://api.github.com/repos/RishabGoel/gensim/contents/{+path}","compare_url":"https://api.github.com/repos/RishabGoel/gensim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RishabGoel/gensim/merges","archive_url":"https://api.github.com/repos/RishabGoel/gensim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RishabGoel/gensim/downloads","issues_url":"https://api.github.com/repos/RishabGoel/gensim/issues{/number}","pulls_url":"https://api.github.com/repos/RishabGoel/gensim/pulls{/number}","milestones_url":"https://api.github.com/repos/RishabGoel/gensim/milestones{/number}","notifications_url":"https://api.github.com/repos/RishabGoel/gensim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RishabGoel/gensim/labels{/name}","releases_url":"https://api.github.com/repos/RishabGoel/gensim/releases{/id}","deployments_url":"https://api.github.com/repos/RishabGoel/gensim/deployments","created_at":"2016-04-06T14:49:22Z","updated_at":"2016-04-06T14:49:23Z","pushed_at":"2016-04-28T19:39:41Z","git_url":"git://github.com/RishabGoel/gensim.git","ssh_url":"git@github.com:RishabGoel/gensim.git","clone_url":"https://github.com/RishabGoel/gensim.git","svn_url":"https://github.com/RishabGoel/gensim","homepage":"http://radimrehurek.com/gensim/","size":14966,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"piskvorky:develop","ref":"develop","sha":"1be6dff55228ef484c177807cbab789e7f8563e9","user":{"login":"piskvorky","id":610412,"avatar_url":"https://avatars.githubusercontent.com/u/610412?v=3","gravatar_id":"","url":"https://api.github.com/users/piskvorky","html_url":"https://github.com/piskvorky","followers_url":"https://api.github.com/users/piskvorky/followers","following_url":"https://api.github.com/users/piskvorky/following{/other_user}","gists_url":"https://api.github.com/users/piskvorky/gists{/gist_id}","starred_url":"https://api.github.com/users/piskvorky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piskvorky/subscriptions","organizations_url":"https://api.github.com/users/piskvorky/orgs","repos_url":"https://api.github.com/users/piskvorky/repos","events_url":"https://api.github.com/users/piskvorky/events{/privacy}","received_events_url":"https://api.github.com/users/piskvorky/received_events","type":"User","site_admin":false},"repo":{"id":1349775,"name":"gensim","full_name":"piskvorky/gensim","owner":{"login":"piskvorky","id":610412,"avatar_url":"https://avatars.githubusercontent.com/u/610412?v=3","gravatar_id":"","url":"https://api.github.com/users/piskvorky","html_url":"https://github.com/piskvorky","followers_url":"https://api.github.com/users/piskvorky/followers","following_url":"https://api.github.com/users/piskvorky/following{/other_user}","gists_url":"https://api.github.com/users/piskvorky/gists{/gist_id}","starred_url":"https://api.github.com/users/piskvorky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piskvorky/subscriptions","organizations_url":"https://api.github.com/users/piskvorky/orgs","repos_url":"https://api.github.com/users/piskvorky/repos","events_url":"https://api.github.com/users/piskvorky/events{/privacy}","received_events_url":"https://api.github.com/users/piskvorky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/piskvorky/gensim","description":"Topic Modelling for Humans","fork":false,"url":"https://api.github.com/repos/piskvorky/gensim","forks_url":"https://api.github.com/repos/piskvorky/gensim/forks","keys_url":"https://api.github.com/repos/piskvorky/gensim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piskvorky/gensim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piskvorky/gensim/teams","hooks_url":"https://api.github.com/repos/piskvorky/gensim/hooks","issue_events_url":"https://api.github.com/repos/piskvorky/gensim/issues/events{/number}","events_url":"https://api.github.com/repos/piskvorky/gensim/events","assignees_url":"https://api.github.com/repos/piskvorky/gensim/assignees{/user}","branches_url":"https://api.github.com/repos/piskvorky/gensim/branches{/branch}","tags_url":"https://api.github.com/repos/piskvorky/gensim/tags","blobs_url":"https://api.github.com/repos/piskvorky/gensim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piskvorky/gensim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piskvorky/gensim/git/refs{/sha}","trees_url":"https://api.github.com/repos/piskvorky/gensim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piskvorky/gensim/statuses/{sha}","languages_url":"https://api.github.com/repos/piskvorky/gensim/languages","stargazers_url":"https://api.github.com/repos/piskvorky/gensim/stargazers","contributors_url":"https://api.github.com/repos/piskvorky/gensim/contributors","subscribers_url":"https://api.github.com/repos/piskvorky/gensim/subscribers","subscription_url":"https://api.github.com/repos/piskvorky/gensim/subscription","commits_url":"https://api.github.com/repos/piskvorky/gensim/commits{/sha}","git_commits_url":"https://api.github.com/repos/piskvorky/gensim/git/commits{/sha}","comments_url":"https://api.github.com/repos/piskvorky/gensim/comments{/number}","issue_comment_url":"https://api.github.com/repos/piskvorky/gensim/issues/comments{/number}","contents_url":"https://api.github.com/repos/piskvorky/gensim/contents/{+path}","compare_url":"https://api.github.com/repos/piskvorky/gensim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piskvorky/gensim/merges","archive_url":"https://api.github.com/repos/piskvorky/gensim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piskvorky/gensim/downloads","issues_url":"https://api.github.com/repos/piskvorky/gensim/issues{/number}","pulls_url":"https://api.github.com/repos/piskvorky/gensim/pulls{/number}","milestones_url":"https://api.github.com/repos/piskvorky/gensim/milestones{/number}","notifications_url":"https://api.github.com/repos/piskvorky/gensim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piskvorky/gensim/labels{/name}","releases_url":"https://api.github.com/repos/piskvorky/gensim/releases{/id}","deployments_url":"https://api.github.com/repos/piskvorky/gensim/deployments","created_at":"2011-02-10T07:43:04Z","updated_at":"2016-04-28T19:27:02Z","pushed_at":"2016-04-28T19:39:42Z","git_url":"git://github.com/piskvorky/gensim.git","ssh_url":"git@github.com:piskvorky/gensim.git","clone_url":"https://github.com/piskvorky/gensim.git","svn_url":"https://github.com/piskvorky/gensim","homepage":"http://radimrehurek.com/gensim/","size":19247,"stargazers_count":2473,"watchers_count":2473,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":885,"mirror_url":null,"open_issues_count":122,"forks":885,"open_issues":122,"watchers":2473,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/664"},"html":{"href":"https://github.com/piskvorky/gensim/pull/664"},"issue":{"href":"https://api.github.com/repos/piskvorky/gensim/issues/664"},"comments":{"href":"https://api.github.com/repos/piskvorky/gensim/issues/664/comments"},"review_comments":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/664/comments"},"review_comment":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piskvorky/gensim/pulls/664/commits"},"statuses":{"href":"https://api.github.com/repos/piskvorky/gensim/statuses/cb9c5e75b6b9ebde96a991d1348bf20aa7d7b925"}}}}