in reply to Re: A Better Word Morph Builder
in thread A Better Word Morph Builder

I have benchmarked your method. If i am not mistaken, is's another example of bidirectional search, isn't it?

Benchmark results:

Rate find_path solo find_path2 transform find_path 5.91/s -- -62% -75% -97% solo 15.7/s 166% -- -35% -92% find_path2 24.1/s 308% 53% -- -87% transform 188/s 3084% 1097% 681% --
Note: Your solution seems to be suitable only for basic English charset:
for my $letter ( 'a'..'z' ) {
And what about the Unicode? ;)

Replies are listed 'Best First'.
Re^3: A Better Word Morph Builder
by Solo (Deacon) on Jun 29, 2006 at 20:43 UTC
    Thanks for the benchmark! You're right, it is bi-directional. And you caught me, 'a'..'z' was a precomputed optimization based on the set of characters found in my wordlist. ;) Does 2of12 include additional characters?


    You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
      2of12 includes only [a-z'0-9-]. But as i am Russian, i wanted the algorithm to work with any language ;) And it does, but takes a HUGE amount of time to process my 1Mb russian wordlist :(