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
Build Securely on AWS with Proven Frameworks Icon
Build Securely on AWS with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download Now
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