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.
My workplace has a problem with too many people asking FAQs by email. To try and free up staff time, here's my plan:
- John Doe comes to our website and clicks on the "send comments and questions" link.
- John Doe fills out a form with contact info and a text block for comments and questions.
- When "submit" is clicked, the input is checked against a list of FAQs.
- If there are no matches, the form is emailed to a customer service rep.
- 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.
The problem is determining how to best do this. I could try to compare sentences to the FAQs using String::Approx, but that would likely match strangely, and would be baffled by the lack of punctuation our customers often use.
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.
In general, I'm willing to learn towards more false matches than not. Any ideas?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|