Skip to main content
nikos101
Inspiring
January 27, 2009
Question

Does anyone have a clever algorithim, string search

  • January 27, 2009
  • 4 replies
  • 423 views
I have an array of 8 strings. I accept a user string and return the closest match from the array. Does anyone have a clever algorithim that will do this?
This topic has been closed for replies.

4 replies

Inspiring
January 27, 2009
> I make the array in CF, I'm not really sure of the critiria, I want it to work like Google search results:
>
> "Did you mean HBOS intead of hboss"

>> Does anyone have a clever algorithim that will do this?

Yep. The people who own Google and make their living providing such
servcices.

Or the bods who wrote Lucene or Verity have a clue or two, too.

You're basically asking us if we know how to write a search engine. My
suggestion would be to not try to reinvent the wheel, but use one of the
systems already out there.

Google appliances costs a fair bit, but Lucene is free, and CF bundles
Verity with it. I recommend you use one of those two.

--
Adam
nikos101
nikos101Author
Inspiring
January 27, 2009
Also exact matches from the user string say, "hbos" will not need to be tested for closeness to the values in the test array as hbos is already a value.
nikos101
nikos101Author
Inspiring
January 27, 2009
I make the array in CF, I'm not really sure of the critiria, I want it to work like Google search results:

"Did you mean HBOS intead of hboss"

you know what i mean :)
Inspiring
January 27, 2009
Where does the array come from?

What criteria do you use for best match?