wordOccurences(), function converting the word into its character occurrence list, implemented.