edu.stanford.nlp.ling.tokensregex
Class TokenSequencePattern

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.SequencePattern<CoreMap>
      extended by edu.stanford.nlp.ling.tokensregex.TokenSequencePattern

public class TokenSequencePattern
extends SequencePattern<CoreMap>

Token Sequence Pattern for regular expressions for sequences over tokens (as the more general CoreMap). Sequences over tokens can be matched like strings.

To use


   TokenSequencePattern p = TokenSequencePattern.compile("....");
   TokenSequenceMatcher m = p.getMatcher(tokens);
   while (m.find()) ....
 

Supports the following:

Individual tokens are marked by "[" TOKEN_EXPR "]"
Possible TOKEN_EXPR: