def __init__(self, sequence=[], *args, **kwargs):
<EOL>def _ungroup(sequence, groups=None):<EOL><INDENT>for v in sequence:<EOL><INDENT>if isinstance(v, (list, tuple)):<EOL><INDENT>if groups is not None:<EOL><INDENT>groups.append(list(_ungroup(v, groups=None)))<EOL><DEDENT>for v in _ungroup(v, groups):<EOL><INDENT>yield v<EOL><DEDENT><DEDENT>else: <EOL><INDENT>yield v<EOL><DEDENT><DEDENT><DEDENT>self.groups = []<EOL>self.sequence = list(_ungroup(sequence, groups=self.groups))<EOL>i = <NUM_LIT:0><EOL>for constraint in self.sequence:<EOL><INDENT>constraint.index = i; i+=<NUM_LIT:1><EOL><DEDENT>self.strict = kwargs.get("<STR_LIT:strict>", STRICT in args and not GREEDY in args)<EOL>self.greedy = kwargs.get("<STR_LIT>", lambda chunk, constraint: True)<EOL>
A sequence of constraints that matches certain phrases in a sentence.
            The given list of Constraint objects can contain nested lists (groups).