|We don't bite newbies here... much|
Comparing large filesby Herbert37 (Novice)
|on Feb 11, 2014 at 19:04 UTC||Need Help??|
Herbert37 has asked for the
wisdom of the Perl Monks concerning the following question:
Okay, part deux. Hash look-ups are the way to solve this problem. I withdraw the question.
Okay, sorting both files appears to be the only answer I can find... Is there another?
I have two large (10Mg plus) files of words, one file contains essentially just words, the other words and their pronunciations.
I want to discover and store how many of the words in the file without pronunciations have their pronunciations in the other file.
The first way, and only way, I can think of to do this is to check each word in the file without pronunciations against every word in the pronunciation file, but that will result in 10M X 10M comparisons and be very costly in time.
Is there another way? I believe I have seen one, but cannot remember it.Thank you.