{"action":"created","comment":{"url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/comments/62496755","id":62496755,"diff_hunk":"@@ -0,0 +1,43 @@\n+var getSentences = require( \"../stringProcessing/getSentences.js\" );\n+var getWords = require( \"../stringProcessing/getWords.js\" );\n+var stripSpaces = require( \"../stringProcessing/stripSpaces.js\" );\n+var firstWordExceptions = require ( \"../config/firstWordExceptions.js\" )();\n+\n+/**\n+ * Compares the first word of each sentence with the first word of the following sentence.\n+ * @param {array} sentenceBeginnings The array containing the first word of each sentence.\n+ * @returns {array} The array containing the objects containing the first words and the corresponding counts.\n+ */\n+var compareFirstWords = function ( sentenceBeginnings ) {\n+\tvar counts = [];\n+\tvar count = 1;\n+\tfor ( var i = 0; i < sentenceBeginnings.length; i++ ) {\n+\t\tif ( sentenceBeginnings[ i ] === sentenceBeginnings[ i + 1 ] ) {\n+\t\t\tcount++;\n+\t\t} else {\n+\t\t\tcounts.push( { word: sentenceBeginnings[ i ], count: count } );\n+\t\t\tcount = 1;\n+\t\t}\n+\t}\n+\treturn counts;\n+};\n+\n+/**\n+ * Gets the first word of each sentence from the text, and returns an object containing the first word of each sentence and the corresponding counts.\n+ * @param {Paper} paper The Paper object to get the text from.\n+ * @returns {Object} The object containing the first word of each sentence and the corresponding counts.\n+ */\n+module.exports = function( paper ) {\n+\tvar text = paper.getText();\n+\tvar sentences = getSentences( text );\n+\tvar sentenceBeginnings = sentences.map( function( sentence ) {\n+\t\tsentence = stripSpaces( sentence );","path":"js/researches/getSentenceBeginnings.js","position":34,"original_position":34,"commit_id":"c59d22ee6a9e43c3a958469c63cabb2b250c67a7","original_commit_id":"c59d22ee6a9e43c3a958469c63cabb2b250c67a7","user":{"login":"jcomack","id":4181340,"avatar_url":"https://avatars.githubusercontent.com/u/4181340?v=3","gravatar_id":"","url":"https://api.github.com/users/jcomack","html_url":"https://github.com/jcomack","followers_url":"https://api.github.com/users/jcomack/followers","following_url":"https://api.github.com/users/jcomack/following{/other_user}","gists_url":"https://api.github.com/users/jcomack/gists{/gist_id}","starred_url":"https://api.github.com/users/jcomack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcomack/subscriptions","organizations_url":"https://api.github.com/users/jcomack/orgs","repos_url":"https://api.github.com/users/jcomack/repos","events_url":"https://api.github.com/users/jcomack/events{/privacy}","received_events_url":"https://api.github.com/users/jcomack/received_events","type":"User","site_admin":false},"body":"You could directly pass this into `getWords`.","created_at":"2016-05-09T13:25:36Z","updated_at":"2016-05-09T13:25:36Z","html_url":"https://github.com/Yoast/YoastSEO.js/pull/479#discussion_r62496755","pull_request_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479","_links":{"self":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/comments/62496755"},"html":{"href":"https://github.com/Yoast/YoastSEO.js/pull/479#discussion_r62496755"},"pull_request":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479"}}},"pull_request":{"url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479","id":68852488,"html_url":"https://github.com/Yoast/YoastSEO.js/pull/479","diff_url":"https://github.com/Yoast/YoastSEO.js/pull/479.diff","patch_url":"https://github.com/Yoast/YoastSEO.js/pull/479.patch","issue_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/479","number":479,"state":"open","locked":false,"title":"Create sentence beginning assessment","user":{"login":"IreneStr","id":17744553,"avatar_url":"https://avatars.githubusercontent.com/u/17744553?v=3","gravatar_id":"","url":"https://api.github.com/users/IreneStr","html_url":"https://github.com/IreneStr","followers_url":"https://api.github.com/users/IreneStr/followers","following_url":"https://api.github.com/users/IreneStr/following{/other_user}","gists_url":"https://api.github.com/users/IreneStr/gists{/gist_id}","starred_url":"https://api.github.com/users/IreneStr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IreneStr/subscriptions","organizations_url":"https://api.github.com/users/IreneStr/orgs","repos_url":"https://api.github.com/users/IreneStr/repos","events_url":"https://api.github.com/users/IreneStr/events{/privacy}","received_events_url":"https://api.github.com/users/IreneStr/received_events","type":"User","site_admin":false},"body":"Creates sentence beginning assessment.\r\n\r\nFixes #346\r\n\r\nFor testing, run grunt build and test in the browserified example","created_at":"2016-05-04T12:19:49Z","updated_at":"2016-05-09T13:25:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a192f43041ccd404740dc88330c02b4b48632cfb","assignee":null,"milestone":{"url":"https://api.github.com/repos/Yoast/YoastSEO.js/milestones/9","html_url":"https://github.com/Yoast/YoastSEO.js/milestones/1.3","labels_url":"https://api.github.com/repos/Yoast/YoastSEO.js/milestones/9/labels","id":1632637,"number":9,"title":"1.3","description":"Planned features:\r\n- 11 new content checks, see: [YoastSEO.js Github](https://github.com/Yoast/YoastSEO.js/issues?q=is%3Aopen+milestone%3A1.3+label%3A%22new+assessments%22)\r\n- Separation between content and keyword score. \r\n- Decoration of analyses in the editor.\r\n- Being able to handle [language specific transliteration of special characters in urls](https://github.com/Yoast/YoastSEO.js/issues/293).\r\n- Localization of the Flesch reading ease test for [6 extra languages](https://github.com/Yoast/YoastSEO.js/issues/267).","creator":{"login":"omarreiss","id":1488816,"avatar_url":"https://avatars.githubusercontent.com/u/1488816?v=3","gravatar_id":"","url":"https://api.github.com/users/omarreiss","html_url":"https://github.com/omarreiss","followers_url":"https://api.github.com/users/omarreiss/followers","following_url":"https://api.github.com/users/omarreiss/following{/other_user}","gists_url":"https://api.github.com/users/omarreiss/gists{/gist_id}","starred_url":"https://api.github.com/users/omarreiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarreiss/subscriptions","organizations_url":"https://api.github.com/users/omarreiss/orgs","repos_url":"https://api.github.com/users/omarreiss/repos","events_url":"https://api.github.com/users/omarreiss/events{/privacy}","received_events_url":"https://api.github.com/users/omarreiss/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":20,"state":"open","created_at":"2016-03-09T10:26:31Z","updated_at":"2016-05-09T13:16:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479/commits","review_comments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479/comments","review_comment_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/479/comments","statuses_url":"https://api.github.com/repos/Yoast/YoastSEO.js/statuses/c59d22ee6a9e43c3a958469c63cabb2b250c67a7","head":{"label":"Yoast:stories/IS/sentence-beginning-assessment","ref":"stories/IS/sentence-beginning-assessment","sha":"c59d22ee6a9e43c3a958469c63cabb2b250c67a7","user":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":32734884,"name":"YoastSEO.js","full_name":"Yoast/YoastSEO.js","owner":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yoast/YoastSEO.js","description":"Analyze content on a page and give SEO feedback as well as render a snippet preview.","fork":false,"url":"https://api.github.com/repos/Yoast/YoastSEO.js","forks_url":"https://api.github.com/repos/Yoast/YoastSEO.js/forks","keys_url":"https://api.github.com/repos/Yoast/YoastSEO.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/YoastSEO.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/YoastSEO.js/teams","hooks_url":"https://api.github.com/repos/Yoast/YoastSEO.js/hooks","issue_events_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/YoastSEO.js/events","assignees_url":"https://api.github.com/repos/Yoast/YoastSEO.js/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/YoastSEO.js/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/YoastSEO.js/tags","blobs_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/YoastSEO.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/YoastSEO.js/languages","stargazers_url":"https://api.github.com/repos/Yoast/YoastSEO.js/stargazers","contributors_url":"https://api.github.com/repos/Yoast/YoastSEO.js/contributors","subscribers_url":"https://api.github.com/repos/Yoast/YoastSEO.js/subscribers","subscription_url":"https://api.github.com/repos/Yoast/YoastSEO.js/subscription","commits_url":"https://api.github.com/repos/Yoast/YoastSEO.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/YoastSEO.js/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/YoastSEO.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/YoastSEO.js/merges","archive_url":"https://api.github.com/repos/Yoast/YoastSEO.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/YoastSEO.js/downloads","issues_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/YoastSEO.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/YoastSEO.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/YoastSEO.js/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/YoastSEO.js/releases{/id}","deployments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/deployments","created_at":"2015-03-23T13:50:16Z","updated_at":"2016-05-02T11:39:52Z","pushed_at":"2016-05-09T13:05:51Z","git_url":"git://github.com/Yoast/YoastSEO.js.git","ssh_url":"git@github.com:Yoast/YoastSEO.js.git","clone_url":"https://github.com/Yoast/YoastSEO.js.git","svn_url":"https://github.com/Yoast/YoastSEO.js","homepage":"","size":4150,"stargazers_count":43,"watchers_count":43,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":72,"forks":12,"open_issues":72,"watchers":43,"default_branch":"develop"}},"base":{"label":"Yoast:develop","ref":"develop","sha":"7a88b2a1d7c7f92a878114ed006f02652ec68da0","user":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":32734884,"name":"YoastSEO.js","full_name":"Yoast/YoastSEO.js","owner":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yoast/YoastSEO.js","description":"Analyze content on a page and give SEO feedback as well as render a snippet preview.","fork":false,"url":"https://api.github.com/repos/Yoast/YoastSEO.js","forks_url":"https://api.github.com/repos/Yoast/YoastSEO.js/forks","keys_url":"https://api.github.com/repos/Yoast/YoastSEO.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/YoastSEO.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/YoastSEO.js/teams","hooks_url":"https://api.github.com/repos/Yoast/YoastSEO.js/hooks","issue_events_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/YoastSEO.js/events","assignees_url":"https://api.github.com/repos/Yoast/YoastSEO.js/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/YoastSEO.js/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/YoastSEO.js/tags","blobs_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/YoastSEO.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/YoastSEO.js/languages","stargazers_url":"https://api.github.com/repos/Yoast/YoastSEO.js/stargazers","contributors_url":"https://api.github.com/repos/Yoast/YoastSEO.js/contributors","subscribers_url":"https://api.github.com/repos/Yoast/YoastSEO.js/subscribers","subscription_url":"https://api.github.com/repos/Yoast/YoastSEO.js/subscription","commits_url":"https://api.github.com/repos/Yoast/YoastSEO.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/YoastSEO.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/YoastSEO.js/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/YoastSEO.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/YoastSEO.js/merges","archive_url":"https://api.github.com/repos/Yoast/YoastSEO.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/YoastSEO.js/downloads","issues_url":"https://api.github.com/repos/Yoast/YoastSEO.js/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/YoastSEO.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/YoastSEO.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/YoastSEO.js/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/YoastSEO.js/releases{/id}","deployments_url":"https://api.github.com/repos/Yoast/YoastSEO.js/deployments","created_at":"2015-03-23T13:50:16Z","updated_at":"2016-05-02T11:39:52Z","pushed_at":"2016-05-09T13:05:51Z","git_url":"git://github.com/Yoast/YoastSEO.js.git","ssh_url":"git@github.com:Yoast/YoastSEO.js.git","clone_url":"https://github.com/Yoast/YoastSEO.js.git","svn_url":"https://github.com/Yoast/YoastSEO.js","homepage":"","size":4150,"stargazers_count":43,"watchers_count":43,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":72,"forks":12,"open_issues":72,"watchers":43,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479"},"html":{"href":"https://github.com/Yoast/YoastSEO.js/pull/479"},"issue":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/479"},"comments":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/issues/479/comments"},"review_comments":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479/comments"},"review_comment":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/pulls/479/commits"},"statuses":{"href":"https://api.github.com/repos/Yoast/YoastSEO.js/statuses/c59d22ee6a9e43c3a958469c63cabb2b250c67a7"}}}}