thetron / stringscore Goto Github PK
View Code? Open in Web Editor NEWStringScore is an Objective-C library which provides super fast fuzzy string matching/scoring. Based on the JavaScript library of the same name.
StringScore is an Objective-C library which provides super fast fuzzy string matching/scoring. Based on the JavaScript library of the same name.
I set up some unit tests... which I will push, but they are FAILING.
error: ... ((result2) equal to (0.425)) failed: ("0.528888888889") is not equal to ("0.425")
error: ... ((result3) equal to (0.272)) failed: ("0.361111111111") is not equal to ("0.272")
error: ... ((result4) equal to (0.250)) failed: ("0.377777777778") is not equal to ("0.25")
error: ... ((result5) equal to (0.425)) failed: ("0.377777777778") is not equal to ("0.425")
error: ... ((result6) equal to (0.646)) failed: ("0") is not equal to ("0.646")
What's going on? It seems like fuzz is having no effect.
The following strings log an exception in the console:
"Adèle" compared with "Adele"
"Ariel Pink’s Haunted Graffiti" compared with "Ariel Pink's Haunted Graffiti"
Note that in the last set of strings, there is a different apostrophe character.
The exception logged: -[__NSCFConstantString substringWithRange:]: Range or index out of bounds
I was using the StringScore library and was surprised to find that strings differing in case scored a 0. For example, the scoring the string 'sucre' against the string 'SUCRE' resulted in a score of 0. Perhaps a flag can be added like NSStringScoreOptionIgnoreCase?
It used to work fine until Mountain Lion. Now it completely goes haywire and returns weird non-matching or 0 matches. Please have a look if you can, thanks!
Take a look at w-m/StringScore and see what can be incorporated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.