Sorting a very large text file in Java
- by Alice
Hi, I have a large text file I need to sort in Java. The format is:
word [tab] frequency [new line]
The algorithm for sorting is:
Read some of the file, filtering for purlely alphabetic words.
Once you have X number of alphabetic words, call Collections.sort and write the result to a file.
Repeat until you have finished reading the file.
Start…