Coder Social home page Coder Social logo

yutou / java-string-similarity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rrice/java-string-similarity

0.0 3.0 0.0 163 KB

A Java library that implements several algorithms that calculate similarity between strings.

License: MIT License

Java 100.00%

java-string-similarity's Introduction

java-string-similarity that calculates a normalized distance or similarity score between two strings. A score of 0.0 means that the two strings are absolutely dissimilar, and 1.0 means that absolutely similar (or equal). Anything in between indicates how similar each the two strings are.

Example

In this simple example, we want to calculate a similarity score between the words McDonalds and MacMahons. We are selecting the Jaro-Winkler distance algorithm algorithm.

SimilarityStrategy strategy = new JaroWinklerStrategy();
String target = "McDonalds";
String source = "MacMahons";
StringSimilarityService service = new StringSimilarityServiceImpl(strategy);
double score = service.score(source, target); // Score is 0.90

Algorithms

Installation

This project currently uses Maven for management. You can compile, test and install the component to your local repo by calling:

mvn install

Then, you can add this component to your project by adding a dependency:

<dependency>
    <groupId>net.ricecode</groupId>
	<artifactId>string-similarity</artifactId>
	<version>1.0.0</version>
</dependency>

TODO

java-string-similarity's People

Contributors

gernotstarke avatar madkrupt avatar rrice avatar

Watchers

 avatar  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.