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

Mixed city, state and country data in location tagger #9

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

Mixed city, state and country data in location tagger #9

erleholgersen opened this issue Jun 23, 2017 · 0 comments

Comments

@erleholgersen
Copy link
Contributor

Our location tagger currently returns the "most specific" tags from the CLIFF results. For example, if the CLIFF results include data on cities, it will return all cities. If there are states without mention of specific cities, the tagger will return all states.

This causes problems with mixed city, state, and country data. For example:

from mpeds.open_ended_coders import *

coder = LocationCoder()
string = "Protesters gathered in New York City and across Connecticut"

print coder.getLocation(string) # returns New York City, no mention of Connecticut

# By contrast, Connecticut shows up in the CLIFF results
cliff_results = coder._getCLIFF(string)
print json.dumps(cliff_results, indent = 4, sort_keys = True)
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