class_docstr: CRF Feature which is used by :class:`.CRFSlotFiller`
  
  Attributes:
      base_name (str): Feature name (e.g. 'is_digit', 'is_first' etc)
      func (function): The actual feature function for example:
  
          def is_first(tokens, token_index):
              return "1" if token_index == 0 else None
  
      offset (int, optional): Token offset to consider when computing
          the feature (e.g -1 for computing the feature on the previous word)
      drop_out (float, optional): Drop out to use when computing the
          feature during training
  
  Note:
      The easiest way to add additional features to the existing ones is
      to create a :class:`.CRFFeatureFactory`
code: def compute(self, token_index, cache):
      if not 0 <= (token_index + self.offset) < len(cache):
          return None
  
      if self.base_name in cache[token_index + self.offset]:
          return cache[token_index + self.offset][self.base_name]
  
      tokens = [c["token"] for c in cache]
      value = self.function(tokens, token_index + self.offset)
      cache[token_index + self.offset][self.base_name] = value
      return value
  
file_path: snips-nlu/snips_nlu/slot_filler/feature.py
imports: from __future__ import unicode_literals
  from builtins import object
label_desc: Use image node_id 5 for calling the Feature obj's underlying member method code with example usage: obj.compute(token_index, cache) and returns: value, None, cache