Write program to print names of files with similarity

Assignment Help Programming Languages
Reference no: EM1388359

The basic task is to measure similarity between any two files in our collection. To do this, we will require a appropriate universe of words. This will consist of all words in collection that are (a) more than four letters long, (b) don't occur more than 20 times overall, and (c) do not happen in more than 7 files in collection. Now we constructor a vector (in mathematical sense) corresponding to each file. Vector will have as many coordinates as words in universe -- so there is one coordinate for each word in universe. If word occurs in file, corresponding coordinate is 1, otherwise it is 0.

Let us give example: assume universe consists of five words: apple, grapes, banana, doctor, program. Assume file1 contains: apple, banana, program. Then the vector for file1 is (1,0,1,0,1).

We require to normalize each of vectors so that it has unit length. So each coordinate in above vector gets divided by square root of 3.

Similarity of two files is defined to be scalar product of corresponding two vectors. Scalar product of two vectors is obtained by multiplying corresponding components and adding. For instance, scalar product of (2,1,3) and (0,5,6) is 2 * 0 + 1 * 5 + 3 * 6.

Your task is to write down the program which prints names of two files with highest similarity among files in collection, and names of two files with lowest similarity.

Reference no: EM1388359

Questions Cloud

Market following a weibull distribution : A Manager needs to decide between two machines to put into market following a Weibull distribution. Machine X test unit cost $3000 with beta=3 and theta=500 Machine Y test unit cost $2000 with beta=3 and theta=400
Issues of health care legal liability : As a new member of the Institutional Policy Review Team, you're seeking information about institutional, professional, and personal ethical standards and dilemmas with respect to privacy of medical information, professional and personal ethical st..
Determine the equation of the line : You are estimating the cost ($K) of optical sensors based on the power output of the sensor. Using the preliminary calculations from a data set of 8 sensors, determine the equation of the line. (Round your intermediate calculations to 3 decimal pl..
A business organization intends to develop a new e-commerce : A business organization intends to develop a new e-commerce Web site to enable its customers to make online purchases of computers in a quicker and more efficient manner
Write program to print names of files with similarity : Write down the program which prints names of two files with highest similarity among files in collection, and names of two files with lowest similarity.
Compare an experimental medication : A clinical trial is organized to compare an experimental medication designed to lower blood pressure to a placebo. Before starting the trial, a pilot study is conducted involving ten participants.
Null and alternative hypothesis : what statement should be made about the null and alternative hypothesis based on sample data and significance level?
Productivity is measured by the ratio of outputs : Productivity is measured by the ratio of outputs to inputs. Some organizations use a partial measure of productivity to measure actual operations, such as a restaurant using number of customer meals per labor hour.
Measurement process-improvement process : Organization selected for the project is a Pharmaceuticals company. I want help in finding information for section six (Measurement process) and seven (Improvement process). If you could provide me some ideas and push me in right direction, I woul..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to open the text file-reads its contents

Write down a program which opens the text file and reads its contents into the stack of characters. Program must then pop characters from stack and save them in second text file.

  Procedure to draw shape of choice

Write a program with a suitable procedure to draw shape of your choice. Your program must then call the procedure 10 times to draw the shape.

  Write program to display company payroll report in list box

Write a program that display a company payroll report in a list box. the program should read each employees name, hourly rate and hours worked from a file and produce a report.

  Write program that prompts user to specify people and car

Write a C++ program that prompts the user to specify people and cars. Store them in a vector and a vector .

  Create a multi-threaded competition

Create a multi-threaded competition in which opposing Robin Hoods will attack one another and try to take each other's gold coins.

  Write program which simulates checkout queue object

Write program which simulates checkout line at supermarket. Line is queue object. Customers (i.e., customer objects) arrive in random integer intervals of 1-4 minutes.

  Development of the current strategic potential of airline

Evaluate the organisation's current external and internal strategic position

  Write if statement to display acceptance messag

Write an if statement that displays an acceptance message for an astronaut candidate if the person's weight is between the values of opt_min.

  Create application displays number of square feet in house

Create application displays number of square feet in house. Explain and initialize the length and width of the house to 37 and 22, respectively.

  Write code to takes input from console

Write code using C++ which takes input from console and displays output on console. You will write program which takes user input, does some basic arithmetic, and displays the results.

  Display policy data after revisions have made

The day is not correct for the month (that is, between 1 and 31 for January, 1 and 29 for February, and so on), then set the month, day, and year to 0. Display the policy data after any revisions have been made.

  Write a program to read the data from csv file

Write a program that will read the data from the CSV file into an ArrayList of State objects where each State object stores information about all County objects for that state.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd