[SOLVED] Algo Homework 01-Document Distance Problem

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon HW01-vst1tz.zip (310.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Document similarities are measured based on the content overlap between documents. With the large number of text documents in our life, there is a need to automatically process those documents for information extraction, similarity clustering, and search applications.

There exist a vast number of complex algorithms to solve this problem. One of such algorithms is a cosine similarity – a vector based similarity measure. The cosine distance of two documents is defined by the angle between their feature vectors which are, in our case, word frequency vectors. The word frequency distribution of a document is a mapping from words to their frequency count.

Write a program that ask the user to enter two documents’ name, obtains the two documents’ name from user and opens the documents. Finally, calculates the word frequency and cosine distance of two documents.

Sample input

../t2.bobsey.txt

../t6.onemillion.txt

Sample output

The distance between the documents is: 1.570796

  • HW01-vst1tz.zip