terms inference, created VerticalDocument and TermsTrie classes