class documentation

A rule specifying how to add chunks to a ChunkString, using a matching tag pattern. When applied to a ChunkString, it will find any substring that matches this tag pattern and that is not already part of a chunk, and create a new chunk containing that substring.

Method __init__ Construct a new ChunkRule.
Method __repr__ Return a string representation of this rule. It has the form:
Instance Variable _pattern Undocumented

Inherited from RegexpChunkRule:

Static Method fromstring Create a RegexpChunkRule from a string description. Currently, the following formats are supported:
Method apply Apply this rule to the given ChunkString. See the class reference documentation for a description of what it means to apply a rule.
Method descr Return a short description of the purpose and/or effect of this rule.
Instance Variable _descr Undocumented
Instance Variable _regexp Undocumented
Instance Variable _repl Undocumented
def __init__(self, tag_pattern, descr): (source)

Construct a new ChunkRule.

Parameters
tag_pattern:strThis rule's tag pattern. When applied to a ChunkString, this rule will chunk any substring that matches this tag pattern and that is not already part of a chunk.
descr:strA short description of the purpose and/or effect of this rule.
def __repr__(self): (source)

Return a string representation of this rule. It has the form:

<ChunkRule: '<IN|VB.*>'>

Note that this representation does not include the description string; that string can be accessed separately with the descr() method.

Returns
strUndocumented
_pattern = (source)

Undocumented