levenshtein

calculate Levenshtein distance/similarity between given strings


Parameters

levenshtein stringA :string
            stringB :string

Attributes

alignreturn aligned strings
with:charuse given filler for alignment (default: -)

Returns

  • :integer
  • :block

Examples

copy
print levenshtein "for" "fur" ; 1 print levenshtein "one" "one" ; 0

copy
print join.with:"\n" levenshtein .align "ACTGCACTGAC" "GCATGACTAT" ; AC-TGCACTGAC ; GCATG-ACT-AT

Related