Implement first methods

Fills in wordOccurrences and stringOccurrences.