Text::BrewAn implementation of the Brew edit distance | |
Download |
Text::Brew Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Keith C. Ivey
- Publisher web site:
- http://search.cpan.org/~kcivey/
Text::Brew Tags
Text::Brew Description
An implementation of the Brew edit distance Text::Brew is a Perl module that implements the Brew edit distance that is very close to the dynamic programming technique used for the Wagner-Fischer (and so for the Levenshtein) edit distance. Please look at the module references below. For more information about the Brew edit distance see: < http://ling.ohio-state.edu/~cbrew/795M/string-distance.html >The difference here is that you have separated costs for the DELetion and INSertion operations (but with the default to 1 for both, you obtain the Levenshtein edit distance). But the most interesting feature is that you can obtain the description of the edits needed to transform the first string into the second one (not vice versa: here DELetions are separated from INSertions). The difference from the original algorithm by Chris Brew is that I have added the SUBST operation, making it different from MATCH operation.SYNOPSIS use Text::Brew qw(distance); my ($distance,$arrayref_edits)=distance("four","foo"); my $sequence=join",",@$arrayref_edits; print "The Brew distance for (four,foo) is $distance\n"; print "obtained with the edits: $sequence\n\n"; Requirements: · Perl
Text::Brew Related Software