class_docstr: Brill's transformational rule-based tagger.  Brill taggers use an
  initial tagger (such as ``tag.DefaultTagger``) to assign an initial
  tag sequence to a text; and then apply an ordered list of
  transformational rules to correct the tags of individual tokens.
  These transformation rules are specified by the ``TagRule``
  interface.
  
  Brill taggers can be created directly, from an initial tagger and
  a list of transformational rules; but more often, Brill taggers
  are created by learning rules from a training corpus, using one
  of the TaggerTrainers available.
code: def tag(self, tokens):
      # Inherit documentation from TaggerI
  
      # Run the initial tagger.
      tagged_tokens = self._initial_tagger.tag(tokens)
  
      # Create a dictionary that maps each tag to a list of the
      # indices of tokens that have that tag.
      tag_to_positions = defaultdict(set)
      for i, (token, tag) in enumerate(tagged_tokens):
          tag_to_positions[tag].add(i)
  
      # Apply each rule, in order.  Only try to apply rules at
      # positions that have the desired original tag.
      for rule in self._rules:
          # Find the positions where it might apply
          positions = tag_to_positions.get(rule.original_tag, [])
          # Apply the rule at those positions.
          changed = rule.apply(tagged_tokens, positions)
          # Update tag_to_positions with the positions of tags that
          # were modified.
          for i in changed:
              tag_to_positions[rule.original_tag].remove(i)
              tag_to_positions[rule.replacement_tag].add(i)
  
      return tagged_tokens
  
imports: from collections import Counter, defaultdict
  from nltk import jsontags
  from nltk.tag import TaggerI
  from nltk.tbl import Feature, Template
label_desc: Use image node_id 6 for calling the BrillTagger obj's underlying member method code with example usage: obj.tag(tokens) and returns: tagged_tokens