class_docstr: An interface for generating lists of transformational rules that
  apply at given sentence positions.  ``BrillTemplateI`` is used by
  ``Brill`` training algorithms to generate candidate rules.
class_docstr_tok: ["An","interface","for","generating","lists","of","transformational","rules","that","apply","at","given","sentence","positions",".","``","BrillTemplateI","``","is","used","by","``","Brill","``","training","algorithms","to","generate","candidate","rules","."]
docstr: Returns the set of indices *i* such that
  ``applicable_rules(token, i, ...)`` depends on the value of
  the *index*th token of *token*.
  
  This method is used by the "fast" Brill tagger trainer.
  
  :param token: The tokens being tagged.
  :type token: list(tuple)
  :param index: The index whose neighborhood should be returned.
  :type index: int
  :rtype: set
docstr_tok: ["Returns","the","set","of","indices","*","i","*","such","that","``","applicable_rules","(","token",",","i",",","...",")","``","depends","on","the","value","of","the","*","index","*","th","token","of","*","token","*",".","This","method","is","used","by","the","``","fast","''","Brill","tagger","trainer",".",":","param","token",":","The","tokens","being","tagged",".",":","type","token",":","list","(","tuple",")",":","param","index",":","The","index","whose","neighborhood","should","be","returned",".",":","type","index",":","int",":","rtype",":","set"]
code: def get_neighborhood(self, token, index):
      """
      Returns the set of indices *i* such that
      ``applicable_rules(token, i, ...)`` depends on the value of
      the *index*th token of *token*.
  
      This method is used by the "fast" Brill tagger trainer.
  
      :param token: The tokens being tagged.
      :type token: list(tuple)
      :param index: The index whose neighborhood should be returned.
      :type index: int
      :rtype: set
      """
  
file_path: nltk/nltk/tbl/template.py
imports: import itertools
  from abc import ABCMeta, abstractmethod
  from nltk.tbl.feature import Feature
  from nltk.tbl.rule import Rule
label_desc: Use image node_id 2 for calling the BrillTemplateI obj's underlying member method code with example usage: obj.get_neighborhood(token, index) without return types