edit-distance 0.2.0 → 0.2.1
raw patch · 3 files changed
+6/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.EditDistance: ConstantCost :: !Int -> Costs a
+ Text.EditDistance: VariableCost :: (a -> Int) -> Costs a
+ Text.EditDistance: data Costs a
Files
- Text/EditDistance.hs +1/−1
- Text/EditDistance/EditCosts.hs +4/−4
- edit-distance.cabal +1/−1
Text/EditDistance.hs view
@@ -2,7 +2,7 @@ -- | Computing the edit distances between strings module Text.EditDistance ( - EditCosts(..), defaultEditCosts, + Costs(..), EditCosts(..), defaultEditCosts, levenshteinDistance, restrictedDamerauLevenshteinDistance ) where
Text/EditDistance/EditCosts.hs view
@@ -15,10 +15,10 @@ cost (VariableCost f) x = f x data EditCosts = EditCosts {- deletionCosts :: Costs Char,- insertionCosts :: Costs Char,- substitutionCosts :: Costs (Char, Char),- transpositionCosts :: Costs (Char, Char)+ deletionCosts :: Costs Char, -- ^ Cost of deleting the specified character from the left string+ insertionCosts :: Costs Char, -- ^ Cost of inserting the specified characters into the right string+ substitutionCosts :: Costs (Char, Char), -- ^ Cost of substituting a character from the left string with one from the right string -- with arguments in that order.+ transpositionCosts :: Costs (Char, Char) -- ^ Cost of moving one character backwards and the other forwards -- with arguments in that order. } {-# INLINE deletionCost #-}
edit-distance.cabal view
@@ -1,5 +1,5 @@ Name: edit-distance-Version: 0.2.0+Version: 0.2.1 Cabal-Version: >= 1.2 Category: Algorithms Synopsis: Levenshtein and restricted Damerau-Levenshtein edit distances