{"action":"created","comment":{"url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments/34104107","id":34104107,"diff_hunk":"@@ -0,0 +1,36 @@\n+import random\n+\n+\n+d = {}\n+\n+\n+def read_text(lines):\n+    for x in range(0, len(lines) - 1):\n+        words = lines[x].lower().split()\n+        for y in range(0, len(words) - 2):\n+            d[(words[y], words[y + 1])] = [words[y + 2]]\n+    generate_new_text(d)\n+\n+\n+def generate_new_text(d):\n+    new_text_story = \"\"\n+    for x in range(1):\n+        new_sentence = list(random.choice(list(d.keys())))\n+        new_sentence[0] = new_sentence[0].capitalize()\n+        for y in range(random.randint(5, 10)):\n+            words = random.choice(list(d.keys()))\n+            new_sentence.extend(words)","path":"hw13/trigrams.py","position":22,"original_position":22,"commit_id":"55c563d49581115b9227aded5829122cf1f3bc10","original_commit_id":"55c563d49581115b9227aded5829122cf1f3bc10","user":{"login":"joelstanner","id":3937302,"avatar_url":"https://avatars.githubusercontent.com/u/3937302?v=3","gravatar_id":"","url":"https://api.github.com/users/joelstanner","html_url":"https://github.com/joelstanner","followers_url":"https://api.github.com/users/joelstanner/followers","following_url":"https://api.github.com/users/joelstanner/following{/other_user}","gists_url":"https://api.github.com/users/joelstanner/gists{/gist_id}","starred_url":"https://api.github.com/users/joelstanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelstanner/subscriptions","organizations_url":"https://api.github.com/users/joelstanner/orgs","repos_url":"https://api.github.com/users/joelstanner/repos","events_url":"https://api.github.com/users/joelstanner/events{/privacy}","received_events_url":"https://api.github.com/users/joelstanner/received_events","type":"User","site_admin":false},"body":"What you are wanting to do is select two words, and then append a third word from the dictionary of trigrams based on the two word key. Next you take the previous two words and repeat the process. This is just finding random word pairs and stringing them together. Your trigram story will read much more like real sentences when functioning properly.","created_at":"2015-07-07T23:44:29Z","updated_at":"2015-07-07T23:44:29Z","html_url":"https://github.com/samanthaprince/sea-c42-python/pull/5#discussion_r34104107","pull_request_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments/34104107"},"html":{"href":"https://github.com/samanthaprince/sea-c42-python/pull/5#discussion_r34104107"},"pull_request":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5","id":39230544,"html_url":"https://github.com/samanthaprince/sea-c42-python/pull/5","diff_url":"https://github.com/samanthaprince/sea-c42-python/pull/5.diff","patch_url":"https://github.com/samanthaprince/sea-c42-python/pull/5.patch","issue_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/5","number":5,"state":"open","locked":false,"title":"S. Prince - Hw13","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-06T01:24:26Z","updated_at":"2015-07-07T23:44:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"505f02fae62d690c157735e0536593b3b0e540b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5/commits","review_comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5/comments","review_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/5/comments","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/55c563d49581115b9227aded5829122cf1f3bc10","head":{"label":"samanthaprince:hw13","ref":"hw13","sha":"55c563d49581115b9227aded5829122cf1f3bc10","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"repo":{"id":37503652,"name":"sea-c42-python","full_name":"samanthaprince/sea-c42-python","owner":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samanthaprince/sea-c42-python","description":"Python F2 Class sea-c42","fork":true,"url":"https://api.github.com/repos/samanthaprince/sea-c42-python","forks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/forks","keys_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/teams","hooks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/hooks","issue_events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/events{/number}","events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/events","assignees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/assignees{/user}","branches_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/branches{/branch}","tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/tags","blobs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/{sha}","languages_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/languages","stargazers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/stargazers","contributors_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contributors","subscribers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscribers","subscription_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscription","commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contents/{+path}","compare_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/merges","archive_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/downloads","issues_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues{/number}","pulls_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls{/number}","milestones_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/milestones{/number}","notifications_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/labels{/name}","releases_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/releases{/id}","created_at":"2015-06-16T02:38:42Z","updated_at":"2015-06-16T02:38:43Z","pushed_at":"2015-07-06T01:24:26Z","git_url":"git://github.com/samanthaprince/sea-c42-python.git","ssh_url":"git@github.com:samanthaprince/sea-c42-python.git","clone_url":"https://github.com/samanthaprince/sea-c42-python.git","svn_url":"https://github.com/samanthaprince/sea-c42-python","homepage":null,"size":1789,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"samanthaprince:master","ref":"master","sha":"95e2ce3adfd858bfcd73e75f52151d48a2f6cd6d","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"repo":{"id":37503652,"name":"sea-c42-python","full_name":"samanthaprince/sea-c42-python","owner":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samanthaprince/sea-c42-python","description":"Python F2 Class sea-c42","fork":true,"url":"https://api.github.com/repos/samanthaprince/sea-c42-python","forks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/forks","keys_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/teams","hooks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/hooks","issue_events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/events{/number}","events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/events","assignees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/assignees{/user}","branches_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/branches{/branch}","tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/tags","blobs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/{sha}","languages_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/languages","stargazers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/stargazers","contributors_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contributors","subscribers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscribers","subscription_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscription","commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contents/{+path}","compare_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/merges","archive_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/downloads","issues_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues{/number}","pulls_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls{/number}","milestones_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/milestones{/number}","notifications_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/labels{/name}","releases_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/releases{/id}","created_at":"2015-06-16T02:38:42Z","updated_at":"2015-06-16T02:38:43Z","pushed_at":"2015-07-06T01:24:26Z","git_url":"git://github.com/samanthaprince/sea-c42-python.git","ssh_url":"git@github.com:samanthaprince/sea-c42-python.git","clone_url":"https://github.com/samanthaprince/sea-c42-python.git","svn_url":"https://github.com/samanthaprince/sea-c42-python","homepage":null,"size":1789,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5"},"html":{"href":"https://github.com/samanthaprince/sea-c42-python/pull/5"},"issue":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/5"},"comments":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/55c563d49581115b9227aded5829122cf1f3bc10"}}}}