Create the feature vector from the word indices