name-suggestion-index
name-suggestion-index copied to clipboard
Document matching algorithm
Is there a description of the matching algorithm that NSI implementations (ie. consumers of the NSI data file) should implement? Specifically, what checks should be executed in what order (if order matters, not sure about that). If no such docs exist yet, would it make sense to write such a doc?
A test suite would be great too, to help implementations making sure they’re behaving correctly.
there is a test suite: https://github.com/osmlab/name-suggestion-index/blob/main/tests/matcher.test.js
I agree it would be a good idea to document better how it works. Im probably the only person who understands it 😢
I also noticed this testcase too, but sometimes I have to write a new entry and fill it with test data, then run build.
e.g.
I test Brand Name
with brand.name
and brand-name
for those common syntax not documented in https://github.com/osmlab/name-suggestion-index/wiki/Contributing#matchnamesmatchtags-optional
(Maybe because of my lack of understanding of match mechanism)
And I wish a fast way to test only a paragraph of text, or only in 1file, because every time manual run test build on all file need about 1-2 min.