Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions