Write a method that reads in a text file and outputs a hash containing the frequency that each word occurs within the text.