{"action":"created","comment":{"url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/comments/48076602","id":48076602,"diff_hunk":"@@ -0,0 +1,81 @@\n+package com.peoplepattern.text\n+\n+import scala.collection.mutable.Buffer\n+import scala.collection.JavaConverters._\n+import com.atilika.kuromoji.ipadic.Tokenizer\n+\n+/**\n+ * Custom language bundle for Japanese\n+ *\n+ * Uses Kuromoji for tokenization https://github.com/atilika/kuromoji\n+ */\n+object JaLangBundle extends LangBundle {\n+\n+  val stopwords = LangBundle.stopwords(\"ja\")\n+\n+  /**\n+   * Whether the char is in the ASCII range\n+   */\n+  private def asciichar(c: Char): Boolean = 0.toChar <= c && c <= 255.toChar\n+\n+  private def asciiSplit(text: String): Vector[(String, Boolean)] = {\n+    var tmp = text","path":"src/main/scala/com/peoplepattern/text/JaLangBundle.scala","position":22,"original_position":22,"commit_id":"9c1b39014abb08bec137dfceb38915bb4427aee3","original_commit_id":"9c1b39014abb08bec137dfceb38915bb4427aee3","user":{"login":"eponvert","id":575305,"avatar_url":"https://avatars.githubusercontent.com/u/575305?v=3","gravatar_id":"","url":"https://api.github.com/users/eponvert","html_url":"https://github.com/eponvert","followers_url":"https://api.github.com/users/eponvert/followers","following_url":"https://api.github.com/users/eponvert/following{/other_user}","gists_url":"https://api.github.com/users/eponvert/gists{/gist_id}","starred_url":"https://api.github.com/users/eponvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eponvert/subscriptions","organizations_url":"https://api.github.com/users/eponvert/orgs","repos_url":"https://api.github.com/users/eponvert/repos","events_url":"https://api.github.com/users/eponvert/events{/privacy}","received_events_url":"https://api.github.com/users/eponvert/received_events","type":"User","site_admin":false},"body":"I don't love the String-valued tmp, and the amount of string stuff like this below:\r\n```scala\r\ntmp = tmp.drop(nonascii.size)\r\n```","created_at":"2015-12-18T22:21:00Z","updated_at":"2015-12-18T22:21:00Z","html_url":"https://github.com/peoplepattern/lib-text/pull/16#discussion_r48076602","pull_request_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/comments/48076602"},"html":{"href":"https://github.com/peoplepattern/lib-text/pull/16#discussion_r48076602"},"pull_request":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16","id":54156368,"html_url":"https://github.com/peoplepattern/lib-text/pull/16","diff_url":"https://github.com/peoplepattern/lib-text/pull/16.diff","patch_url":"https://github.com/peoplepattern/lib-text/pull/16.patch","issue_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/16","number":16,"state":"open","locked":false,"title":"Japanese support","user":{"login":"eponvert","id":575305,"avatar_url":"https://avatars.githubusercontent.com/u/575305?v=3","gravatar_id":"","url":"https://api.github.com/users/eponvert","html_url":"https://github.com/eponvert","followers_url":"https://api.github.com/users/eponvert/followers","following_url":"https://api.github.com/users/eponvert/following{/other_user}","gists_url":"https://api.github.com/users/eponvert/gists{/gist_id}","starred_url":"https://api.github.com/users/eponvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eponvert/subscriptions","organizations_url":"https://api.github.com/users/eponvert/orgs","repos_url":"https://api.github.com/users/eponvert/repos","events_url":"https://api.github.com/users/eponvert/events{/privacy}","received_events_url":"https://api.github.com/users/eponvert/received_events","type":"User","site_admin":false},"body":"- Including Kuromoji for Japanese tokenization\n- Some pre- and post-processing to get some social media conventions right\n- Also, updated CHANGELOG to note Russian","created_at":"2015-12-18T22:17:52Z","updated_at":"2015-12-18T22:21:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c68f9d496a86e4b42ed7256935e78bd03a38fa2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16/commits","review_comments_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16/comments","review_comment_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls/comments{/number}","comments_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/16/comments","statuses_url":"https://api.github.com/repos/peoplepattern/lib-text/statuses/9c1b39014abb08bec137dfceb38915bb4427aee3","head":{"label":"peoplepattern:1-kuromoji","ref":"1-kuromoji","sha":"9c1b39014abb08bec137dfceb38915bb4427aee3","user":{"login":"peoplepattern","id":4258223,"avatar_url":"https://avatars.githubusercontent.com/u/4258223?v=3","gravatar_id":"","url":"https://api.github.com/users/peoplepattern","html_url":"https://github.com/peoplepattern","followers_url":"https://api.github.com/users/peoplepattern/followers","following_url":"https://api.github.com/users/peoplepattern/following{/other_user}","gists_url":"https://api.github.com/users/peoplepattern/gists{/gist_id}","starred_url":"https://api.github.com/users/peoplepattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peoplepattern/subscriptions","organizations_url":"https://api.github.com/users/peoplepattern/orgs","repos_url":"https://api.github.com/users/peoplepattern/repos","events_url":"https://api.github.com/users/peoplepattern/events{/privacy}","received_events_url":"https://api.github.com/users/peoplepattern/received_events","type":"Organization","site_admin":false},"repo":{"id":47280696,"name":"lib-text","full_name":"peoplepattern/lib-text","owner":{"login":"peoplepattern","id":4258223,"avatar_url":"https://avatars.githubusercontent.com/u/4258223?v=3","gravatar_id":"","url":"https://api.github.com/users/peoplepattern","html_url":"https://github.com/peoplepattern","followers_url":"https://api.github.com/users/peoplepattern/followers","following_url":"https://api.github.com/users/peoplepattern/following{/other_user}","gists_url":"https://api.github.com/users/peoplepattern/gists{/gist_id}","starred_url":"https://api.github.com/users/peoplepattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peoplepattern/subscriptions","organizations_url":"https://api.github.com/users/peoplepattern/orgs","repos_url":"https://api.github.com/users/peoplepattern/repos","events_url":"https://api.github.com/users/peoplepattern/events{/privacy}","received_events_url":"https://api.github.com/users/peoplepattern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/peoplepattern/lib-text","description":"A little text processing library for Scala.","fork":false,"url":"https://api.github.com/repos/peoplepattern/lib-text","forks_url":"https://api.github.com/repos/peoplepattern/lib-text/forks","keys_url":"https://api.github.com/repos/peoplepattern/lib-text/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peoplepattern/lib-text/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peoplepattern/lib-text/teams","hooks_url":"https://api.github.com/repos/peoplepattern/lib-text/hooks","issue_events_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/events{/number}","events_url":"https://api.github.com/repos/peoplepattern/lib-text/events","assignees_url":"https://api.github.com/repos/peoplepattern/lib-text/assignees{/user}","branches_url":"https://api.github.com/repos/peoplepattern/lib-text/branches{/branch}","tags_url":"https://api.github.com/repos/peoplepattern/lib-text/tags","blobs_url":"https://api.github.com/repos/peoplepattern/lib-text/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peoplepattern/lib-text/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peoplepattern/lib-text/git/refs{/sha}","trees_url":"https://api.github.com/repos/peoplepattern/lib-text/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peoplepattern/lib-text/statuses/{sha}","languages_url":"https://api.github.com/repos/peoplepattern/lib-text/languages","stargazers_url":"https://api.github.com/repos/peoplepattern/lib-text/stargazers","contributors_url":"https://api.github.com/repos/peoplepattern/lib-text/contributors","subscribers_url":"https://api.github.com/repos/peoplepattern/lib-text/subscribers","subscription_url":"https://api.github.com/repos/peoplepattern/lib-text/subscription","commits_url":"https://api.github.com/repos/peoplepattern/lib-text/commits{/sha}","git_commits_url":"https://api.github.com/repos/peoplepattern/lib-text/git/commits{/sha}","comments_url":"https://api.github.com/repos/peoplepattern/lib-text/comments{/number}","issue_comment_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/comments{/number}","contents_url":"https://api.github.com/repos/peoplepattern/lib-text/contents/{+path}","compare_url":"https://api.github.com/repos/peoplepattern/lib-text/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peoplepattern/lib-text/merges","archive_url":"https://api.github.com/repos/peoplepattern/lib-text/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peoplepattern/lib-text/downloads","issues_url":"https://api.github.com/repos/peoplepattern/lib-text/issues{/number}","pulls_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls{/number}","milestones_url":"https://api.github.com/repos/peoplepattern/lib-text/milestones{/number}","notifications_url":"https://api.github.com/repos/peoplepattern/lib-text/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peoplepattern/lib-text/labels{/name}","releases_url":"https://api.github.com/repos/peoplepattern/lib-text/releases{/id}","created_at":"2015-12-02T18:39:29Z","updated_at":"2015-12-18T13:10:42Z","pushed_at":"2015-12-18T22:17:52Z","git_url":"git://github.com/peoplepattern/lib-text.git","ssh_url":"git@github.com:peoplepattern/lib-text.git","clone_url":"https://github.com/peoplepattern/lib-text.git","svn_url":"https://github.com/peoplepattern/lib-text","homepage":"https://peoplepattern.github.io/lib-text","size":440,"stargazers_count":8,"watchers_count":8,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":8,"default_branch":"master"}},"base":{"label":"peoplepattern:master","ref":"master","sha":"bb70fad3e6ca2fdfb9ce674076816772ee7b075f","user":{"login":"peoplepattern","id":4258223,"avatar_url":"https://avatars.githubusercontent.com/u/4258223?v=3","gravatar_id":"","url":"https://api.github.com/users/peoplepattern","html_url":"https://github.com/peoplepattern","followers_url":"https://api.github.com/users/peoplepattern/followers","following_url":"https://api.github.com/users/peoplepattern/following{/other_user}","gists_url":"https://api.github.com/users/peoplepattern/gists{/gist_id}","starred_url":"https://api.github.com/users/peoplepattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peoplepattern/subscriptions","organizations_url":"https://api.github.com/users/peoplepattern/orgs","repos_url":"https://api.github.com/users/peoplepattern/repos","events_url":"https://api.github.com/users/peoplepattern/events{/privacy}","received_events_url":"https://api.github.com/users/peoplepattern/received_events","type":"Organization","site_admin":false},"repo":{"id":47280696,"name":"lib-text","full_name":"peoplepattern/lib-text","owner":{"login":"peoplepattern","id":4258223,"avatar_url":"https://avatars.githubusercontent.com/u/4258223?v=3","gravatar_id":"","url":"https://api.github.com/users/peoplepattern","html_url":"https://github.com/peoplepattern","followers_url":"https://api.github.com/users/peoplepattern/followers","following_url":"https://api.github.com/users/peoplepattern/following{/other_user}","gists_url":"https://api.github.com/users/peoplepattern/gists{/gist_id}","starred_url":"https://api.github.com/users/peoplepattern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peoplepattern/subscriptions","organizations_url":"https://api.github.com/users/peoplepattern/orgs","repos_url":"https://api.github.com/users/peoplepattern/repos","events_url":"https://api.github.com/users/peoplepattern/events{/privacy}","received_events_url":"https://api.github.com/users/peoplepattern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/peoplepattern/lib-text","description":"A little text processing library for Scala.","fork":false,"url":"https://api.github.com/repos/peoplepattern/lib-text","forks_url":"https://api.github.com/repos/peoplepattern/lib-text/forks","keys_url":"https://api.github.com/repos/peoplepattern/lib-text/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peoplepattern/lib-text/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peoplepattern/lib-text/teams","hooks_url":"https://api.github.com/repos/peoplepattern/lib-text/hooks","issue_events_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/events{/number}","events_url":"https://api.github.com/repos/peoplepattern/lib-text/events","assignees_url":"https://api.github.com/repos/peoplepattern/lib-text/assignees{/user}","branches_url":"https://api.github.com/repos/peoplepattern/lib-text/branches{/branch}","tags_url":"https://api.github.com/repos/peoplepattern/lib-text/tags","blobs_url":"https://api.github.com/repos/peoplepattern/lib-text/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peoplepattern/lib-text/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peoplepattern/lib-text/git/refs{/sha}","trees_url":"https://api.github.com/repos/peoplepattern/lib-text/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peoplepattern/lib-text/statuses/{sha}","languages_url":"https://api.github.com/repos/peoplepattern/lib-text/languages","stargazers_url":"https://api.github.com/repos/peoplepattern/lib-text/stargazers","contributors_url":"https://api.github.com/repos/peoplepattern/lib-text/contributors","subscribers_url":"https://api.github.com/repos/peoplepattern/lib-text/subscribers","subscription_url":"https://api.github.com/repos/peoplepattern/lib-text/subscription","commits_url":"https://api.github.com/repos/peoplepattern/lib-text/commits{/sha}","git_commits_url":"https://api.github.com/repos/peoplepattern/lib-text/git/commits{/sha}","comments_url":"https://api.github.com/repos/peoplepattern/lib-text/comments{/number}","issue_comment_url":"https://api.github.com/repos/peoplepattern/lib-text/issues/comments{/number}","contents_url":"https://api.github.com/repos/peoplepattern/lib-text/contents/{+path}","compare_url":"https://api.github.com/repos/peoplepattern/lib-text/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peoplepattern/lib-text/merges","archive_url":"https://api.github.com/repos/peoplepattern/lib-text/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peoplepattern/lib-text/downloads","issues_url":"https://api.github.com/repos/peoplepattern/lib-text/issues{/number}","pulls_url":"https://api.github.com/repos/peoplepattern/lib-text/pulls{/number}","milestones_url":"https://api.github.com/repos/peoplepattern/lib-text/milestones{/number}","notifications_url":"https://api.github.com/repos/peoplepattern/lib-text/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peoplepattern/lib-text/labels{/name}","releases_url":"https://api.github.com/repos/peoplepattern/lib-text/releases{/id}","created_at":"2015-12-02T18:39:29Z","updated_at":"2015-12-18T13:10:42Z","pushed_at":"2015-12-18T22:17:52Z","git_url":"git://github.com/peoplepattern/lib-text.git","ssh_url":"git@github.com:peoplepattern/lib-text.git","clone_url":"https://github.com/peoplepattern/lib-text.git","svn_url":"https://github.com/peoplepattern/lib-text","homepage":"https://peoplepattern.github.io/lib-text","size":440,"stargazers_count":8,"watchers_count":8,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16"},"html":{"href":"https://github.com/peoplepattern/lib-text/pull/16"},"issue":{"href":"https://api.github.com/repos/peoplepattern/lib-text/issues/16"},"comments":{"href":"https://api.github.com/repos/peoplepattern/lib-text/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/peoplepattern/lib-text/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/peoplepattern/lib-text/statuses/9c1b39014abb08bec137dfceb38915bb4427aee3"}}}}