1. One or more computer-readable storage devices that store executable instructions that, when executed by a computer, cause the computer to perform acts comprising: receiving a specification of a text pattern to be matched in an input stream, said specification comprising one or more data expressions and one or more code expressions, the data expressions defining one or more phrase sets, a first one of the code expressions comprising a first container that comprises a first phrase set, a second phrase set, and a second container that comprises a third phrase set and a fourth phrase set, said specification further comprising a map set and an equivalence set that maps a plurality of phrases to a first phrase based on misspellings and equivalent phrases, said first container comprising a switch that branches between a plurality of match labels; comparing words in said input stream with said first container, said comparing act converting, based on said map set, any of said plurality of phrases to said first phrase when any of said plurality of phrases is encountered in said input stream; determining that a context in said input stream matches said first container based on a finding that said context matches either said first phrase set or said second phrase set, said first phrase set, said context being labeled as a first label if said context matches said first phrase set, or being labeled as a second label if said context matches said second phrase set; and generating a report indicating that said container matches a sequence of words in said input stream. wherein a container represents the various ways in which possible phrase sets may be combined as part of a text pattern to be matched such that the context moves forward after a match has been found between the container and a sequence of words in the input stream and a next container is processed after a location of the matching sequence of words.