liblevenshtein 4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
Loading...
Searching...
No Matches
liblevenshtein::distance Namespace Reference

Memoized, recursive distance metrics typically used to evaluate the correctness of Levenshtein automata. More...

Classes

class  Distance
 Metric that measures the edit distance between two terms, denoted d(v,w). More...
 
class  MemoizedDistance
 Memoizes the distance between pairs of terms. More...
 
class  MergeAndSplitDistance
 Computes the standard Levenshtein distance extended with two additional elementary operations: (1) merge and (2) split. More...
 
class  StandardDistance
 Computes the standard Levenshtein distance, which includes the elementary operations of insertion, deletion, and substitution. More...
 
class  SymmetricPair
 Represents a pair of terms sorted, lexicographically, in ascending order. More...
 
class  TranspositionDistance
 Computes the standard Levenshtein distance extended with the elementary operation of transposition. More...
 

Functions

auto operator<< (std::ostream &out, const SymmetricPair &pair) -> std::ostream &
 

Detailed Description

Memoized, recursive distance metrics typically used to evaluate the correctness of Levenshtein automata.

These may also be used to compare individual pairs of terms.

Function Documentation

◆ operator<<()

auto liblevenshtein::distance::operator<< ( std::ostream & out,
const SymmetricPair & pair ) -> std::ostream &

Definition at line 23 of file symmetric_pair.cpp.

24 {
25 out << "SymmetricPair{first=\"" << pair.first << "\", second=\""
26 << pair.second << "\"}";
27 return out;
28}
std::string second
The lexicographically greater term of the pair.
std::string first
The lexicographically lesser term of the pair.
void query(ll::Dawg *dawg, const std::string &query_term, std::size_t max_distance)
Definition main.cpp:25