{"action":"created","comment":{"url":"https://api.github.com/repos/textpipe/textpipe/pulls/comments/216925194","pull_request_review_id":154517754,"id":216925194,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjkyNTE5NA==","diff_hunk":"@@ -226,6 +237,18 @@ def nwords(self):\n         \"\"\"\n         return len(self.clean.split())\n \n+    @property\n+    def words(self, model_name=None):\n+        \"\"\"\n+        Extract the text and character offsets of words from text\n+\n+        >>> doc = Doc('Test sentence for testing text.')\n+        >>> doc.words\n+        [(0, 4, 'Test'), (5, 13, 'sentence'), (14, 17, 'for'), (18, 25, 'testing'), (26, 30, 'text'), (30, 31, '.')]","path":"textpipe/doc.py","position":46,"original_position":46,"commit_id":"9912f01e5c19b991d9d9eca07e1a2729d31435b7","original_commit_id":"9912f01e5c19b991d9d9eca07e1a2729d31435b7","user":{"login":"graus","id":894054,"node_id":"MDQ6VXNlcjg5NDA1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/894054?v=4","gravatar_id":"","url":"https://api.github.com/users/graus","html_url":"https://github.com/graus","followers_url":"https://api.github.com/users/graus/followers","following_url":"https://api.github.com/users/graus/following{/other_user}","gists_url":"https://api.github.com/users/graus/gists{/gist_id}","starred_url":"https://api.github.com/users/graus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graus/subscriptions","organizations_url":"https://api.github.com/users/graus/orgs","repos_url":"https://api.github.com/users/graus/repos","events_url":"https://api.github.com/users/graus/events{/privacy}","received_events_url":"https://api.github.com/users/graus/received_events","type":"User","site_admin":false},"body":"Maybe different use-cases deserve different properties; what about having a `sents` prop for text, and `sent_offsets` with char_start/char_end (or char_start/char_len) tuples? Same for `words`","created_at":"2018-09-12T07:37:26Z","updated_at":"2018-09-12T07:37:26Z","html_url":"https://github.com/textpipe/textpipe/pull/66#discussion_r216925194","pull_request_url":"https://api.github.com/repos/textpipe/textpipe/pulls/66","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/comments/216925194"},"html":{"href":"https://github.com/textpipe/textpipe/pull/66#discussion_r216925194"},"pull_request":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/66"}},"in_reply_to_id":216659337},"pull_request":{"url":"https://api.github.com/repos/textpipe/textpipe/pulls/66","id":214618864,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NjE4ODY0","html_url":"https://github.com/textpipe/textpipe/pull/66","diff_url":"https://github.com/textpipe/textpipe/pull/66.diff","patch_url":"https://github.com/textpipe/textpipe/pull/66.patch","issue_url":"https://api.github.com/repos/textpipe/textpipe/issues/66","number":66,"state":"open","locked":false,"title":"Adds sents and words properties ","user":{"login":"msappelli","id":1128359,"node_id":"MDQ6VXNlcjExMjgzNTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1128359?v=4","gravatar_id":"","url":"https://api.github.com/users/msappelli","html_url":"https://github.com/msappelli","followers_url":"https://api.github.com/users/msappelli/followers","following_url":"https://api.github.com/users/msappelli/following{/other_user}","gists_url":"https://api.github.com/users/msappelli/gists{/gist_id}","starred_url":"https://api.github.com/users/msappelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msappelli/subscriptions","organizations_url":"https://api.github.com/users/msappelli/orgs","repos_url":"https://api.github.com/users/msappelli/repos","events_url":"https://api.github.com/users/msappelli/events{/privacy}","received_events_url":"https://api.github.com/users/msappelli/received_events","type":"User","site_admin":false},"body":"which return character offsets and texts of sentences and words respectively","created_at":"2018-09-11T12:42:04Z","updated_at":"2018-09-12T07:37:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8712da0c28cdcacceee1ac9a9dec7f50671ad91","assignee":null,"assignees":[],"requested_reviewers":[{"login":"TanjaCrijns","id":15379076,"node_id":"MDQ6VXNlcjE1Mzc5MDc2","avatar_url":"https://avatars0.githubusercontent.com/u/15379076?v=4","gravatar_id":"","url":"https://api.github.com/users/TanjaCrijns","html_url":"https://github.com/TanjaCrijns","followers_url":"https://api.github.com/users/TanjaCrijns/followers","following_url":"https://api.github.com/users/TanjaCrijns/following{/other_user}","gists_url":"https://api.github.com/users/TanjaCrijns/gists{/gist_id}","starred_url":"https://api.github.com/users/TanjaCrijns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TanjaCrijns/subscriptions","organizations_url":"https://api.github.com/users/TanjaCrijns/orgs","repos_url":"https://api.github.com/users/TanjaCrijns/repos","events_url":"https://api.github.com/users/TanjaCrijns/events{/privacy}","received_events_url":"https://api.github.com/users/TanjaCrijns/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/textpipe/textpipe/pulls/66/commits","review_comments_url":"https://api.github.com/repos/textpipe/textpipe/pulls/66/comments","review_comment_url":"https://api.github.com/repos/textpipe/textpipe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/textpipe/textpipe/issues/66/comments","statuses_url":"https://api.github.com/repos/textpipe/textpipe/statuses/9912f01e5c19b991d9d9eca07e1a2729d31435b7","head":{"label":"textpipe:feature/add-sent-word-properties","ref":"feature/add-sent-word-properties","sha":"9912f01e5c19b991d9d9eca07e1a2729d31435b7","user":{"login":"textpipe","id":40492530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNDkyNTMw","avatar_url":"https://avatars2.githubusercontent.com/u/40492530?v=4","gravatar_id":"","url":"https://api.github.com/users/textpipe","html_url":"https://github.com/textpipe","followers_url":"https://api.github.com/users/textpipe/followers","following_url":"https://api.github.com/users/textpipe/following{/other_user}","gists_url":"https://api.github.com/users/textpipe/gists{/gist_id}","starred_url":"https://api.github.com/users/textpipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textpipe/subscriptions","organizations_url":"https://api.github.com/users/textpipe/orgs","repos_url":"https://api.github.com/users/textpipe/repos","events_url":"https://api.github.com/users/textpipe/events{/privacy}","received_events_url":"https://api.github.com/users/textpipe/received_events","type":"Organization","site_admin":false},"repo":{"id":138195162,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxOTUxNjI=","name":"textpipe","full_name":"textpipe/textpipe","owner":{"login":"textpipe","id":40492530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNDkyNTMw","avatar_url":"https://avatars2.githubusercontent.com/u/40492530?v=4","gravatar_id":"","url":"https://api.github.com/users/textpipe","html_url":"https://github.com/textpipe","followers_url":"https://api.github.com/users/textpipe/followers","following_url":"https://api.github.com/users/textpipe/following{/other_user}","gists_url":"https://api.github.com/users/textpipe/gists{/gist_id}","starred_url":"https://api.github.com/users/textpipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textpipe/subscriptions","organizations_url":"https://api.github.com/users/textpipe/orgs","repos_url":"https://api.github.com/users/textpipe/repos","events_url":"https://api.github.com/users/textpipe/events{/privacy}","received_events_url":"https://api.github.com/users/textpipe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/textpipe/textpipe","description":"Textpipe: clean and extract metadata from text","fork":false,"url":"https://api.github.com/repos/textpipe/textpipe","forks_url":"https://api.github.com/repos/textpipe/textpipe/forks","keys_url":"https://api.github.com/repos/textpipe/textpipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/textpipe/textpipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/textpipe/textpipe/teams","hooks_url":"https://api.github.com/repos/textpipe/textpipe/hooks","issue_events_url":"https://api.github.com/repos/textpipe/textpipe/issues/events{/number}","events_url":"https://api.github.com/repos/textpipe/textpipe/events","assignees_url":"https://api.github.com/repos/textpipe/textpipe/assignees{/user}","branches_url":"https://api.github.com/repos/textpipe/textpipe/branches{/branch}","tags_url":"https://api.github.com/repos/textpipe/textpipe/tags","blobs_url":"https://api.github.com/repos/textpipe/textpipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/textpipe/textpipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/textpipe/textpipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/textpipe/textpipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/textpipe/textpipe/statuses/{sha}","languages_url":"https://api.github.com/repos/textpipe/textpipe/languages","stargazers_url":"https://api.github.com/repos/textpipe/textpipe/stargazers","contributors_url":"https://api.github.com/repos/textpipe/textpipe/contributors","subscribers_url":"https://api.github.com/repos/textpipe/textpipe/subscribers","subscription_url":"https://api.github.com/repos/textpipe/textpipe/subscription","commits_url":"https://api.github.com/repos/textpipe/textpipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/textpipe/textpipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/textpipe/textpipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/textpipe/textpipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/textpipe/textpipe/contents/{+path}","compare_url":"https://api.github.com/repos/textpipe/textpipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/textpipe/textpipe/merges","archive_url":"https://api.github.com/repos/textpipe/textpipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/textpipe/textpipe/downloads","issues_url":"https://api.github.com/repos/textpipe/textpipe/issues{/number}","pulls_url":"https://api.github.com/repos/textpipe/textpipe/pulls{/number}","milestones_url":"https://api.github.com/repos/textpipe/textpipe/milestones{/number}","notifications_url":"https://api.github.com/repos/textpipe/textpipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/textpipe/textpipe/labels{/name}","releases_url":"https://api.github.com/repos/textpipe/textpipe/releases{/id}","deployments_url":"https://api.github.com/repos/textpipe/textpipe/deployments","created_at":"2018-06-21T16:23:32Z","updated_at":"2018-09-10T09:41:38Z","pushed_at":"2018-09-11T12:42:04Z","git_url":"git://github.com/textpipe/textpipe.git","ssh_url":"git@github.com:textpipe/textpipe.git","clone_url":"https://github.com/textpipe/textpipe.git","svn_url":"https://github.com/textpipe/textpipe","homepage":"","size":109,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":14,"watchers":38,"default_branch":"master"}},"base":{"label":"textpipe:master","ref":"master","sha":"34efc60df30cfbd989bb635b22046beb3cdb18e6","user":{"login":"textpipe","id":40492530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNDkyNTMw","avatar_url":"https://avatars2.githubusercontent.com/u/40492530?v=4","gravatar_id":"","url":"https://api.github.com/users/textpipe","html_url":"https://github.com/textpipe","followers_url":"https://api.github.com/users/textpipe/followers","following_url":"https://api.github.com/users/textpipe/following{/other_user}","gists_url":"https://api.github.com/users/textpipe/gists{/gist_id}","starred_url":"https://api.github.com/users/textpipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textpipe/subscriptions","organizations_url":"https://api.github.com/users/textpipe/orgs","repos_url":"https://api.github.com/users/textpipe/repos","events_url":"https://api.github.com/users/textpipe/events{/privacy}","received_events_url":"https://api.github.com/users/textpipe/received_events","type":"Organization","site_admin":false},"repo":{"id":138195162,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxOTUxNjI=","name":"textpipe","full_name":"textpipe/textpipe","owner":{"login":"textpipe","id":40492530,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNDkyNTMw","avatar_url":"https://avatars2.githubusercontent.com/u/40492530?v=4","gravatar_id":"","url":"https://api.github.com/users/textpipe","html_url":"https://github.com/textpipe","followers_url":"https://api.github.com/users/textpipe/followers","following_url":"https://api.github.com/users/textpipe/following{/other_user}","gists_url":"https://api.github.com/users/textpipe/gists{/gist_id}","starred_url":"https://api.github.com/users/textpipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/textpipe/subscriptions","organizations_url":"https://api.github.com/users/textpipe/orgs","repos_url":"https://api.github.com/users/textpipe/repos","events_url":"https://api.github.com/users/textpipe/events{/privacy}","received_events_url":"https://api.github.com/users/textpipe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/textpipe/textpipe","description":"Textpipe: clean and extract metadata from text","fork":false,"url":"https://api.github.com/repos/textpipe/textpipe","forks_url":"https://api.github.com/repos/textpipe/textpipe/forks","keys_url":"https://api.github.com/repos/textpipe/textpipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/textpipe/textpipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/textpipe/textpipe/teams","hooks_url":"https://api.github.com/repos/textpipe/textpipe/hooks","issue_events_url":"https://api.github.com/repos/textpipe/textpipe/issues/events{/number}","events_url":"https://api.github.com/repos/textpipe/textpipe/events","assignees_url":"https://api.github.com/repos/textpipe/textpipe/assignees{/user}","branches_url":"https://api.github.com/repos/textpipe/textpipe/branches{/branch}","tags_url":"https://api.github.com/repos/textpipe/textpipe/tags","blobs_url":"https://api.github.com/repos/textpipe/textpipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/textpipe/textpipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/textpipe/textpipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/textpipe/textpipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/textpipe/textpipe/statuses/{sha}","languages_url":"https://api.github.com/repos/textpipe/textpipe/languages","stargazers_url":"https://api.github.com/repos/textpipe/textpipe/stargazers","contributors_url":"https://api.github.com/repos/textpipe/textpipe/contributors","subscribers_url":"https://api.github.com/repos/textpipe/textpipe/subscribers","subscription_url":"https://api.github.com/repos/textpipe/textpipe/subscription","commits_url":"https://api.github.com/repos/textpipe/textpipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/textpipe/textpipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/textpipe/textpipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/textpipe/textpipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/textpipe/textpipe/contents/{+path}","compare_url":"https://api.github.com/repos/textpipe/textpipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/textpipe/textpipe/merges","archive_url":"https://api.github.com/repos/textpipe/textpipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/textpipe/textpipe/downloads","issues_url":"https://api.github.com/repos/textpipe/textpipe/issues{/number}","pulls_url":"https://api.github.com/repos/textpipe/textpipe/pulls{/number}","milestones_url":"https://api.github.com/repos/textpipe/textpipe/milestones{/number}","notifications_url":"https://api.github.com/repos/textpipe/textpipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/textpipe/textpipe/labels{/name}","releases_url":"https://api.github.com/repos/textpipe/textpipe/releases{/id}","deployments_url":"https://api.github.com/repos/textpipe/textpipe/deployments","created_at":"2018-06-21T16:23:32Z","updated_at":"2018-09-10T09:41:38Z","pushed_at":"2018-09-11T12:42:04Z","git_url":"git://github.com/textpipe/textpipe.git","ssh_url":"git@github.com:textpipe/textpipe.git","clone_url":"https://github.com/textpipe/textpipe.git","svn_url":"https://github.com/textpipe/textpipe","homepage":"","size":109,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":14,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/66"},"html":{"href":"https://github.com/textpipe/textpipe/pull/66"},"issue":{"href":"https://api.github.com/repos/textpipe/textpipe/issues/66"},"comments":{"href":"https://api.github.com/repos/textpipe/textpipe/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/textpipe/textpipe/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/textpipe/textpipe/statuses/9912f01e5c19b991d9d9eca07e1a2729d31435b7"}},"author_association":"NONE"}}
{"actor":{"display_login":"graus"}}