perlquestion
swiftone
I need to be able to search a block of text to see if a given question is in there, with broad flexibility for different ways to state the question.
<p>
My workplace has a problem with too many people asking FAQs by email. To try and free up staff time, here's my plan:
<ol>
<li>John Doe comes to our website and clicks on the "send comments and questions" link.
<li>John Doe fills out a form with contact info and a text block for comments and questions.
<li>When "submit" is clicked, the input is checked against a list of FAQs.
<ul><li>If there are no matches, the form is emailed to a customer service rep.
<li>If there is a match, the matching Q&A (or a link) is returned to the user with an appropriate blurb. The user can then either confirm that the request was not answered (which results in the form being emailed), or leave happily.
</ul>
</ol>
The problem is determining how to best do this. I could try to compare sentences to the FAQs using [CPAN://String::Approx], but that would likely match strangely, and would be baffled by the lack of punctuation our customers often use.
<p>
I could go with a keyword search, but that requires that we add keywords to the FAQ list we have, not to mention that keyword isn't such a great way to match FAQs.
<p>
In general, I'm willing to learn towards more false matches than not. Any ideas?