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

Adding PTT (the post service one) and İş Bankası, meanwhile fixing BİM #5017

Closed
ahmetlii opened this issue Apr 10, 2021 · 2 comments
Closed

Comments

@ahmetlii
Copy link

I've recently seen that iD is lacking PTT (the post service company - https://en.wikipedia.org/wiki/PTT_(Turkey) ) and İş Bankası (https://en.wikipedia.org/wiki/%C4%B0%C5%9Fbank) presets. Also, the Bim preset should be replaced with capitalized letters, BİM, because it's branded as that. (https://nsi.guide/index.html?t=brands&k=shop&v=supermarket&tt=bim)

@bhousel
Copy link
Member

bhousel commented Apr 10, 2021

I've recently seen that iD is lacking PTT (the post service company - https://en.wikipedia.org/wiki/PTT_(Turkey) )

Unfortunately iD isn't actively worked on these days, you'll need to use https://ideditor.org/nsi-v5 to see the latest NSI data.

Also, the Bim preset should be replaced with capitalized letters, BİM,

Thanks for letting us know, I'll fix it 👍

@bhousel
Copy link
Member

bhousel commented Apr 11, 2021

I renamed "Bim" -> "BİM" just now.

Also went down a bit of a side quest, capturing the results here so I don't forget:

  • I had expected node-diacritics to normalize "BİM" to "bim" but it wasn't doing this. (this is important for 2 things: so our fuzzy matcher can match on either version, also used to coax our generated ids into ascii)
  • node-diacritics has a handful of open issues and hasn't seen an update in 4 years. The Turkish "İ" is not mentioned as an issue, but I thought it might be worth upgrading to a newer library for doing this.
  • I tried out normalize-diacritics which does mostly the same thing but is newer and receives updates
  • normalize-diacritics does correctly normalize "BİM" to "bim", but unfortunately the library is just too slow! Building the match index went from around 250ms to around 18sec.
  • So I am sticking with the older node-diacritics library for now but I added some code to simplify.js to handle the Turkish "İ".
  • I might look into adding similar workarounds in simplify.js for the other open issues in node-diacritics ('л', and stuff here)

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