{"action":"created","comment":{"url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/comments/66719784","id":66719784,"diff_hunk":"@@ -0,0 +1,52 @@\n+package main\n+\n+import \"strings\"\n+\n+type TokenFilter interface {\n+\tFilter() *TokenFilterOutput\n+}\n+\n+//TODO: We can separate this filter methods to their individual files\n+func AsciiFoldingTokenFilter(token string) string {\n+\treturn token\n+}\n+\n+func StopWordTokenFilter(token string) string {\n+\t//TODO: get this words from a file\n+\tstopWords := []string{\"and\", \"a\", \"the\", \"are\", \"is\", \"by\", \"because\", \"at\", \"as\"}\n+\tfor _, r := range stopWords {\n+\t\tif token == r {\n+\t\t\treturn \"\"\n+\t\t}\n+\t}\n+\treturn token\n+}\n+\n+func LowercaseTokenFilter(token string) string {\n+\t//TODO: implement unicode lowercase for special situation\n+\t//strings.ToLowerSpecial(unicode.TurkishCase, \"Hello, WoRLd\") // => \"hello, world\"\n+\treturn strings.ToLower(token)\n+}\n+\n+func (input *TokenizerOutput) Filter() *TokenFilterOutput {\n+\tfilteredTokens := []string{}\n+\n+\tfor _, r := range input.Tokens {\n+\t\t//find more generic solution for here.\n+\t\tfilteredToken := AsciiFoldingTokenFilter(r)\n+\t\tfilteredToken = LowercaseTokenFilter(filteredToken)\n+\t\tfilteredToken = StopWordTokenFilter(filteredToken)\n+","path":"token_filter.go","position":39,"original_position":39,"commit_id":"927207d340783d0ae089512275be140377a862c9","original_commit_id":"927207d340783d0ae089512275be140377a862c9","user":{"login":"hevalberknevruz","id":6687081,"avatar_url":"https://avatars.githubusercontent.com/u/6687081?v=3","gravatar_id":"","url":"https://api.github.com/users/hevalberknevruz","html_url":"https://github.com/hevalberknevruz","followers_url":"https://api.github.com/users/hevalberknevruz/followers","following_url":"https://api.github.com/users/hevalberknevruz/following{/other_user}","gists_url":"https://api.github.com/users/hevalberknevruz/gists{/gist_id}","starred_url":"https://api.github.com/users/hevalberknevruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hevalberknevruz/subscriptions","organizations_url":"https://api.github.com/users/hevalberknevruz/orgs","repos_url":"https://api.github.com/users/hevalberknevruz/repos","events_url":"https://api.github.com/users/hevalberknevruz/events{/privacy}","received_events_url":"https://api.github.com/users/hevalberknevruz/received_events","type":"User","site_admin":false},"body":"@hkulekci Continuous Integration tool sends notification that If it be fail of you tests","created_at":"2016-06-12T11:42:33Z","updated_at":"2016-06-12T11:42:33Z","html_url":"https://github.com/GosSearch/gosse-core/pull/12#discussion_r66719784","pull_request_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/comments/66719784"},"html":{"href":"https://github.com/GosSearch/gosse-core/pull/12#discussion_r66719784"},"pull_request":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12","id":73484668,"html_url":"https://github.com/GosSearch/gosse-core/pull/12","diff_url":"https://github.com/GosSearch/gosse-core/pull/12.diff","patch_url":"https://github.com/GosSearch/gosse-core/pull/12.patch","issue_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/12","number":12,"state":"open","locked":false,"title":"#9 added filter implementation basically","user":{"login":"hkulekci","id":586318,"avatar_url":"https://avatars.githubusercontent.com/u/586318?v=3","gravatar_id":"","url":"https://api.github.com/users/hkulekci","html_url":"https://github.com/hkulekci","followers_url":"https://api.github.com/users/hkulekci/followers","following_url":"https://api.github.com/users/hkulekci/following{/other_user}","gists_url":"https://api.github.com/users/hkulekci/gists{/gist_id}","starred_url":"https://api.github.com/users/hkulekci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkulekci/subscriptions","organizations_url":"https://api.github.com/users/hkulekci/orgs","repos_url":"https://api.github.com/users/hkulekci/repos","events_url":"https://api.github.com/users/hkulekci/events{/privacy}","received_events_url":"https://api.github.com/users/hkulekci/received_events","type":"User","site_admin":false},"body":"I did not execute my test cases because I dont know how to configure my GOPATH correctly. (dam it!) But I tried to simulate with a main function on go playground that is really cool tool and it worked. And this is my first golang code : https://play.golang.org/p/akic0tGDLg \r\n\r\nThere is some unimplemented point in this pr. But I separate them and we can continue without. I'll try to implement this parts following days. ","created_at":"2016-06-12T03:05:19Z","updated_at":"2016-06-12T11:42:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5636d982cb4dd20e7d3d749c7c15e5b22510ecf","assignee":{"login":"manorie","id":1708139,"avatar_url":"https://avatars.githubusercontent.com/u/1708139?v=3","gravatar_id":"","url":"https://api.github.com/users/manorie","html_url":"https://github.com/manorie","followers_url":"https://api.github.com/users/manorie/followers","following_url":"https://api.github.com/users/manorie/following{/other_user}","gists_url":"https://api.github.com/users/manorie/gists{/gist_id}","starred_url":"https://api.github.com/users/manorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manorie/subscriptions","organizations_url":"https://api.github.com/users/manorie/orgs","repos_url":"https://api.github.com/users/manorie/repos","events_url":"https://api.github.com/users/manorie/events{/privacy}","received_events_url":"https://api.github.com/users/manorie/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12/commits","review_comments_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12/comments","review_comment_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/12/comments","statuses_url":"https://api.github.com/repos/GosSearch/gosse-core/statuses/927207d340783d0ae089512275be140377a862c9","head":{"label":"GosSearch:feature/issue_9","ref":"feature/issue_9","sha":"927207d340783d0ae089512275be140377a862c9","user":{"login":"GosSearch","id":19592536,"avatar_url":"https://avatars.githubusercontent.com/u/19592536?v=3","gravatar_id":"","url":"https://api.github.com/users/GosSearch","html_url":"https://github.com/GosSearch","followers_url":"https://api.github.com/users/GosSearch/followers","following_url":"https://api.github.com/users/GosSearch/following{/other_user}","gists_url":"https://api.github.com/users/GosSearch/gists{/gist_id}","starred_url":"https://api.github.com/users/GosSearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GosSearch/subscriptions","organizations_url":"https://api.github.com/users/GosSearch/orgs","repos_url":"https://api.github.com/users/GosSearch/repos","events_url":"https://api.github.com/users/GosSearch/events{/privacy}","received_events_url":"https://api.github.com/users/GosSearch/received_events","type":"Organization","site_admin":false},"repo":{"id":60408188,"name":"gosse-core","full_name":"GosSearch/gosse-core","owner":{"login":"GosSearch","id":19592536,"avatar_url":"https://avatars.githubusercontent.com/u/19592536?v=3","gravatar_id":"","url":"https://api.github.com/users/GosSearch","html_url":"https://github.com/GosSearch","followers_url":"https://api.github.com/users/GosSearch/followers","following_url":"https://api.github.com/users/GosSearch/following{/other_user}","gists_url":"https://api.github.com/users/GosSearch/gists{/gist_id}","starred_url":"https://api.github.com/users/GosSearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GosSearch/subscriptions","organizations_url":"https://api.github.com/users/GosSearch/orgs","repos_url":"https://api.github.com/users/GosSearch/repos","events_url":"https://api.github.com/users/GosSearch/events{/privacy}","received_events_url":"https://api.github.com/users/GosSearch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GosSearch/gosse-core","description":"GosSearch Core Repo","fork":false,"url":"https://api.github.com/repos/GosSearch/gosse-core","forks_url":"https://api.github.com/repos/GosSearch/gosse-core/forks","keys_url":"https://api.github.com/repos/GosSearch/gosse-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GosSearch/gosse-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GosSearch/gosse-core/teams","hooks_url":"https://api.github.com/repos/GosSearch/gosse-core/hooks","issue_events_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/events{/number}","events_url":"https://api.github.com/repos/GosSearch/gosse-core/events","assignees_url":"https://api.github.com/repos/GosSearch/gosse-core/assignees{/user}","branches_url":"https://api.github.com/repos/GosSearch/gosse-core/branches{/branch}","tags_url":"https://api.github.com/repos/GosSearch/gosse-core/tags","blobs_url":"https://api.github.com/repos/GosSearch/gosse-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GosSearch/gosse-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GosSearch/gosse-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/GosSearch/gosse-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GosSearch/gosse-core/statuses/{sha}","languages_url":"https://api.github.com/repos/GosSearch/gosse-core/languages","stargazers_url":"https://api.github.com/repos/GosSearch/gosse-core/stargazers","contributors_url":"https://api.github.com/repos/GosSearch/gosse-core/contributors","subscribers_url":"https://api.github.com/repos/GosSearch/gosse-core/subscribers","subscription_url":"https://api.github.com/repos/GosSearch/gosse-core/subscription","commits_url":"https://api.github.com/repos/GosSearch/gosse-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/GosSearch/gosse-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/GosSearch/gosse-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/GosSearch/gosse-core/contents/{+path}","compare_url":"https://api.github.com/repos/GosSearch/gosse-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GosSearch/gosse-core/merges","archive_url":"https://api.github.com/repos/GosSearch/gosse-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GosSearch/gosse-core/downloads","issues_url":"https://api.github.com/repos/GosSearch/gosse-core/issues{/number}","pulls_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls{/number}","milestones_url":"https://api.github.com/repos/GosSearch/gosse-core/milestones{/number}","notifications_url":"https://api.github.com/repos/GosSearch/gosse-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GosSearch/gosse-core/labels{/name}","releases_url":"https://api.github.com/repos/GosSearch/gosse-core/releases{/id}","deployments_url":"https://api.github.com/repos/GosSearch/gosse-core/deployments","created_at":"2016-06-04T11:58:19Z","updated_at":"2016-06-10T02:31:41Z","pushed_at":"2016-06-12T03:56:28Z","git_url":"git://github.com/GosSearch/gosse-core.git","ssh_url":"git@github.com:GosSearch/gosse-core.git","clone_url":"https://github.com/GosSearch/gosse-core.git","svn_url":"https://github.com/GosSearch/gosse-core","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"GosSearch:master","ref":"master","sha":"6358831c8b0026d5b6742a5325528ee23050d174","user":{"login":"GosSearch","id":19592536,"avatar_url":"https://avatars.githubusercontent.com/u/19592536?v=3","gravatar_id":"","url":"https://api.github.com/users/GosSearch","html_url":"https://github.com/GosSearch","followers_url":"https://api.github.com/users/GosSearch/followers","following_url":"https://api.github.com/users/GosSearch/following{/other_user}","gists_url":"https://api.github.com/users/GosSearch/gists{/gist_id}","starred_url":"https://api.github.com/users/GosSearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GosSearch/subscriptions","organizations_url":"https://api.github.com/users/GosSearch/orgs","repos_url":"https://api.github.com/users/GosSearch/repos","events_url":"https://api.github.com/users/GosSearch/events{/privacy}","received_events_url":"https://api.github.com/users/GosSearch/received_events","type":"Organization","site_admin":false},"repo":{"id":60408188,"name":"gosse-core","full_name":"GosSearch/gosse-core","owner":{"login":"GosSearch","id":19592536,"avatar_url":"https://avatars.githubusercontent.com/u/19592536?v=3","gravatar_id":"","url":"https://api.github.com/users/GosSearch","html_url":"https://github.com/GosSearch","followers_url":"https://api.github.com/users/GosSearch/followers","following_url":"https://api.github.com/users/GosSearch/following{/other_user}","gists_url":"https://api.github.com/users/GosSearch/gists{/gist_id}","starred_url":"https://api.github.com/users/GosSearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GosSearch/subscriptions","organizations_url":"https://api.github.com/users/GosSearch/orgs","repos_url":"https://api.github.com/users/GosSearch/repos","events_url":"https://api.github.com/users/GosSearch/events{/privacy}","received_events_url":"https://api.github.com/users/GosSearch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GosSearch/gosse-core","description":"GosSearch Core Repo","fork":false,"url":"https://api.github.com/repos/GosSearch/gosse-core","forks_url":"https://api.github.com/repos/GosSearch/gosse-core/forks","keys_url":"https://api.github.com/repos/GosSearch/gosse-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GosSearch/gosse-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GosSearch/gosse-core/teams","hooks_url":"https://api.github.com/repos/GosSearch/gosse-core/hooks","issue_events_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/events{/number}","events_url":"https://api.github.com/repos/GosSearch/gosse-core/events","assignees_url":"https://api.github.com/repos/GosSearch/gosse-core/assignees{/user}","branches_url":"https://api.github.com/repos/GosSearch/gosse-core/branches{/branch}","tags_url":"https://api.github.com/repos/GosSearch/gosse-core/tags","blobs_url":"https://api.github.com/repos/GosSearch/gosse-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GosSearch/gosse-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GosSearch/gosse-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/GosSearch/gosse-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GosSearch/gosse-core/statuses/{sha}","languages_url":"https://api.github.com/repos/GosSearch/gosse-core/languages","stargazers_url":"https://api.github.com/repos/GosSearch/gosse-core/stargazers","contributors_url":"https://api.github.com/repos/GosSearch/gosse-core/contributors","subscribers_url":"https://api.github.com/repos/GosSearch/gosse-core/subscribers","subscription_url":"https://api.github.com/repos/GosSearch/gosse-core/subscription","commits_url":"https://api.github.com/repos/GosSearch/gosse-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/GosSearch/gosse-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/GosSearch/gosse-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/GosSearch/gosse-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/GosSearch/gosse-core/contents/{+path}","compare_url":"https://api.github.com/repos/GosSearch/gosse-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GosSearch/gosse-core/merges","archive_url":"https://api.github.com/repos/GosSearch/gosse-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GosSearch/gosse-core/downloads","issues_url":"https://api.github.com/repos/GosSearch/gosse-core/issues{/number}","pulls_url":"https://api.github.com/repos/GosSearch/gosse-core/pulls{/number}","milestones_url":"https://api.github.com/repos/GosSearch/gosse-core/milestones{/number}","notifications_url":"https://api.github.com/repos/GosSearch/gosse-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GosSearch/gosse-core/labels{/name}","releases_url":"https://api.github.com/repos/GosSearch/gosse-core/releases{/id}","deployments_url":"https://api.github.com/repos/GosSearch/gosse-core/deployments","created_at":"2016-06-04T11:58:19Z","updated_at":"2016-06-10T02:31:41Z","pushed_at":"2016-06-12T03:56:28Z","git_url":"git://github.com/GosSearch/gosse-core.git","ssh_url":"git@github.com:GosSearch/gosse-core.git","clone_url":"https://github.com/GosSearch/gosse-core.git","svn_url":"https://github.com/GosSearch/gosse-core","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12"},"html":{"href":"https://github.com/GosSearch/gosse-core/pull/12"},"issue":{"href":"https://api.github.com/repos/GosSearch/gosse-core/issues/12"},"comments":{"href":"https://api.github.com/repos/GosSearch/gosse-core/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GosSearch/gosse-core/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/GosSearch/gosse-core/statuses/927207d340783d0ae089512275be140377a862c9"}}}}
{"actor":{"display_login":"hevalberknevruz"}}