{"action":"closed","issue":{"url":"https://api.github.com/repos/njyjn/ARIADNE/issues/3","repository_url":"https://api.github.com/repos/njyjn/ARIADNE","labels_url":"https://api.github.com/repos/njyjn/ARIADNE/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/njyjn/ARIADNE/issues/3/comments","events_url":"https://api.github.com/repos/njyjn/ARIADNE/issues/3/events","html_url":"https://github.com/njyjn/ARIADNE/issues/3","id":156423836,"number":3,"title":"fuzzy string matching for easter module","user":{"login":"darrenwee","id":12949331,"avatar_url":"https://avatars.githubusercontent.com/u/12949331?v=3","gravatar_id":"","url":"https://api.github.com/users/darrenwee","html_url":"https://github.com/darrenwee","followers_url":"https://api.github.com/users/darrenwee/followers","following_url":"https://api.github.com/users/darrenwee/following{/other_user}","gists_url":"https://api.github.com/users/darrenwee/gists{/gist_id}","starred_url":"https://api.github.com/users/darrenwee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrenwee/subscriptions","organizations_url":"https://api.github.com/users/darrenwee/orgs","repos_url":"https://api.github.com/users/darrenwee/repos","events_url":"https://api.github.com/users/darrenwee/events{/privacy}","received_events_url":"https://api.github.com/users/darrenwee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/njyjn/ARIADNE/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"darrenwee","id":12949331,"avatar_url":"https://avatars.githubusercontent.com/u/12949331?v=3","gravatar_id":"","url":"https://api.github.com/users/darrenwee","html_url":"https://github.com/darrenwee","followers_url":"https://api.github.com/users/darrenwee/followers","following_url":"https://api.github.com/users/darrenwee/following{/other_user}","gists_url":"https://api.github.com/users/darrenwee/gists{/gist_id}","starred_url":"https://api.github.com/users/darrenwee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrenwee/subscriptions","organizations_url":"https://api.github.com/users/darrenwee/orgs","repos_url":"https://api.github.com/users/darrenwee/repos","events_url":"https://api.github.com/users/darrenwee/events{/privacy}","received_events_url":"https://api.github.com/users/darrenwee/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-24T05:38:44Z","updated_at":"2016-05-24T12:36:01Z","closed_at":"2016-05-24T12:36:01Z","body":"I am implementing fuzzy string matching using the `fuzzywuzzy` package in `easter.py` on the [`fuzzy-easter`](https://github.com/njyjn/ARIADNE/tree/fuzzy-easter) branch. This will allow for non-exact string matching, especially when it comes to person's names.\r\n\r\nFor example, suppose the following easter egg dictionary:\r\n````python\r\npeople = {\r\n    # FOP comm\r\n    'sujin': 'Ziyi chope.',\r\n    'julia': 'Ryan chope.',\r\n    'leon': 'Mother chope.',\r\n    'justin': 'I chope.',\r\n\r\n    # OGLs\r\n    'colin': 'Welcome, Colin the King. Let me serve you breakfast.',\r\n    'natalya': 'PURPLE IS AMAZING. I AM AMAZING. BYE NAT.',\r\n    'khaiqing': 'bye nat.',\r\n    'yuanzhi': 'bye nat.',\r\n    'changming': 'Old Chang Kee',\r\n}\r\n````\r\n\r\nUsing the `process` function from `fuzzywuzzy`, a non-exact term can be matched to the best fitting key in `people`. For example, a term `'su jin'` or `'su jing'` will be best matched by `'sujin'` in the dictionary and the corresponding string for `'sujin'` is returned.\r\n\r\nI have also refactored some hard coded `if` statements in accordance with the new non-exact string matching implementation. This should keep the code cleaner and make it easier to add new easter eggs.\r\n\r\nI will also see if I can refactor some of the non-person easter eggs and the various possible trigger terms to make the code cleaner and more fuzzy-resistant. I have not thought this part through thoroughly yet.\r\n\r\n(still WIP)"}}
{"actor":{"display_login":"darrenwee"}}