{"action":"created","issue":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/3324","repository_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/3324/labels{/name}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/3324/comments","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/3324/events","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3324","id":163142738,"number":3324,"title":"Cheat Sheets (Controller): Incorrectly determining '`end`' triggers","user":{"login":"GuiltyDolphin","id":8598426,"avatar_url":"https://avatars.githubusercontent.com/u/8598426?v=3","gravatar_id":"","url":"https://api.github.com/users/GuiltyDolphin","html_url":"https://github.com/GuiltyDolphin","followers_url":"https://api.github.com/users/GuiltyDolphin/followers","following_url":"https://api.github.com/users/GuiltyDolphin/following{/other_user}","gists_url":"https://api.github.com/users/GuiltyDolphin/gists{/gist_id}","starred_url":"https://api.github.com/users/GuiltyDolphin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuiltyDolphin/subscriptions","organizations_url":"https://api.github.com/users/GuiltyDolphin/orgs","repos_url":"https://api.github.com/users/GuiltyDolphin/repos","events_url":"https://api.github.com/users/GuiltyDolphin/events{/privacy}","received_events_url":"https://api.github.com/users/GuiltyDolphin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-30T11:27:38Z","updated_at":"2016-06-30T13:14:29Z","closed_at":null,"body":"An issue brought up in https://github.com/duckduckgo/zeroclickinfo-goodies/pull/3319 revealed a bug in the triggering process.\r\n\r\nDue to the way triggers are handled, the first trigger found (earliest in the query) will be used as the trigger for the IA, regardless of whether or not it is valid.\r\n\r\nFor example, without `words` as a trigger, `words used in kabaddi cheat sheet` will be treated like so:\r\n\r\nTrigger: `cheat sheet`\r\nRemainder: `words used in kabaddi`,\r\n\r\nBut with `words` as a `language` trigger (which should not affect the Kabaddi cheat sheet - ideally):\r\n\r\nTrigger: `words`\r\nRemainder: `used in kabaddi cheat sheet`\r\n\r\nAs `words` appears earliest in the string.\r\n\r\n---\r\n\r\nIn terms of working around this, my immediate thoughts are that we should check the remainder of the query for any further trigger words, then if any are found re-run the process with a different remainder; though I'm not sure how resource-costly this would be.\r\n\r\ncc @zachthompson \r\n\r\n------\r\nIA Page:  http://duck.co/ia/view/cheat_sheets \r\n[Maintainer](http://docs.duckduckhack.com/maintaining/guidelines.html): @zachthompson"},"comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/comments/229654064","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3324#issuecomment-229654064","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/3324","id":229654064,"user":{"login":"zachthompson","id":1467466,"avatar_url":"https://avatars.githubusercontent.com/u/1467466?v=3","gravatar_id":"","url":"https://api.github.com/users/zachthompson","html_url":"https://github.com/zachthompson","followers_url":"https://api.github.com/users/zachthompson/followers","following_url":"https://api.github.com/users/zachthompson/following{/other_user}","gists_url":"https://api.github.com/users/zachthompson/gists{/gist_id}","starred_url":"https://api.github.com/users/zachthompson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachthompson/subscriptions","organizations_url":"https://api.github.com/users/zachthompson/orgs","repos_url":"https://api.github.com/users/zachthompson/repos","events_url":"https://api.github.com/users/zachthompson/events{/privacy}","received_events_url":"https://api.github.com/users/zachthompson/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T13:14:28Z","updated_at":"2016-06-30T13:14:28Z","body":"This seems like an edge case where we're trying to have category triggers and aliases with the same terms.  I would opt for \r\n\r\n1. removing `words used in kabaddi` from the aliases\r\n2. Or, removing it from the category with the `words` trigger\r\n\r\nI don't think we want to get into multiple triggers at this point."}}
{"actor":{"display_login":"zachthompson"}}