String metric (e.g., the Damerau-Levenshtein distance) Java library
Java
Switch branches/tags
Nothing to show
Latest commit 3376e57 Oct 15, 2013 @kelseyfrancis kelseyfrancis Merge pull request #3 from chris-martin/readme-code-example
Add code example to README.md
Permalink
Failed to load latest commit information.
src Initial code Oct 2, 2013
.gitignore Initial code Oct 2, 2013
LICENSE Initial code Oct 2, 2013
NOTICE Initial code Oct 2, 2013
README.md Add code example to README.md Oct 15, 2013
pom.xml [maven-release-plugin] prepare for next development iteration Oct 2, 2013

README.md

string-metric

A Java library of String metrics.

Damerau-Levenshtein distance

import edu.gatech.gtri.stringmetric.*;
StringMetric metric = new DamerauLevenshteinDistance();

assert(4 == metric.distance(
        "The quick brown fox jumps over the lazy dog.",
        "Thy quick brown ox jumps hover teh lazy dog."));
//         |             |        |      ||
//         |             |        |      \|
//   Substitution        |    Insertion   |
//                       |                |
//                   Deletion        Transposition of two
//                                   adjacent characters

Release artifacts

This project's release artifacts are available in the Maven Central Repository.

<dependency>
  <groupId>edu.gatech.gtri.string-metric</groupId>
  <artifactId>string-metric</artifactId>
  <version>1.0</version>
</dependency>