Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's an interesting one...
05-22-2009, 07:41 AM
Post: #1
Here's an interesting one...
I have been trying to come up with a good algorithm for my website the past few days. My tests have not yielded very good results... here's my problem:

My site, http://www.mwholt.com, as it stands now, uses a strict syntax -- the user must type exactly what the site expects in order to show the proper page. But I don't like that idea: I want something a little more powerful.

I've been playing with the idea of letting the user type basically anything they want, then matching their request/phrase to any one page (such as 'about me' or 'send email' pages) that is then displayed. The "matching" part is tricky, though. I have each page attributed to a set of keywords, but I need to get the phrase to be a best match to the keywords.

The keywords are, right now, stored in an array: one keyword/key phrase per element. The request (that the user types) is, right now, stored as a whole as a string.

I've been playing with PHP's levenshtein(), soundex(), and similar_text() functions. While what I have right now works, it doesn't differ between two very different pages enough. Does anyone have ideas on how to accomplish this?

- Matt
codeboards Admin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: