features in flat tree: rule, ngram, word, ngram-tree
read flat tree using flex
extract features in single thread (can it be multi-threaded?)