For the curious...

---------- Forwarded message ----------
Date: Sun, 19 May 2002 13:09:09 -0700 (PDT)
From: Jesse Duke <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: re3: How fast is the dictionary algorithm?

My apologies in advance if I'm supposed to reply to the bugzilla list and
not directly to this email.

> Currently we use ispell or aspell/pspell for dictionary work. I have no idea
> whether we'd be able to use your stuff - could you please give us a
> description of your routine's capabilities?
> 
> For example, will it handle word-lists in any encoding? Will it handle
> compound words?

It's fastest when working with contiguous characters ('a'..'z'), but can
be tweaked to handle anything you can throw at it: ascii, unicode, arrays
of integer values.

Rough information on the algorithm:

The purpose of zigword() is to find out whether or not a certain string
is in a list of other strings.  It runs in O(1) time when considering the
length of the dictionary file.  The dictionary file is considerably
smaller than a brute-force listing of all words in the dictionary.

I'm not familiar with pspell/ispell/aspell.  If they use either a basic
for loop or a binary search to check an ascii listing of dictionary words
(or some similar method), then zigword() would be much faster.  No matter
which method is used, zigword() will likely have a smaller dictionary
file.

-Jesse Duke
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com


Reply via email to