com.github.liblevenshtein.distance.factory.IDistanceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liblevenshtein-lite Show documentation
Show all versions of liblevenshtein-lite Show documentation
A library for spelling-correction based on Levenshtein Automata.
package com.github.liblevenshtein.distance.factory;
import java.io.Serializable;
import com.github.liblevenshtein.distance.IDistance;
import com.github.liblevenshtein.transducer.Algorithm;
/**
* Builds instances of Levenshtein distance metrics.
* @author Dylon Edwards
* @param Type of the terms whose distances are measurable.
* @since 2.1.0
*/
public interface IDistanceFactory extends Serializable {
/**
* Returns a Levenshtein distance metric that utilizes the request algorithm.
* @param algorithm Type of metric that should be returned
* @return A distance metric that utilizes the request alagorithm
*/
IDistance build(Algorithm algorithm);
}