Vocabulary Creation

this part is responsible for creating the vocab to be used for training the classifier 
This is more of a style thing. why do you use a weird function when they already overload the [] operator. it looks much more elegant.