Generates and saves a word graph from a corpus of .txt files, storing words with their counts and co-occurrence counts.