class_docstr: 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.
class_docstr_tok: ["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","."]
docstr: Construct a new ``SplitRule``.
  
  :type right_tag_pattern: str
  :param right_tag_pattern: This 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.
  :type left_tag_pattern: str
  :param left_tag_pattern: This 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.
  :type descr: str
  :param descr: A short description of the purpose and/or effect
      of this rule.
docstr_tok: ["Construct","a","new","``","SplitRule","``",".",":","type","right_tag_pattern",":","str",":","param","right_tag_pattern",":","This","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",".",":","type","left_tag_pattern",":","str",":","param","left_tag_pattern",":","This","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",".",":","type","descr",":","str",":","param","descr",":","A","short","description","of","the","purpose","and\/or","effect","of","this","rule","."]
code: def __init__(self, left_tag_pattern, right_tag_pattern, descr):
      """
      Construct a new ``SplitRule``.
  
      :type right_tag_pattern: str
      :param right_tag_pattern: This 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.
      :type left_tag_pattern: str
      :param left_tag_pattern: This 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.
      :type descr: str
      :param descr: A short description of the purpose and/or effect
          of this rule.
      """
      # Ensure that the individual patterns are coherent.  E.g., if
      # left='(' and right=')', then this will raise an exception:
      re.compile(tag_pattern2re_pattern(left_tag_pattern))
      re.compile(tag_pattern2re_pattern(right_tag_pattern))
  
      self._left_tag_pattern = left_tag_pattern
      self._right_tag_pattern = right_tag_pattern
      regexp = re.compile(
          "(?P<left>%s)(?=%s)"
          % (
              tag_pattern2re_pattern(left_tag_pattern),
              tag_pattern2re_pattern(right_tag_pattern),
          )
      )
      RegexpChunkRule.__init__(self, regexp, r"\g<left>}{", descr)
  
imports: import re
  import regex
  from nltk.chunk.api import ChunkParserI
  from nltk.tree import Tree
label_desc: Use image node_id 1 to create a new SplitRule object from inherited base classes: RegexpChunkRule with example: obj = SplitRule(left_tag_pattern, right_tag_pattern, descr)