class_docstr: Generates scores (log odds) for output text explanation algorithms using Teacher Forcing technique.
  
  This class supports generation of log odds for transformer models as well as functions. In model agnostic
  cases (model is function) it expects a similarity_model and similarity_tokenizer to approximate log odd scores
  for target sentence generated by the model.
class_docstr_tok: ["Generates","scores","(","log","odds",")","for","output","text","explanation","algorithms","using","Teacher","Forcing","technique",".","This","class","supports","generation","of","log","odds","for","transformer","models","as","well","as","functions",".","In","model","agnostic","cases","(","model","is","function",")","it","expects","a","similarity_model","and","similarity_tokenizer","to","approximate","log","odd","scores","for","target","sentence","generated","by","the","model","."]
docstr: Gets the output tokens by computing the output sentence ids and output names using the similarity_tokenizer.
  
  Parameters
  ----------
  output: numpy.ndarray
      Output(sentence/sentence ids) for an explanation row.
  
  Returns
  -------
  list
      A list of output tokens.
docstr_tok: ["Gets","the","output","tokens","by","computing","the","output","sentence","ids","and","output","names","using","the","similarity_tokenizer",".","Parameters","--","--","--","--","--","output",":","numpy.ndarray","Output","(","sentence\/sentence","ids",")","for","an","explanation","row",".","Returns","--","--","--","-","list","A","list","of","output","tokens","."]
code: def get_output_names(self, output):
      """Gets the output tokens by computing the output sentence ids and output names using the similarity_tokenizer.
  
      Parameters
      ----------
      output: numpy.ndarray
          Output(sentence/sentence ids) for an explanation row.
  
      Returns
      -------
      list
          A list of output tokens.
      """
      output_ids = self.get_outputs(output)
      output_names = [
          self.similarity_tokenizer.decode([x]).strip()
          for x in output_ids[0, :]
      ]
      return output_names
  
file_path: shap/shap/models/_teacher_forcing.py
imports: import numpy
  import scipy.special
  from ..None import models
  from .._serializable import Deserializer, Serializer
  from ..utils import safe_isinstance
  from ..utils.transformers import getattr_silent, parse_prefix_suffix_for_tokenizer
  from ._model import Model
label_desc: Use image node_id 4 for calling the TeacherForcing obj's underlying member method code with example usage: obj.get_output_names(output) and returns: output_names