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

Relevance and state names #37

Closed
nvitucci opened this issue Feb 10, 2014 · 3 comments
Closed

Relevance and state names #37

nvitucci opened this issue Feb 10, 2014 · 3 comments

Comments

@nvitucci
Copy link

Hi! Is there a reason why most states have relevance = 0 while smaller states with the same phone code as bigger ones (e.g. Andorra) have relevance = 0.5? Unless I've misunderstood the usage of this parameter, I'd suggest to change the relevance value from 0 to 1.

On a side note: would it be sensible to keep the names of the states as pure ASCII rather than UTF-8?

Nicola

@mledoze
Copy link
Owner

mledoze commented Feb 13, 2014

The data for the relevance parameter comes from https://github.com/JamieAppleseed/selectToAutocomplete, I know it's incomplete and sometimes inaccurate. I've trying to find a better source for this, without success.
The parameter doesn't have a maximum value, it starts at zero and can have any value. The idea behind it is to give more importance to some countries so that UAE is not listed/presented before US or UK.

Please feel free to send a pull request with the fixes.

would it be sensible to keep the names of the states as pure ASCII rather than UTF-8?

Why would you need the names in ASCII? Some country name require accented characters so I don't think we can use ASCII for this.

@nvitucci
Copy link
Author

The parameter doesn't have a maximum value, it starts at zero and can have any value. The idea behind it is to give more importance to some countries so that UAE is not listed/presented before US or UK.

Yes, I understand this, but the strange thing is to have countries like Austria or Chile with a weight of 0 while small countries like Andorra or Isle of Man have a weight of 0.5. The problem is not the maximum value, but rather the minimum. For now I'm giving a weight of 1 to countries which have a weight of 0, but I can indeed look further into this and send a pull request.

Why would you need the names in ASCII? Some country name require accented characters so I don't think we can use ASCII for this.

I'd use ASCII for the names only because it would make it easier to use them as keys, URIs or whatever without being forced to use UTF8 or escapes. There could be an additional field using UTF8 then.

@mledoze
Copy link
Owner

mledoze commented Feb 22, 2014

but the strange thing is to have countries like Austria or Chile with a weight of 0 while small countries like Andorra or Isle of Man have a weight of 0.5

I'll fix this.

I'd use ASCII for the names only because it would make it easier to use them as keys, URIs or whatever without being forced to use UTF8 or escapes.

You shoudn't use the country name as keys but the country codes instead, they are better candidates for this.

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

2 participants