Hierarchical understanding and comparison of contracts, research papers, and more