{"action":"created","comment":{"url":"https://api.github.com/repos/LangPro/Word/pulls/comments/80578646","id":80578646,"diff_hunk":"@@ -0,0 +1,53 @@\n+import nltk\n+from nltk.corpus import wordnet\n+\n+\n+class Word:\n+\n+    def __init__(self, word_text):\n+        self.text = word_text\n+        self.synonyms = []\n+        self.antonyms = []\n+        self.wnset = \"\"\n+        self.pos = \"\"\n+        self.definitionList = {}\n+        self.getPOS(self)\n+        self.getSynAnt(self)\n+\n+    #gets the nltk POS and then uses the mapper function to map to wordnet POS\n+    @staticmethod\n+    def getPOS(word):\n+        tag = nltk.pos_tag(word.text.split(\" \"))[0][1]\n+        word.pos = word.wnposmapper(tag)\n+\n+    #maps nltk POS tags to wordnet POS tags\n+    def wnposmapper(self, tag):\n+        if tag.startswith('J'):\n+            return wordnet.ADJ\n+        elif tag.startswith('V'):\n+            return wordnet.VERB\n+        elif tag.startswith('N'):\n+            return wordnet.NOUN\n+        elif tag.startswith('R'):\n+            return wordnet.ADV\n+        elif tag.startswith('S'):\n+            return wordnet.ADJ_SAT\n+        else:\n+            return ''\n+\n+    #getSynAnt will use nltk wordnet to find synonyms and antonyms\n+    @staticmethod\n+    def getSynAnt(word):\n+        #get synsets for word\n+        ssets = wordnet.synsets(word.text)\n+","path":"Word.py","position":43,"original_position":43,"commit_id":"eae5af5df953e877065783709a6a5dace845b8c3","original_commit_id":"eae5af5df953e877065783709a6a5dace845b8c3","user":{"login":"eliandrew","id":12628646,"avatar_url":"https://avatars.githubusercontent.com/u/12628646?v=3","gravatar_id":"","url":"https://api.github.com/users/eliandrew","html_url":"https://github.com/eliandrew","followers_url":"https://api.github.com/users/eliandrew/followers","following_url":"https://api.github.com/users/eliandrew/following{/other_user}","gists_url":"https://api.github.com/users/eliandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/eliandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliandrew/subscriptions","organizations_url":"https://api.github.com/users/eliandrew/orgs","repos_url":"https://api.github.com/users/eliandrew/repos","events_url":"https://api.github.com/users/eliandrew/events{/privacy}","received_events_url":"https://api.github.com/users/eliandrew/received_events","type":"User","site_admin":false},"body":"remove spaces","created_at":"2016-09-26T21:33:38Z","updated_at":"2016-09-26T21:34:29Z","html_url":"https://github.com/LangPro/Word/pull/1#discussion_r80578646","pull_request_url":"https://api.github.com/repos/LangPro/Word/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/LangPro/Word/pulls/comments/80578646"},"html":{"href":"https://github.com/LangPro/Word/pull/1#discussion_r80578646"},"pull_request":{"href":"https://api.github.com/repos/LangPro/Word/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/LangPro/Word/pulls/1","id":86820880,"html_url":"https://github.com/LangPro/Word/pull/1","diff_url":"https://github.com/LangPro/Word/pull/1.diff","patch_url":"https://github.com/LangPro/Word/pull/1.patch","issue_url":"https://api.github.com/repos/LangPro/Word/issues/1","number":1,"state":"open","locked":false,"title":"add word.py","user":{"login":"ariboyarsky","id":6960199,"avatar_url":"https://avatars.githubusercontent.com/u/6960199?v=3","gravatar_id":"","url":"https://api.github.com/users/ariboyarsky","html_url":"https://github.com/ariboyarsky","followers_url":"https://api.github.com/users/ariboyarsky/followers","following_url":"https://api.github.com/users/ariboyarsky/following{/other_user}","gists_url":"https://api.github.com/users/ariboyarsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ariboyarsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariboyarsky/subscriptions","organizations_url":"https://api.github.com/users/ariboyarsky/orgs","repos_url":"https://api.github.com/users/ariboyarsky/repos","events_url":"https://api.github.com/users/ariboyarsky/events{/privacy}","received_events_url":"https://api.github.com/users/ariboyarsky/received_events","type":"User","site_admin":false},"body":"Adds Word.py to Word repo. This is the class that will encapsulate nltk functionality relating to individual words, such as retriving definitions, synonyms, antonyms, and POS tags. ","created_at":"2016-09-26T21:18:57Z","updated_at":"2016-09-26T21:34:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fc127377011d8f70b17ce0e86bb455a4bb8cf48","assignee":{"login":"eliandrew","id":12628646,"avatar_url":"https://avatars.githubusercontent.com/u/12628646?v=3","gravatar_id":"","url":"https://api.github.com/users/eliandrew","html_url":"https://github.com/eliandrew","followers_url":"https://api.github.com/users/eliandrew/followers","following_url":"https://api.github.com/users/eliandrew/following{/other_user}","gists_url":"https://api.github.com/users/eliandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/eliandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliandrew/subscriptions","organizations_url":"https://api.github.com/users/eliandrew/orgs","repos_url":"https://api.github.com/users/eliandrew/repos","events_url":"https://api.github.com/users/eliandrew/events{/privacy}","received_events_url":"https://api.github.com/users/eliandrew/received_events","type":"User","site_admin":false},"assignees":[{"login":"eliandrew","id":12628646,"avatar_url":"https://avatars.githubusercontent.com/u/12628646?v=3","gravatar_id":"","url":"https://api.github.com/users/eliandrew","html_url":"https://github.com/eliandrew","followers_url":"https://api.github.com/users/eliandrew/followers","following_url":"https://api.github.com/users/eliandrew/following{/other_user}","gists_url":"https://api.github.com/users/eliandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/eliandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliandrew/subscriptions","organizations_url":"https://api.github.com/users/eliandrew/orgs","repos_url":"https://api.github.com/users/eliandrew/repos","events_url":"https://api.github.com/users/eliandrew/events{/privacy}","received_events_url":"https://api.github.com/users/eliandrew/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/LangPro/Word/pulls/1/commits","review_comments_url":"https://api.github.com/repos/LangPro/Word/pulls/1/comments","review_comment_url":"https://api.github.com/repos/LangPro/Word/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LangPro/Word/issues/1/comments","statuses_url":"https://api.github.com/repos/LangPro/Word/statuses/eae5af5df953e877065783709a6a5dace845b8c3","head":{"label":"LangPro:WordClass","ref":"WordClass","sha":"eae5af5df953e877065783709a6a5dace845b8c3","user":{"login":"LangPro","id":22436174,"avatar_url":"https://avatars.githubusercontent.com/u/22436174?v=3","gravatar_id":"","url":"https://api.github.com/users/LangPro","html_url":"https://github.com/LangPro","followers_url":"https://api.github.com/users/LangPro/followers","following_url":"https://api.github.com/users/LangPro/following{/other_user}","gists_url":"https://api.github.com/users/LangPro/gists{/gist_id}","starred_url":"https://api.github.com/users/LangPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LangPro/subscriptions","organizations_url":"https://api.github.com/users/LangPro/orgs","repos_url":"https://api.github.com/users/LangPro/repos","events_url":"https://api.github.com/users/LangPro/events{/privacy}","received_events_url":"https://api.github.com/users/LangPro/received_events","type":"Organization","site_admin":false},"repo":{"id":69289505,"name":"Word","full_name":"LangPro/Word","owner":{"login":"LangPro","id":22436174,"avatar_url":"https://avatars.githubusercontent.com/u/22436174?v=3","gravatar_id":"","url":"https://api.github.com/users/LangPro","html_url":"https://github.com/LangPro","followers_url":"https://api.github.com/users/LangPro/followers","following_url":"https://api.github.com/users/LangPro/following{/other_user}","gists_url":"https://api.github.com/users/LangPro/gists{/gist_id}","starred_url":"https://api.github.com/users/LangPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LangPro/subscriptions","organizations_url":"https://api.github.com/users/LangPro/orgs","repos_url":"https://api.github.com/users/LangPro/repos","events_url":"https://api.github.com/users/LangPro/events{/privacy}","received_events_url":"https://api.github.com/users/LangPro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LangPro/Word","description":"This repo will hold the Word class and associated functions for statistical NLP.","fork":false,"url":"https://api.github.com/repos/LangPro/Word","forks_url":"https://api.github.com/repos/LangPro/Word/forks","keys_url":"https://api.github.com/repos/LangPro/Word/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LangPro/Word/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LangPro/Word/teams","hooks_url":"https://api.github.com/repos/LangPro/Word/hooks","issue_events_url":"https://api.github.com/repos/LangPro/Word/issues/events{/number}","events_url":"https://api.github.com/repos/LangPro/Word/events","assignees_url":"https://api.github.com/repos/LangPro/Word/assignees{/user}","branches_url":"https://api.github.com/repos/LangPro/Word/branches{/branch}","tags_url":"https://api.github.com/repos/LangPro/Word/tags","blobs_url":"https://api.github.com/repos/LangPro/Word/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LangPro/Word/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LangPro/Word/git/refs{/sha}","trees_url":"https://api.github.com/repos/LangPro/Word/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LangPro/Word/statuses/{sha}","languages_url":"https://api.github.com/repos/LangPro/Word/languages","stargazers_url":"https://api.github.com/repos/LangPro/Word/stargazers","contributors_url":"https://api.github.com/repos/LangPro/Word/contributors","subscribers_url":"https://api.github.com/repos/LangPro/Word/subscribers","subscription_url":"https://api.github.com/repos/LangPro/Word/subscription","commits_url":"https://api.github.com/repos/LangPro/Word/commits{/sha}","git_commits_url":"https://api.github.com/repos/LangPro/Word/git/commits{/sha}","comments_url":"https://api.github.com/repos/LangPro/Word/comments{/number}","issue_comment_url":"https://api.github.com/repos/LangPro/Word/issues/comments{/number}","contents_url":"https://api.github.com/repos/LangPro/Word/contents/{+path}","compare_url":"https://api.github.com/repos/LangPro/Word/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LangPro/Word/merges","archive_url":"https://api.github.com/repos/LangPro/Word/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LangPro/Word/downloads","issues_url":"https://api.github.com/repos/LangPro/Word/issues{/number}","pulls_url":"https://api.github.com/repos/LangPro/Word/pulls{/number}","milestones_url":"https://api.github.com/repos/LangPro/Word/milestones{/number}","notifications_url":"https://api.github.com/repos/LangPro/Word/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LangPro/Word/labels{/name}","releases_url":"https://api.github.com/repos/LangPro/Word/releases{/id}","deployments_url":"https://api.github.com/repos/LangPro/Word/deployments","created_at":"2016-09-26T20:21:35Z","updated_at":"2016-09-26T20:31:34Z","pushed_at":"2016-09-26T21:18:58Z","git_url":"git://github.com/LangPro/Word.git","ssh_url":"git@github.com:LangPro/Word.git","clone_url":"https://github.com/LangPro/Word.git","svn_url":"https://github.com/LangPro/Word","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"LangPro:master","ref":"master","sha":"3d15967f5ea0c2e3928ab0932741b272dc908810","user":{"login":"LangPro","id":22436174,"avatar_url":"https://avatars.githubusercontent.com/u/22436174?v=3","gravatar_id":"","url":"https://api.github.com/users/LangPro","html_url":"https://github.com/LangPro","followers_url":"https://api.github.com/users/LangPro/followers","following_url":"https://api.github.com/users/LangPro/following{/other_user}","gists_url":"https://api.github.com/users/LangPro/gists{/gist_id}","starred_url":"https://api.github.com/users/LangPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LangPro/subscriptions","organizations_url":"https://api.github.com/users/LangPro/orgs","repos_url":"https://api.github.com/users/LangPro/repos","events_url":"https://api.github.com/users/LangPro/events{/privacy}","received_events_url":"https://api.github.com/users/LangPro/received_events","type":"Organization","site_admin":false},"repo":{"id":69289505,"name":"Word","full_name":"LangPro/Word","owner":{"login":"LangPro","id":22436174,"avatar_url":"https://avatars.githubusercontent.com/u/22436174?v=3","gravatar_id":"","url":"https://api.github.com/users/LangPro","html_url":"https://github.com/LangPro","followers_url":"https://api.github.com/users/LangPro/followers","following_url":"https://api.github.com/users/LangPro/following{/other_user}","gists_url":"https://api.github.com/users/LangPro/gists{/gist_id}","starred_url":"https://api.github.com/users/LangPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LangPro/subscriptions","organizations_url":"https://api.github.com/users/LangPro/orgs","repos_url":"https://api.github.com/users/LangPro/repos","events_url":"https://api.github.com/users/LangPro/events{/privacy}","received_events_url":"https://api.github.com/users/LangPro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LangPro/Word","description":"This repo will hold the Word class and associated functions for statistical NLP.","fork":false,"url":"https://api.github.com/repos/LangPro/Word","forks_url":"https://api.github.com/repos/LangPro/Word/forks","keys_url":"https://api.github.com/repos/LangPro/Word/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LangPro/Word/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LangPro/Word/teams","hooks_url":"https://api.github.com/repos/LangPro/Word/hooks","issue_events_url":"https://api.github.com/repos/LangPro/Word/issues/events{/number}","events_url":"https://api.github.com/repos/LangPro/Word/events","assignees_url":"https://api.github.com/repos/LangPro/Word/assignees{/user}","branches_url":"https://api.github.com/repos/LangPro/Word/branches{/branch}","tags_url":"https://api.github.com/repos/LangPro/Word/tags","blobs_url":"https://api.github.com/repos/LangPro/Word/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LangPro/Word/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LangPro/Word/git/refs{/sha}","trees_url":"https://api.github.com/repos/LangPro/Word/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LangPro/Word/statuses/{sha}","languages_url":"https://api.github.com/repos/LangPro/Word/languages","stargazers_url":"https://api.github.com/repos/LangPro/Word/stargazers","contributors_url":"https://api.github.com/repos/LangPro/Word/contributors","subscribers_url":"https://api.github.com/repos/LangPro/Word/subscribers","subscription_url":"https://api.github.com/repos/LangPro/Word/subscription","commits_url":"https://api.github.com/repos/LangPro/Word/commits{/sha}","git_commits_url":"https://api.github.com/repos/LangPro/Word/git/commits{/sha}","comments_url":"https://api.github.com/repos/LangPro/Word/comments{/number}","issue_comment_url":"https://api.github.com/repos/LangPro/Word/issues/comments{/number}","contents_url":"https://api.github.com/repos/LangPro/Word/contents/{+path}","compare_url":"https://api.github.com/repos/LangPro/Word/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LangPro/Word/merges","archive_url":"https://api.github.com/repos/LangPro/Word/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LangPro/Word/downloads","issues_url":"https://api.github.com/repos/LangPro/Word/issues{/number}","pulls_url":"https://api.github.com/repos/LangPro/Word/pulls{/number}","milestones_url":"https://api.github.com/repos/LangPro/Word/milestones{/number}","notifications_url":"https://api.github.com/repos/LangPro/Word/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LangPro/Word/labels{/name}","releases_url":"https://api.github.com/repos/LangPro/Word/releases{/id}","deployments_url":"https://api.github.com/repos/LangPro/Word/deployments","created_at":"2016-09-26T20:21:35Z","updated_at":"2016-09-26T20:31:34Z","pushed_at":"2016-09-26T21:18:58Z","git_url":"git://github.com/LangPro/Word.git","ssh_url":"git@github.com:LangPro/Word.git","clone_url":"https://github.com/LangPro/Word.git","svn_url":"https://github.com/LangPro/Word","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LangPro/Word/pulls/1"},"html":{"href":"https://github.com/LangPro/Word/pull/1"},"issue":{"href":"https://api.github.com/repos/LangPro/Word/issues/1"},"comments":{"href":"https://api.github.com/repos/LangPro/Word/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/LangPro/Word/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/LangPro/Word/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LangPro/Word/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/LangPro/Word/statuses/eae5af5df953e877065783709a6a5dace845b8c3"}}}}
{"actor":{"display_login":"eliandrew"}}