{"action":"created","comment":{"url":"https://api.github.com/repos/dhmit/gender_novels/pulls/comments/223376011","pull_request_review_id":162486551,"id":223376011,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzM3NjAxMQ==","diff_hunk":"@@ -111,22 +125,75 @@ def get_publication_date(author, title, id = None):\n \n def get_publication_date_from_copyright(novel_text):\n     \"\"\"\n-    Tries to extract the publication date from the copyright statement in the given text\n+    Tries to extract the publication date from the copyright statement in the\n+    given text\n+    Otherwise returns None\n+\n     >>> novel_text = \"This work blah blah blah blah COPYRIGHT, 1894 blah\n     >>> novel_text += and they all died.\"\n     >>> from gender_novels import corpus_gen\n     >>> get_publication_date_from_copyright(novel_text)\n     1894\n \n     TODO: should this function take the novel's text as a string or the id or?\n-    TODO: should function also try to find publication years not prefaced with \"copyright\" at\n-        the risk of finding arbitrary 4-digit numbers?\n+    TODO: should function also try to find publication years not prefaced with\n+        \"copyright\" at the risk of finding arbitrary 4-digit numbers?\n     :param novel_text: string\n     :return: int\n     \"\"\"\n     match = re.search(r\"(COPYRIGHT\\,*\\s*) (\\d{4})\", novel_text, flags = re.IGNORECASE)\n     return match.group(2)\n \n+def get_country_publication(author, title):\n+    \"\"\"\n+    Tries to get the country of novel\n+    @TODO: Country of origin or residence of author?\n+\n+    >>> from gender_novels import corpus_gen\n+    >>> get_country_publication(\"Hawthorne, Nathaniel\", \"The Scarlet Letter\")\n+    'United States'\n+\n+    :param author: str\n+    :param title: str\n+    :return: str\n+    \"\"\"\n+    # TODO(duan): implement this function\n+    pass\n+\n+def get_author_gender(author):\n+    \"\"\"\n+    Tries to get gender of author, 'female', 'male', or 'non-binary'.\n+    If it fails returns 'unknown'\n+\n+    >>> from gender_novels import corpus_gen\n+    >>> get_author_gender(\"Hawthorne, Nathaniel\")\n+    male\n+\n+    :param author: str\n+    :return: str\n+    \"\"\"\n+    # TODO(duan): implement this function\n+    pass\n+\n+def get_subject(author, title, id = None):\n+    \"\"\"\n+    Tries to get subjects\n+    TODO: Subject as defined by Gutenberg or LoC or what?\n+    :param: author: str\n+    :param: title: str\n+    :param: id: int\n+    :return: list\n+    \"\"\"\n+    pass\n+\n+def write_metadata(novel_metadata, path):\n+    \"\"\"\n+    Writes a row of metadata for a novel into the csv at path","path":"gender_novels/corpus_gen.py","position":211,"original_position":129,"commit_id":"9f4cafd0f24485c698dcc7729d17bfe92c77a05c","original_commit_id":"9f4cafd0f24485c698dcc7729d17bfe92c77a05c","user":{"login":"mscuthbert","id":3521479,"node_id":"MDQ6VXNlcjM1MjE0Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/3521479?v=4","gravatar_id":"","url":"https://api.github.com/users/mscuthbert","html_url":"https://github.com/mscuthbert","followers_url":"https://api.github.com/users/mscuthbert/followers","following_url":"https://api.github.com/users/mscuthbert/following{/other_user}","gists_url":"https://api.github.com/users/mscuthbert/gists{/gist_id}","starred_url":"https://api.github.com/users/mscuthbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscuthbert/subscriptions","organizations_url":"https://api.github.com/users/mscuthbert/orgs","repos_url":"https://api.github.com/users/mscuthbert/repos","events_url":"https://api.github.com/users/mscuthbert/events{/privacy}","received_events_url":"https://api.github.com/users/mscuthbert/received_events","type":"User","site_admin":false},"body":"can you add a TODO or N.B. that explains that this doesn't yet work.  in general  (approving, but a general principle to follow)","created_at":"2018-10-08T14:06:09Z","updated_at":"2018-10-08T14:06:09Z","html_url":"https://github.com/dhmit/gender_novels/pull/126#discussion_r223376011","pull_request_url":"https://api.github.com/repos/dhmit/gender_novels/pulls/126","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/comments/223376011"},"html":{"href":"https://github.com/dhmit/gender_novels/pull/126#discussion_r223376011"},"pull_request":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/dhmit/gender_novels/pulls/126","id":220978760,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwOTc4NzYw","html_url":"https://github.com/dhmit/gender_novels/pull/126","diff_url":"https://github.com/dhmit/gender_novels/pull/126.diff","patch_url":"https://github.com/dhmit/gender_novels/pull/126.patch","issue_url":"https://api.github.com/repos/dhmit/gender_novels/issues/126","number":126,"state":"open","locked":false,"title":"Plan for generating corpus","user":{"login":"equationcrunchor","id":43281248,"node_id":"MDQ6VXNlcjQzMjgxMjQ4","avatar_url":"https://avatars3.githubusercontent.com/u/43281248?v=4","gravatar_id":"","url":"https://api.github.com/users/equationcrunchor","html_url":"https://github.com/equationcrunchor","followers_url":"https://api.github.com/users/equationcrunchor/followers","following_url":"https://api.github.com/users/equationcrunchor/following{/other_user}","gists_url":"https://api.github.com/users/equationcrunchor/gists{/gist_id}","starred_url":"https://api.github.com/users/equationcrunchor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equationcrunchor/subscriptions","organizations_url":"https://api.github.com/users/equationcrunchor/orgs","repos_url":"https://api.github.com/users/equationcrunchor/repos","events_url":"https://api.github.com/users/equationcrunchor/events{/privacy}","received_events_url":"https://api.github.com/users/equationcrunchor/received_events","type":"User","site_admin":false},"body":"Outlined a plan for generating the metadata for desired books in generate_corpus_gutenberg.  ","created_at":"2018-10-07T22:47:39Z","updated_at":"2018-10-08T14:06:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2deb4f9dd91595d62323924ad272b5a9e7f663a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dhmit/gender_novels/pulls/126/commits","review_comments_url":"https://api.github.com/repos/dhmit/gender_novels/pulls/126/comments","review_comment_url":"https://api.github.com/repos/dhmit/gender_novels/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dhmit/gender_novels/issues/126/comments","statuses_url":"https://api.github.com/repos/dhmit/gender_novels/statuses/9f4cafd0f24485c698dcc7729d17bfe92c77a05c","head":{"label":"equationcrunchor:master","ref":"master","sha":"9f4cafd0f24485c698dcc7729d17bfe92c77a05c","user":{"login":"equationcrunchor","id":43281248,"node_id":"MDQ6VXNlcjQzMjgxMjQ4","avatar_url":"https://avatars3.githubusercontent.com/u/43281248?v=4","gravatar_id":"","url":"https://api.github.com/users/equationcrunchor","html_url":"https://github.com/equationcrunchor","followers_url":"https://api.github.com/users/equationcrunchor/followers","following_url":"https://api.github.com/users/equationcrunchor/following{/other_user}","gists_url":"https://api.github.com/users/equationcrunchor/gists{/gist_id}","starred_url":"https://api.github.com/users/equationcrunchor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equationcrunchor/subscriptions","organizations_url":"https://api.github.com/users/equationcrunchor/orgs","repos_url":"https://api.github.com/users/equationcrunchor/repos","events_url":"https://api.github.com/users/equationcrunchor/events{/privacy}","received_events_url":"https://api.github.com/users/equationcrunchor/received_events","type":"User","site_admin":false},"repo":{"id":148836521,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4MzY1MjE=","name":"gender_novels","full_name":"equationcrunchor/gender_novels","private":false,"owner":{"login":"equationcrunchor","id":43281248,"node_id":"MDQ6VXNlcjQzMjgxMjQ4","avatar_url":"https://avatars3.githubusercontent.com/u/43281248?v=4","gravatar_id":"","url":"https://api.github.com/users/equationcrunchor","html_url":"https://github.com/equationcrunchor","followers_url":"https://api.github.com/users/equationcrunchor/followers","following_url":"https://api.github.com/users/equationcrunchor/following{/other_user}","gists_url":"https://api.github.com/users/equationcrunchor/gists{/gist_id}","starred_url":"https://api.github.com/users/equationcrunchor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equationcrunchor/subscriptions","organizations_url":"https://api.github.com/users/equationcrunchor/orgs","repos_url":"https://api.github.com/users/equationcrunchor/repos","events_url":"https://api.github.com/users/equationcrunchor/events{/privacy}","received_events_url":"https://api.github.com/users/equationcrunchor/received_events","type":"User","site_admin":false},"html_url":"https://github.com/equationcrunchor/gender_novels","description":"Descriptions of Gender in Writing","fork":true,"url":"https://api.github.com/repos/equationcrunchor/gender_novels","forks_url":"https://api.github.com/repos/equationcrunchor/gender_novels/forks","keys_url":"https://api.github.com/repos/equationcrunchor/gender_novels/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equationcrunchor/gender_novels/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equationcrunchor/gender_novels/teams","hooks_url":"https://api.github.com/repos/equationcrunchor/gender_novels/hooks","issue_events_url":"https://api.github.com/repos/equationcrunchor/gender_novels/issues/events{/number}","events_url":"https://api.github.com/repos/equationcrunchor/gender_novels/events","assignees_url":"https://api.github.com/repos/equationcrunchor/gender_novels/assignees{/user}","branches_url":"https://api.github.com/repos/equationcrunchor/gender_novels/branches{/branch}","tags_url":"https://api.github.com/repos/equationcrunchor/gender_novels/tags","blobs_url":"https://api.github.com/repos/equationcrunchor/gender_novels/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equationcrunchor/gender_novels/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equationcrunchor/gender_novels/git/refs{/sha}","trees_url":"https://api.github.com/repos/equationcrunchor/gender_novels/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equationcrunchor/gender_novels/statuses/{sha}","languages_url":"https://api.github.com/repos/equationcrunchor/gender_novels/languages","stargazers_url":"https://api.github.com/repos/equationcrunchor/gender_novels/stargazers","contributors_url":"https://api.github.com/repos/equationcrunchor/gender_novels/contributors","subscribers_url":"https://api.github.com/repos/equationcrunchor/gender_novels/subscribers","subscription_url":"https://api.github.com/repos/equationcrunchor/gender_novels/subscription","commits_url":"https://api.github.com/repos/equationcrunchor/gender_novels/commits{/sha}","git_commits_url":"https://api.github.com/repos/equationcrunchor/gender_novels/git/commits{/sha}","comments_url":"https://api.github.com/repos/equationcrunchor/gender_novels/comments{/number}","issue_comment_url":"https://api.github.com/repos/equationcrunchor/gender_novels/issues/comments{/number}","contents_url":"https://api.github.com/repos/equationcrunchor/gender_novels/contents/{+path}","compare_url":"https://api.github.com/repos/equationcrunchor/gender_novels/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equationcrunchor/gender_novels/merges","archive_url":"https://api.github.com/repos/equationcrunchor/gender_novels/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equationcrunchor/gender_novels/downloads","issues_url":"https://api.github.com/repos/equationcrunchor/gender_novels/issues{/number}","pulls_url":"https://api.github.com/repos/equationcrunchor/gender_novels/pulls{/number}","milestones_url":"https://api.github.com/repos/equationcrunchor/gender_novels/milestones{/number}","notifications_url":"https://api.github.com/repos/equationcrunchor/gender_novels/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equationcrunchor/gender_novels/labels{/name}","releases_url":"https://api.github.com/repos/equationcrunchor/gender_novels/releases{/id}","deployments_url":"https://api.github.com/repos/equationcrunchor/gender_novels/deployments","created_at":"2018-09-14T20:05:13Z","updated_at":"2018-10-08T02:23:15Z","pushed_at":"2018-10-08T02:23:13Z","git_url":"git://github.com/equationcrunchor/gender_novels.git","ssh_url":"git@github.com:equationcrunchor/gender_novels.git","clone_url":"https://github.com/equationcrunchor/gender_novels.git","svn_url":"https://github.com/equationcrunchor/gender_novels","homepage":null,"size":44051,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dhmit:master","ref":"master","sha":"bd0e038ccc851b4d658e196f21a1a2c6b32015ba","user":{"login":"dhmit","id":42584896,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg0ODk2","avatar_url":"https://avatars3.githubusercontent.com/u/42584896?v=4","gravatar_id":"","url":"https://api.github.com/users/dhmit","html_url":"https://github.com/dhmit","followers_url":"https://api.github.com/users/dhmit/followers","following_url":"https://api.github.com/users/dhmit/following{/other_user}","gists_url":"https://api.github.com/users/dhmit/gists{/gist_id}","starred_url":"https://api.github.com/users/dhmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhmit/subscriptions","organizations_url":"https://api.github.com/users/dhmit/orgs","repos_url":"https://api.github.com/users/dhmit/repos","events_url":"https://api.github.com/users/dhmit/events{/privacy}","received_events_url":"https://api.github.com/users/dhmit/received_events","type":"Organization","site_admin":false},"repo":{"id":147417136,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc0MTcxMzY=","name":"gender_novels","full_name":"dhmit/gender_novels","private":false,"owner":{"login":"dhmit","id":42584896,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNTg0ODk2","avatar_url":"https://avatars3.githubusercontent.com/u/42584896?v=4","gravatar_id":"","url":"https://api.github.com/users/dhmit","html_url":"https://github.com/dhmit","followers_url":"https://api.github.com/users/dhmit/followers","following_url":"https://api.github.com/users/dhmit/following{/other_user}","gists_url":"https://api.github.com/users/dhmit/gists{/gist_id}","starred_url":"https://api.github.com/users/dhmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhmit/subscriptions","organizations_url":"https://api.github.com/users/dhmit/orgs","repos_url":"https://api.github.com/users/dhmit/repos","events_url":"https://api.github.com/users/dhmit/events{/privacy}","received_events_url":"https://api.github.com/users/dhmit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dhmit/gender_novels","description":"Descriptions of Gender in Writing","fork":false,"url":"https://api.github.com/repos/dhmit/gender_novels","forks_url":"https://api.github.com/repos/dhmit/gender_novels/forks","keys_url":"https://api.github.com/repos/dhmit/gender_novels/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhmit/gender_novels/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhmit/gender_novels/teams","hooks_url":"https://api.github.com/repos/dhmit/gender_novels/hooks","issue_events_url":"https://api.github.com/repos/dhmit/gender_novels/issues/events{/number}","events_url":"https://api.github.com/repos/dhmit/gender_novels/events","assignees_url":"https://api.github.com/repos/dhmit/gender_novels/assignees{/user}","branches_url":"https://api.github.com/repos/dhmit/gender_novels/branches{/branch}","tags_url":"https://api.github.com/repos/dhmit/gender_novels/tags","blobs_url":"https://api.github.com/repos/dhmit/gender_novels/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhmit/gender_novels/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhmit/gender_novels/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhmit/gender_novels/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhmit/gender_novels/statuses/{sha}","languages_url":"https://api.github.com/repos/dhmit/gender_novels/languages","stargazers_url":"https://api.github.com/repos/dhmit/gender_novels/stargazers","contributors_url":"https://api.github.com/repos/dhmit/gender_novels/contributors","subscribers_url":"https://api.github.com/repos/dhmit/gender_novels/subscribers","subscription_url":"https://api.github.com/repos/dhmit/gender_novels/subscription","commits_url":"https://api.github.com/repos/dhmit/gender_novels/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhmit/gender_novels/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhmit/gender_novels/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhmit/gender_novels/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhmit/gender_novels/contents/{+path}","compare_url":"https://api.github.com/repos/dhmit/gender_novels/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhmit/gender_novels/merges","archive_url":"https://api.github.com/repos/dhmit/gender_novels/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhmit/gender_novels/downloads","issues_url":"https://api.github.com/repos/dhmit/gender_novels/issues{/number}","pulls_url":"https://api.github.com/repos/dhmit/gender_novels/pulls{/number}","milestones_url":"https://api.github.com/repos/dhmit/gender_novels/milestones{/number}","notifications_url":"https://api.github.com/repos/dhmit/gender_novels/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhmit/gender_novels/labels{/name}","releases_url":"https://api.github.com/repos/dhmit/gender_novels/releases{/id}","deployments_url":"https://api.github.com/repos/dhmit/gender_novels/deployments","created_at":"2018-09-04T20:54:17Z","updated_at":"2018-10-06T13:49:27Z","pushed_at":"2018-10-08T02:23:14Z","git_url":"git://github.com/dhmit/gender_novels.git","ssh_url":"git@github.com:dhmit/gender_novels.git","clone_url":"https://github.com/dhmit/gender_novels.git","svn_url":"https://github.com/dhmit/gender_novels","homepage":null,"size":44044,"stargazers_count":3,"watchers_count":3,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":29,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/126"},"html":{"href":"https://github.com/dhmit/gender_novels/pull/126"},"issue":{"href":"https://api.github.com/repos/dhmit/gender_novels/issues/126"},"comments":{"href":"https://api.github.com/repos/dhmit/gender_novels/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dhmit/gender_novels/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/dhmit/gender_novels/statuses/9f4cafd0f24485c698dcc7729d17bfe92c77a05c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mscuthbert"}}