Finding and indexing 'similar' string

Joshua 'Schwa' Gargus schwa at cc.gatech.edu
Mon Aug 25 07:14:39 UTC 2003


On Mon, Aug 25, 2003 at 08:19:22AM +0200, Martin Drautzburg wrote:
> does anybody know of a way of finding strings that match a given
> pattern closely, but not necessarily exactly (like the Levinshtein
> distance) available in Smalltalk ? 

You might take a look at String>>correctAgainstDictionary:continuedFrom:,
which is called when you type a variable/method name that doesn't
exist in the system, and computes a list of likely spellings.

> 
> And does anybody know a way to index strings so the strings that are
> close to a pattern can be found quickly ?
> 

Not off-hand.  Check the list archives for the work Scott Crosby did
on text indexing; I'm not sure if it included the type of "near-miss"
indexing that you are interested in.

Joshua



More information about the Squeak-dev mailing list