Changed algorithms such that they take account of the fact that the WordNet ontology is not a tree, but a DAG with a single root.