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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.