21. A computer system comprising: a processor; a memory unit that stores instructions associated with an application executed by the processor; and an interconnect coupling the processor and the memory unit, enabling the computer system to execute the application and perform operations of: receiving a collection of text-based terms; analyzing groupings of consecutive text-based terms in the collection to identify occurrences of different combinations of text-based terms in the collection; 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; creating the tree such that the parent node represents a first word and the child node represents a second word, a combination of the parent node and the child node representing a phrase including the first word and the second word; and maintaining frequency information representing the occurrences of the different combinations of text-based terms in the collection.
23. The computer system as in claim 21 further comprising: maintaining positional information for each parent node, the positional information providing a mapping to a location in the ordered collection where a corresponding parent text-based term is located; and maintaining positional information for each child node, the positional information providing a mapping to a location in the ordered collection where a corresponding child text-based term is located.