Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ochiai-string-similarity with all npm packages installed. Try it out:

var ochiaiStringSimilarity = require("ochiai-string-similarity")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ochiai-string-similarity v1.0.6

Finds measure of similarity between two strings using Ochiai coefficient.

ochiai-string-similarity

Finds measure of similarity between two strings using Ochiai coefficient.

Installation

npm install ochiai-string-similarity --save
bower install ochiai-string-similarity --save

Usage

Javascript

var ochiai = require('ochiai-string-similarity');
var coeff = ochiai.getCoefficient('fdH&tr', 'fdH&tr');
Output should be '1.0'

TypeScript

import { getCoefficient } from 'ochiai-string-similarity';
console.log(getCoefficient('fdH&tr', 'fdH&tr'))
Output should be '1.0'

Test

npm run test
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free