[sword-devel] lexdict suggestion

Christian Renz sword-devel@crosswire.org
Fri, 2 Aug 2002 14:14:41 +0800


This is something for a future release... just some food for thought.

Especially for dictionaries, it would be very convenient to match the
user's search key against the whole string instead of matching against
the beginning only.

Consider the following three english entries in CEDICT:

  (double-edged) sword
  steel sword
  sword

If I am searching for "sword", I would like to find all three of
them. But because of the way the lookup works, I only find the find. I
already modified the module generation library so that for

  (double-edged) sword

it will generate the keywords

  double-edged sword
  sword

But there is no way I could do that for e.g. "steel sword" without
making the module even bigger than it already is and much more complex
and unusable.

So I propose to add a module option that instead of jumping to the entry
that starts with the search term, sword will reduce the list to those
that match the search term. I know it can't be as fast as in Perl,
because you guys are using C++ ;-) but it should still be possible to
do it in an acceptable speed.

Greetings,
   Christian

-- 
crenz@web42.com - http://www.web42.com/crenz/ - http://www.web42.com/

"If God were a Kantian, who would not have us till we came to Him from
the purest and best motives, who could be saved?"
    -- C.S. Lewis, The Problem of Pain