rabbitzzc / js-string-comparison Goto Github PK
View Code? Open in Web Editor NEW🤠A library implementing different string similarity using JavaScript.
Home Page: https://www.npmjs.com/package/string-comparison
License: MIT License
🤠A library implementing different string similarity using JavaScript.
Home Page: https://www.npmjs.com/package/string-comparison
License: MIT License
<script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script>
<script src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script>
let stringComparison = require('string-comparison')
const Thanos = 'healed'
const Rival = 'sealed'
const Avengers = ['edward', 'sealed', 'theatre']
// use by cosine
let cos = stringComparison.cosine
console.log(cos.similarity(Thanos, Rival))
console.log(cos.distance(Thanos, Rival))
console.log(cos.sortMatch(Thanos, Avengers))
</script>
The installation instructions use the package name string-comparision
but the actual package name is string-comparison
To install the instructions should read:
npm install string-comparison --save
The sample code has a line which should be commented out:
// use Consine
..and the method name has a typo, it should be cosine
not consine
. Correct line should be:
let cos = stringComparision.cosine
Is the Jaro-Winkler algorithm being implemented or not?
In the documentation I can see it in the table but not in the API
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.