added getIndexClass function to the Vocabulary related to #84
fixes #84