Find the k most frequent words from a file