1. A method comprising: receiving an ordered collection of text-based terms; analyzing groupings of consecutive text-based terms in the ordered collection to identify occurrences of different combinations of consecutive text-based terms in the ordered collection; and maintaining frequency information representing the occurrences of the different combinations of consecutive text-based terms in the collection.
2. The method as in claim 1 further comprising: based on the analyzing, creating a tree in which a first term in a given grouping of the groupings is defined as a parent node in the tree and a second term in the given grouping is defined as a child node of the parent node in the tree. both the first term and the second term in the given grouping being consecutive text-based terms present in the order collection.