The title says it all: I am looking for a generic implementation that tells me the edit distance of two lists. The implementations on CPAN all seem to work on string-data. Which is OK for finding typos but makes WER calculation tedious.
So, I want a generic implementation that takes a comparator-function (as in sort {$a <=> $b} @list) and two lists and outputs the edit distance. Nice to have would be distance-weights and really nifty if the value of the comparator function (not only !=0 but how much lower or higher) was taken into account.
Luckily I don't need it now, so I don't have to write it. But it would be a great finger exercise for a Perl-in-NLP class.
EDIT: The obvious module Text::Levenshtein on CPAN actually *miscalculates* Levenshtein-distance for some input. Luckily I wondered what the 3 bugs in the module were about before I just happily used that code... So I ended up slightly modifying an implementation by Eli Bendersky, which already uses lists internally. So I left out the part about the comparator interface for now and just calculate standard WER, which is all I need right now.
Keywords: fixme, helpme, perl
