Contraction trie after filtering if needed.