Vocabulary Creation

this part is responsible for creating the vocab to be used for training the classifier 
can you tell me where it says you cant append into an empty vector