Many updates for ExtractBoW-SPM.