UNPKG

wordmap

Version:
21 lines (20 loc) 784 B
import Algorithm from "../Algorithm"; import AlignmentMemoryIndex from "../index/AlignmentMemoryIndex"; import CorpusIndex from "../index/CorpusIndex"; import Prediction from "../structures/Prediction"; /** * Calculations the equivalence of the target n-gram with the source n-gram. * This is primarily useful when aligning texts within the same language. * e.g. to uncover variations within the text such as spelling and word order. */ export default class NgramEquality extends Algorithm { name: string; /** * Load data into the predictions * @param predictions * @param cIndex * @param saIndex * @param usIndex */ execute(prediction: Prediction, cIndex: CorpusIndex, saIndex: AlignmentMemoryIndex, usIndex: CorpusIndex): Prediction; }