Bag of Words feature extraction