Term frequency vector extractor and global dictionary builder