{"action":"opened","issue":{"url":"https://api.github.com/repos/seatgeek/fuzzywuzzy/issues/77","labels_url":"https://api.github.com/repos/seatgeek/fuzzywuzzy/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/seatgeek/fuzzywuzzy/issues/77/comments","events_url":"https://api.github.com/repos/seatgeek/fuzzywuzzy/issues/77/events","html_url":"https://github.com/seatgeek/fuzzywuzzy/issues/77","id":57583909,"number":77,"title":"Finding best matches in a list gives wrong results.","user":{"login":"ardoi","id":3357013,"avatar_url":"https://avatars.githubusercontent.com/u/3357013?v=3","gravatar_id":"","url":"https://api.github.com/users/ardoi","html_url":"https://github.com/ardoi","followers_url":"https://api.github.com/users/ardoi/followers","following_url":"https://api.github.com/users/ardoi/following{/other_user}","gists_url":"https://api.github.com/users/ardoi/gists{/gist_id}","starred_url":"https://api.github.com/users/ardoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ardoi/subscriptions","organizations_url":"https://api.github.com/users/ardoi/orgs","repos_url":"https://api.github.com/users/ardoi/repos","events_url":"https://api.github.com/users/ardoi/events{/privacy}","received_events_url":"https://api.github.com/users/ardoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-13T10:41:09Z","updated_at":"2015-02-13T10:41:09Z","closed_at":null,"body":"The `process.extract` function doesn't seem to handle capitalised queries well with some scorers:\r\n\r\n```python\r\n>>>fuzzywuzzy.fuzz.partial_ratio('Santa Ana','Santa Ana')\r\n100\r\n>>>fuzzywuzzy.process.extract('Santa Ana', ['Santa Ana', 'Manta'], scorer=fuzzywuzzy.fuzz.partial_ratio)\r\n[('Manta', 80), ('Santa Ana', 77)]\r\n```\r\nThis is because [here](https://github.com/seatgeek/fuzzywuzzy/blob/master/fuzzywuzzy/process.py#L84) the choice string is processed but the query string is not:\r\n```python\r\n>>>fuzzywuzzy.process.extract('santa ana', ['Santa Ana', 'Manta'], scorer=fuzzywuzzy.fuzz.partial_ratio)\r\n[('Santa Ana', 100), ('Manta', 80)]\r\n```\r\nWith some other scorers (e.g., WRatio) things work fine because those processes both strings internally anyway.\r\n\r\nA workaround I use right now is:\r\n```python\r\n>>>fuzzywuzzy.process.extract('Santa Ana', ['Santa Ana', 'Manta'], scorer=fuzzywuzzy.fuzz.partial_ratio, processor=lambda x:x)\r\n[('Santa Ana', 100), ('Manta', 80)]\r\n```\r\n"}}