Implemented BoW creation