class_docstr: Base class for bAbi question answering problems.
class_docstr_tok: ["Base","class","for","bAbi","question","answering","problems","."]
docstr: Return a dict for encoding and decoding inference input/output.
  
  Args:
    data_dir: data directory
  
  Returns:
    A dict of <feature name, TextEncoder>.
docstr_tok: ["Return","a","dict","for","encoding","and","decoding","inference","input\/output",".","Args",":","data_dir",":","data","directory","Returns",":","A","dict","of","<","feature","name",",","TextEncoder",">","."]
code: def feature_encoders(self, data_dir):
      """Return a dict for encoding and decoding inference input/output.
  
      Args:
        data_dir: data directory
  
      Returns:
        A dict of <feature name, TextEncoder>.
  
      """
      encoders = super(BabiQa, self).feature_encoders(data_dir)
      label_encoder = self.get_labels_encoder(data_dir)
      encoders[
          "targets"
      ] = label_encoder  # bAbi as a classification task
      return encoders
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import shutil
  import tarfile
  import requests
  import six
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators import tokenizer
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 13 for calling the BabiQa obj's underlying member method code with example usage: obj.feature_encoders(data_dir) and returns: encoders