Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocationCoder returning wrong Montreal #12

Open
erleholgersen opened this issue Jun 28, 2017 · 0 comments
Open

LocationCoder returning wrong Montreal #12

erleholgersen opened this issue Jun 28, 2017 · 0 comments

Comments

@erleholgersen
Copy link
Contributor

Our location coder returns Montreal, Wisconsin (population 807 at 2010 census) when given texts about Montreal. Even adding Quebec as context doesn't help, as the coder then returns Montreal, Wisconsin and Quebec, North Carolina (a mountain).

from mpeds.open_ended_coders import *

coder = LocationCoder()

print coder.getLocation('Montreal', as_str = True) 
# Montreal, Wisconsin, United States, 46.428, -90.24601

coder.getLocation('Montreal, Quebec', as_str = True) 
# Quebec, North Carolina, United States, 35.14011, -82.87569; Montreal, Wisconsin, United States, 46.428, -90.24601

coder.getLocation('Montreal, Canada', as_str = True).decode('utf-8')
# Montréal, Québec, Canada, 45.50884, -73.58781

This goes back to the underlying CLIFF location coder, so I'm not sure what we can do to fix it. But it might be worth looking into, especially if we want MPEDS to be useful for non-American news sources. Presumably Canadian news articles won't refer to Montreal as Montreal, Canada.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant