Example usage for edu.stanford.nlp.util StringUtils editDistance

List of usage examples for edu.stanford.nlp.util StringUtils editDistance

Introduction

In this page you can find the example usage for edu.stanford.nlp.util StringUtils editDistance.

Prototype

public static int editDistance(String s, String t) 

Source Link

Document

Computes the Levenshtein (edit) distance of the two given Strings.

Usage

From source file:edu.cmu.geolocator.model.CandidateAndFeature.java

License:Apache License

public void setF_strSim() {
    // TODO Auto-generated method stub
    stringSim = StringUtils.editDistance(asciiName, originName);
    stringSim = 1.0d - stringSim / (double) Math.max(asciiName.length(), originName.length());
}