Question: I've left out the source files because there is a lot of code. I just would like the pseudo code in order to be able

I've left out the source files because there is a lot of code. I just would like the pseudo code in order to be able to write this function.

I've left out the source files because there is a lot of

Part B (5 pts): Comparing two documents (linked lists) An email document is represented as a linked list. The nearest neighbor algorithm requires some way to compare a document to another and get a value that represents how similar the documents are. For this assignment we'll use a simple comparison metric that just computes how many terms are common between the two linked lists, ignoring the frequency counter for now. For example if we have these documents with these terms: docl never forget hot krunk; &rarr hello doc2 hello hot reply If we compare doc2 with doel then we go through every term in doc1 and count how many are in doc2. "hot" and "hello" are the only terms that appears in both docs, so the similarity comparison value is 2. This metric has some obvious shortcomings, for example, if there is a document with every single term then it will get a 100% match. We'll explore a better metric in a future assignment that uses the counter value. To do: Complete this function in the Document class: float Document::compareDocument (Document *otherDoc) { The function compares the two linked lists as described above and returns a float that is their similarity. Once again I recommend you test this function from main before moving on to the last part

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!