com.github.dylon.liblevenshtein.levenshtein.factory.IntersectionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liblevenshtein Show documentation
Show all versions of liblevenshtein Show documentation
A library for spelling-correction based on Levenshtein Automata.
The newest version!
// Generated by delombok at Sat Apr 30 14:43:05 PDT 2016
package com.github.dylon.liblevenshtein.levenshtein.factory;
import java.io.Serializable;
import com.github.dylon.liblevenshtein.levenshtein.Intersection;
import com.github.dylon.liblevenshtein.levenshtein.IState;
/**
* Builds intersections between a dictionary automaton and a Levenshtein
* automaton.
* @param Kind of nodes in the dictionary automaton.
* @author Dylon Edwards
* @since 2.1.0
*/
public class IntersectionFactory implements IIntersectionFactory, Serializable {
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public Intersection build(final String candidate, final DictionaryNode dictionaryNode, final IState levenshteinState) {
final com.github.dylon.liblevenshtein.levenshtein.Intersection intersection = new Intersection();
intersection.candidate(candidate);
intersection.dictionaryNode(dictionaryNode);
intersection.levenshteinState(levenshteinState);
return intersection;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy