Memory problems solved. We can now use  calculate_frequencies_whole_corpus