I have a data set, which contains, a string and a integer in the form of This is the string, 5678.And say there are about 7000 such couples. Each with a string which may or may not be similar, but will definitely have a unique integer representing them. I wanted to group couples which have similar strings (similar, but not the same). I figured if I could match the strings to a certain percentage I would have been able to say that the strings meant the same thing. For example, I have Royal Tours and Travels, Royal Tours. Both of these companies are the same, but because the data is being retrieved from different sites, these have different strings. If I could somehow take out say, the top 10 most common words, Tours, Travels, And etc., I would be able to match the strings. Now I know that one particular method. I could iterate through every string and make a space for every word with a counter for every word. I could do this using maps. Every time a word matches its key, I would increase the counter in the maps.And then I would remove all the words from the strings which feature in the top 10/20 of the map. However, I feel that there must be a better way to handle this situation. Can you please provide your ideas as to how to do this. What data structures should I use, to increase my efficiency? Also is there  an algorithm that will help me do this? Ps. I am writing my code in Java, but I am also proficient in C plus plus. So if you would give the algorithm or explanation in either it would be great.
How to find the top 10 most commonly reccurring words in a data set?
algorithms;data structures;counting