Make word ocurrences function