Better in-page search, created by Ryhan Hassan.
<scriptsrc="lib/jquery.js"></script><scriptsrc="lib/underscore.js"></script><scriptsrc="lib/natural.js"></script><scriptsrc="lib/jspos/lexer.js"></script><scriptsrc="lib/jspos/lexicon.js_"></script><scriptsrc="lib/jspos/POSTagger.js"></script><scriptsrc="answer.js"></script>Create a new answer object, and run read() on any text.
reader=newanswer();reader.read($('article').text());Running match( text ) will return an array of sentences in descending rank with their rank.
varanswers=reader.match("What is the longevity of a soap bubble limited by?");// Log the top answer, formatted as [score, text]console.log(answers[0]);demo.htmllogs the top answer to the consolesearch.htmlis a demo with a styled search field.