Learning annotated hierarchies from relational data