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

Allow ambiguous place names to be included #29

Open
koheiw opened this issue Jul 12, 2019 · 0 comments
Open

Allow ambiguous place names to be included #29

koheiw opened this issue Jul 12, 2019 · 0 comments

Comments

@koheiw
Copy link
Owner

koheiw commented Jul 12, 2019

quanteda v1.5 added nested_score = "dictionary" to tokens_lookup(). If this function is used, it a new priority rule apply in dictionary lookup.

    'DM': [Commonwealth of Dominica, Commonwealth Dominican*, Roseau]
    'DO': [Dominican Republic, Dominica, Dominican*, Santo Domingo]

When the new function is used with the above dictionary, only DM is recorded for a texts "Commonwealth of Dominica" because the longer match has the priority. This means that it is safe to otherwise ambiguous words in newsmap dictionaries (e.g. "Congo").

@koheiw koheiw changed the title Allow ambigous place names to be included Allow ambiguous place names to be included Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants