edits-0.1.0.1: show the differences between 2 pieces of Text using the Levenshtein distance
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Text.Costs

Description

This module supports a general definition of costs for performing edit operations on 2 lists of elements

Synopsis

Documentation

data Cost Source #

Current operation in a cost matrix and current cost

Instances

Instances details
Show Cost Source # 
Instance details

Defined in Data.Text.Costs

Methods

showsPrec :: Int -> Cost -> ShowS #

show :: Cost -> String #

showList :: [Cost] -> ShowS #

Eq Cost Source # 
Instance details

Defined in Data.Text.Costs

Methods

(==) :: Cost -> Cost -> Bool #

(/=) :: Cost -> Cost -> Bool #

cost :: Cost -> Int Source #

Return the cost of an operation

showCost :: Cost -> Text Source #

Nicer display for a cost

data Costs a Source #

This component contains functions to evaluate the cost of substituting, inserting, deleting an element

Constructors

Costs 

Fields

textLevenshteinCosts :: Costs Char Source #

Classic costs for the Levenshtein distance applied to characters in a piece of Text

levenshteinCosts :: forall a. Eq a => Costs a Source #

Classic costs for the Levenshtein distance