1. A method for determining a degree of similarity between documents, the method comprising the steps of: storing, for at least two documents, labeled tree representations of respective documents; storing, for at least two documents, path representations relating to paths that occur in the documents from root nodes to leaf nodes in the labeled tree representations of the respective documents; and calculating a measure of similarity between two of the documents based upon the frequency of occurrence of similar paths specified by the path representations.