Calculating distances over merged hierarchy. Simplified loading from RDF dumps.