{"action":"created","comment":{"url":"https://api.github.com/repos/spotify/featran/pulls/comments/145057355","pull_request_review_id":69798812,"id":145057355,"diff_hunk":"@@ -0,0 +1,68 @@\n+/*\n+ * Copyright 2017 Spotify AB.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package com.spotify.featran.transformers\n+\n+import com.spotify.featran.FeatureBuilder\n+\n+import scala.collection.SortedMap\n+\n+/**\n+ * Transform a collection of sentences, where each row is a `Seq[String]` of the words / tokens,\n+ * into a collection containing all the n-grams that can be constructed from each row. The feature\n+ * representation is an m-hot encoding (see [[NHotEncoder]]) constructed from an expanded vocabulary","path":"core/src/main/scala/com/spotify/featran/transformers/NGramsTransformer.scala","position":27,"original_position":27,"commit_id":"08b1da9be034d89b7b5c3362f7aa66a6f0b57b69","original_commit_id":"08b1da9be034d89b7b5c3362f7aa66a6f0b57b69","user":{"login":"nevillelyh","id":468514,"avatar_url":"https://avatars0.githubusercontent.com/u/468514?v=4","gravatar_id":"","url":"https://api.github.com/users/nevillelyh","html_url":"https://github.com/nevillelyh","followers_url":"https://api.github.com/users/nevillelyh/followers","following_url":"https://api.github.com/users/nevillelyh/following{/other_user}","gists_url":"https://api.github.com/users/nevillelyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nevillelyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevillelyh/subscriptions","organizations_url":"https://api.github.com/users/nevillelyh/orgs","repos_url":"https://api.github.com/users/nevillelyh/repos","events_url":"https://api.github.com/users/nevillelyh/events{/privacy}","received_events_url":"https://api.github.com/users/nevillelyh/received_events","type":"User","site_admin":false},"body":"You mean \"n-hot\"?","created_at":"2017-10-17T08:17:50Z","updated_at":"2017-10-17T08:24:56Z","html_url":"https://github.com/spotify/featran/pull/56#discussion_r145057355","pull_request_url":"https://api.github.com/repos/spotify/featran/pulls/56","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/spotify/featran/pulls/comments/145057355"},"html":{"href":"https://github.com/spotify/featran/pull/56#discussion_r145057355"},"pull_request":{"href":"https://api.github.com/repos/spotify/featran/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/spotify/featran/pulls/56","id":146917562,"html_url":"https://github.com/spotify/featran/pull/56","diff_url":"https://github.com/spotify/featran/pull/56.diff","patch_url":"https://github.com/spotify/featran/pull/56.patch","issue_url":"https://api.github.com/repos/spotify/featran/issues/56","number":56,"state":"open","locked":false,"title":"Add NGramsTransformer, fix #52","user":{"login":"andrewsmartin","id":4334043,"avatar_url":"https://avatars3.githubusercontent.com/u/4334043?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewsmartin","html_url":"https://github.com/andrewsmartin","followers_url":"https://api.github.com/users/andrewsmartin/followers","following_url":"https://api.github.com/users/andrewsmartin/following{/other_user}","gists_url":"https://api.github.com/users/andrewsmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsmartin/subscriptions","organizations_url":"https://api.github.com/users/andrewsmartin/orgs","repos_url":"https://api.github.com/users/andrewsmartin/repos","events_url":"https://api.github.com/users/andrewsmartin/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsmartin/received_events","type":"User","site_admin":false},"body":"@nevillelyh PTAL. Gonna leave some comments / questions in a few places.","created_at":"2017-10-17T00:21:32Z","updated_at":"2017-10-17T08:24:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d960fd8dfb90213fced79bef14c1acc9cb7c0180","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/spotify/featran/pulls/56/commits","review_comments_url":"https://api.github.com/repos/spotify/featran/pulls/56/comments","review_comment_url":"https://api.github.com/repos/spotify/featran/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spotify/featran/issues/56/comments","statuses_url":"https://api.github.com/repos/spotify/featran/statuses/08b1da9be034d89b7b5c3362f7aa66a6f0b57b69","head":{"label":"spotify:andrew/ngrams","ref":"andrew/ngrams","sha":"08b1da9be034d89b7b5c3362f7aa66a6f0b57b69","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":90654004,"name":"featran","full_name":"spotify/featran","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/featran","description":"A Scala feature transformation library for data science and machine learning","fork":false,"url":"https://api.github.com/repos/spotify/featran","forks_url":"https://api.github.com/repos/spotify/featran/forks","keys_url":"https://api.github.com/repos/spotify/featran/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/featran/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/featran/teams","hooks_url":"https://api.github.com/repos/spotify/featran/hooks","issue_events_url":"https://api.github.com/repos/spotify/featran/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/featran/events","assignees_url":"https://api.github.com/repos/spotify/featran/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/featran/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/featran/tags","blobs_url":"https://api.github.com/repos/spotify/featran/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/featran/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/featran/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/featran/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/featran/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/featran/languages","stargazers_url":"https://api.github.com/repos/spotify/featran/stargazers","contributors_url":"https://api.github.com/repos/spotify/featran/contributors","subscribers_url":"https://api.github.com/repos/spotify/featran/subscribers","subscription_url":"https://api.github.com/repos/spotify/featran/subscription","commits_url":"https://api.github.com/repos/spotify/featran/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/featran/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/featran/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/featran/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/featran/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/featran/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/featran/merges","archive_url":"https://api.github.com/repos/spotify/featran/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/featran/downloads","issues_url":"https://api.github.com/repos/spotify/featran/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/featran/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/featran/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/featran/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/featran/labels{/name}","releases_url":"https://api.github.com/repos/spotify/featran/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/featran/deployments","created_at":"2017-05-08T17:20:27Z","updated_at":"2017-10-16T15:27:47Z","pushed_at":"2017-10-17T08:14:15Z","git_url":"git://github.com/spotify/featran.git","ssh_url":"git@github.com:spotify/featran.git","clone_url":"https://github.com/spotify/featran.git","svn_url":"https://github.com/spotify/featran","homepage":"https://spotify.github.io/featran","size":682,"stargazers_count":57,"watchers_count":57,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":57,"default_branch":"master"}},"base":{"label":"spotify:master","ref":"master","sha":"bc04a76226c395511a06d06376fa71f44c772878","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":90654004,"name":"featran","full_name":"spotify/featran","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/featran","description":"A Scala feature transformation library for data science and machine learning","fork":false,"url":"https://api.github.com/repos/spotify/featran","forks_url":"https://api.github.com/repos/spotify/featran/forks","keys_url":"https://api.github.com/repos/spotify/featran/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/featran/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/featran/teams","hooks_url":"https://api.github.com/repos/spotify/featran/hooks","issue_events_url":"https://api.github.com/repos/spotify/featran/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/featran/events","assignees_url":"https://api.github.com/repos/spotify/featran/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/featran/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/featran/tags","blobs_url":"https://api.github.com/repos/spotify/featran/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/featran/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/featran/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/featran/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/featran/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/featran/languages","stargazers_url":"https://api.github.com/repos/spotify/featran/stargazers","contributors_url":"https://api.github.com/repos/spotify/featran/contributors","subscribers_url":"https://api.github.com/repos/spotify/featran/subscribers","subscription_url":"https://api.github.com/repos/spotify/featran/subscription","commits_url":"https://api.github.com/repos/spotify/featran/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/featran/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/featran/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/featran/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/featran/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/featran/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/featran/merges","archive_url":"https://api.github.com/repos/spotify/featran/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/featran/downloads","issues_url":"https://api.github.com/repos/spotify/featran/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/featran/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/featran/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/featran/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/featran/labels{/name}","releases_url":"https://api.github.com/repos/spotify/featran/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/featran/deployments","created_at":"2017-05-08T17:20:27Z","updated_at":"2017-10-16T15:27:47Z","pushed_at":"2017-10-17T08:14:15Z","git_url":"git://github.com/spotify/featran.git","ssh_url":"git@github.com:spotify/featran.git","clone_url":"https://github.com/spotify/featran.git","svn_url":"https://github.com/spotify/featran","homepage":"https://spotify.github.io/featran","size":682,"stargazers_count":57,"watchers_count":57,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spotify/featran/pulls/56"},"html":{"href":"https://github.com/spotify/featran/pull/56"},"issue":{"href":"https://api.github.com/repos/spotify/featran/issues/56"},"comments":{"href":"https://api.github.com/repos/spotify/featran/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/spotify/featran/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/spotify/featran/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spotify/featran/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/spotify/featran/statuses/08b1da9be034d89b7b5c3362f7aa66a6f0b57b69"}},"author_association":"NONE"}}
{"actor":{"display_login":"nevillelyh"}}