Re: Compare words (not Strings)
From: Ryan Stewart (zzanNOtozz_at_gSPAMo.com)
Date: 03/21/04
- Next message: Ahmed: "Java code that execute Unix shell scripts"
- Previous message: Richard Wheeldon: "Re: need indexing PDF & DOC files"
- In reply to: Lāʻie Techie: "Re: Compare words (not Strings)"
- Next in thread: David R. Conrad: "Re: Compare words (not Strings)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 20 Mar 2004 17:09:44 -0600
"La?ie Techie" <laie@wing_this_etsolutions.com> wrote in message
news:80756f335c3d54864084c6543e873dbb@news.teranews.com...
> On Sat, 20 Mar 2004 15:31:26 -0600, Ryan Stewart wrote:
>
> > I Googled this, but maybe I wasn't using the right keywords. Is there a
> > class or API somewhere that will compare words and decide whether
they're
> > the same or *almost* the same? I'm looking for something that could be
> > used kind of like a spell-checker, though that's not what I'm using it
> > for. Ideally, given one word to examine and a list of words to check it
> > against, it would return the words from the list that are similar to the
> > word it is examining.
>
> define similar.
>
> In the core API, Strings can be checked either case sensitively are
> without regard to case. Any other approximation will ultimately fall back
> on these two functions.
>
> There are various algorithms for defining approximate equality. You can
> use Soundex, Metaphone, or Levenshtein.
>
> Soundex and Metaphone return Strings which are approximate pronunciations
> of a String. Metaphone is more accurate (Phred and Fred are equal
> according to Metaphone, but not Soundex).
>
> Levenshtein returns the number of character changes (add, replace, or
> remove) to convert the first String to the second.
>
> HTH,
> La'ie Techie
That sounds like it'll give me a good start. I didn't explain as well as I
thought I did. I said spell-checker when I meant something more like the
word suggesting portion of a spell-checker. It's meant to help keep
duplicate entries from getting into a database. For instance, part of the
database might hold spices (like cooking spices). Suppose a user comes along
and adds "cinnamon" to the list of spices. Then suppose another user tries
to add it without realizing it already exists, but he or she types "cinamon"
or "cinanmon". I need something that will notice that those misspellings are
similar to "cinnamon" so I can put up a some kind of confirmation message.
Thanks for the names. I'll check them out.
- Next message: Ahmed: "Java code that execute Unix shell scripts"
- Previous message: Richard Wheeldon: "Re: need indexing PDF & DOC files"
- In reply to: Lāʻie Techie: "Re: Compare words (not Strings)"
- Next in thread: David R. Conrad: "Re: Compare words (not Strings)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]