Finding the most relevant snippet from a document, based on the search query.

*** Most Relevant Snippet Selection Algorithm ***

This is a scoring based algorithm for finding the most relevant snippet
of a review, given a search query.

The process starts with producing all permutations of the search query.
Then these permutations are entered into a dictionary with their respective
scores. The permutations that are in original order of the search query get
the higher scores. In short it is;

k = # of words in search query

k*16 points - k words of query found as a phrase in order
k*8 points - k words of query found as a phrase out of order
n*4 points - n words of query (1 < n < k) found as phrase in order
n*2 points - n words of query (1 < n < k) found as phrase out of order
1 - 1 word of the search query found by itself

Please see rel_snippet.py for the rest.

Project Activity

See All Activity >

Follow RelevantSnippet

RelevantSnippet Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RelevantSnippet!

Additional Project Details

Registered

2010-10-26