The semtree package is responsible for building the semantic tree. It can be found on GitHub.
semtree