class documentation

A rule specifying how to split chunks in a ChunkString, using two matching tag patterns: a left pattern, and a right pattern. When applied to a ChunkString, it will find any chunk that matches the left pattern followed by the right pattern. It will then split the chunk into two new chunks, at the point between the two pattern matches.

Method __init__ Construct a new SplitRule.
Method __repr__ Return a string representation of this rule. It has the form:
Instance Variable _left_tag_pattern Undocumented
Instance Variable _right_tag_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, left_tag_pattern, right_tag_pattern, descr): (source)

Construct a new SplitRule.

Parameters
left_tag_pattern:strThis rule's left tag pattern. When applied to a ChunkString, this rule will find any chunk containing a substring that matches this pattern followed by right_tag_pattern. It will then split the chunk into two new chunks at the point between these two matching patterns.
right_tag_pattern:strThis rule's right tag pattern. When applied to a ChunkString, this rule will find any chunk containing a substring that matches left_tag_pattern followed by this pattern. It will then split the chunk into two new chunks at the point between these two matching patterns.
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:

<SplitRule: '<NN>', '<DT>'>

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

Returns
strUndocumented
_left_tag_pattern = (source)

Undocumented

_right_tag_pattern = (source)

Undocumented