Giter Site home page Giter Site logo

bkatwal / qwerty-jaro-winkler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nilaksh/qwerty-jaro-winkler

0.0 2.0 0.0 5 KB

Qwerty-Jaro–Winkler distance is a tweak on top of jaro winkler edit distance where we try to consider distance between keys in keyboard while calculating number of matches.

Java 100.00%

qwerty-jaro-winkler's Introduction

qwerty-jaro-winkler

The Jaro–Winkler distance is one of the ways of measuring the edit-distance between two sequences. Informally, the Jaro distance between two words is the minimum number of single-character transpositions required to change one word into the other.

The Qwerty-Jaro–Winkler distance is a tweak on top of jaro winkler edit distance where we try to consider distance between keys in keyboard while calculating number of matches.

The Jaro distance 
       dj  = {
        0 if m=0
        ⅓(m/|s1| + m/|s2| + (m-t )/m) if m > 0
       }

Where m is number of matches
	|si| is length of string si 
	T is half of the number of transpositions.

Two characters s1 and s2 are considered matching only if they are the same and not farther than floor( max(|s1|,|s2|)/2 ) -1.

The higher value of jaro distance denotes that strings are more similar and vice-versa.

The Jaro-winkler distance

dw = dj + (l*p(1-dj))
Where dw is jaro distance
	L is the length of common prefix at the start of the string up to a maximum of four characters.
	P is a constant scaling factor for how much the score is adjusted upwards for having common prefixes.

GIve example for MARTHA and MARHTA followed by NIKE and NUKE.

Example of NIKE and NUKE using qwerty jaro.

In Jaro–Winkler distance our match will be either 0 or 1 depending on the character’s we compare match or not. In Qwerty-Jaro–Winkler distance if there is no match we try to assign assign a value between 1 and 0, depending on the distance of chars in qwerty keyboard layout.

qwerty-jaro-winkler's People

Contributors

nilaksh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.