Bug fix

934 views
Skip to first unread message

Jean-Philippe Barette-LaPierre

unread,
Mar 2, 2010, 4:30:09 PM3/2/10
to mo...@googlegroups.com, Robert Muir
Since I didn't made the control versioning system available to
everyone yet, here's the patch which fixes the bug
moman-57f5dc9dd0e7.diff

Robert Muir

unread,
Mar 2, 2010, 5:04:29 PM3/2/10
to j...@rrette.com, mo...@googlegroups.com
all of our tests pass (n=1,2,3), thanks so much for the quick fix!


On Tue, Mar 2, 2010 at 4:30 PM, Jean-Philippe Barette-LaPierre <j...@rrette.com> wrote:
Since I didn't made the control versioning system available to
everyone yet, here's the patch which fixes the bug



--
Robert Muir
rcm...@gmail.com

jpbar...@gmail.com

unread,
Mar 2, 2010, 7:09:52 PM3/2/10
to Robert Muir, j...@rrette.com, mo...@googlegroups.com
On Mar 2, 2010 5:04pm, Robert Muir <rcm...@gmail.com> wrote:
> all of our tests pass (n=1,2,3), thanks so much for the quick fix!
>

What are your unittests? I could integrate something similar in Moman.

Robert Muir

unread,
Mar 2, 2010, 7:28:01 PM3/2/10
to jpbar...@gmail.com, j...@rrette.com, mo...@googlegroups.com
for each n, i try to test strings to exercise every char vector... i *think* the tests do that, but I'm not sure.

i do this by using a small language of {0,1}, with integer bits, and converting to a string, this is how i got the "1001" versus "111".

for each of these strings, i build a DFA with the algorithm, and then try to confirm the DFA is correct based on the below methods.

for n=1 this is trivial, as i can build a "naive" DFA, and then ensure the naive DFA accepts the same language as the schulz&mihov DFA.

for n>1, its not so elegant. instead i create all strings in my small {0,1} language that are no longer than the input word's length + n + 1, and brute-force compare the results of each possible string with the real levenshtein algorithm.

i also have some additional sanity checks that aren't very important. attached is the java file with the junit tests.

if you have an idea for better tests, I'd be interested, as I just started developing these.
--
Robert Muir
rcm...@gmail.com
TestLevenshteinAutomata.java
Reply all
Reply to author
Forward
0 new messages