(Bug 3426) How fast is the dictionary algorithm? [1/2]

From: F J Franklin (F.J.Franklin@sheffield.ac.uk)
Date: Tue May 21 2002 - 13:02:28 EDT

  • Next message: F J Franklin: "(Bug 3426) How fast is the dictionary algorithm? [2/2]"

    For the curious...

    ---------- Forwarded message ----------
    Date: Sun, 19 May 2002 13:09:09 -0700 (PDT)
    From: Jesse Duke <darkphotn@yahoo.com>
    To: f.j.franklin@sheffield.ac.uk
    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
    darkphotn@yahoo.com

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



    This archive was generated by hypermail 2.1.4 : Tue May 21 2002 - 13:06:34 EDT