Question: Your assignment will be to create a search engine that will allow the user to enter a query of terms that will be processed as

Your assignment will be to create a search engine that will allow the user to enter a query of terms that will be processed as a bag of words query.

Your search engine must meet the following requirements:

It must prompt the user to enter a query as a bag of words where multiple terms can be entered separated by a space

For each query term entered, you process must determine the tf-idft,d weight

Using the query terms, your process must search for each document that contains each of the query terms

For each document that contains all of the search terms, your process must calculate the cosine similarity between the query and the document

The list of cosine similarity scores must be sorted in descending order from the most similar to the least similar

Finally your search process must print out the top 20 documents (or as many as are returned by the search if there are fewer than 20) listing the following statistics for each:

The document file name

The cosine similarity score for the document

The total number of items that were retrieved as candidates (you will only print out the top 20 documents)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!