Giving a word and its frequency in a text file