Hierarchical bag-of-word library for C++