class_docstr: Defines end to end MatchLSTM and Answer_Pointer network for Reading Comprehension
class_docstr_tok: ["Defines","end","to","end","MatchLSTM","and","Answer_Pointer","network","for","Reading","Comprehension"]
docstr: Function to get required feed_dict format for user entered questions.
  Used mainly in the demo mode.
  
  Args:
     question_str: question string
     vocab_reverse: vocab dictionary with words as keys and indices as values
  
  Returns:
     question_idx: list of indicies represnting the question padded to max length
     question_len: actual length of the question
     ques_mask: mask for question_idx
docstr_tok: ["Function","to","get","required","feed_dict","format","for","user","entered","questions",".","Used","mainly","in","the","demo","mode",".","Args",":","question_str",":","question","string","vocab_reverse",":","vocab","dictionary","with","words","as","keys","and","indices","as","values","Returns",":","question_idx",":","list","of","indicies","represnting","the","question","padded","to","max","length","question_len",":","actual","length","of","the","question","ques_mask",":","mask","for","question_idx"]
code: def get_dynamic_feed_params(self, question_str, vocab_reverse):
      """
      Function to get required feed_dict format for user entered questions.
      Used mainly in the demo mode.
  
      Args:
         question_str: question string
         vocab_reverse: vocab dictionary with words as keys and indices as values
  
      Returns:
         question_idx: list of indicies represnting the question padded to max length
         question_len: actual length of the question
         ques_mask: mask for question_idx
  
      """
  
      question_words = [
          word.replace("``", '"').replace("''", '"')
          for word in self.tokenizer.tokenize(question_str)
      ]
  
      question_ids = [vocab_reverse[ele] for ele in question_words]
  
      if len(question_ids) < self.max_question:
          pad_length = self.max_question - len(question_ids)
          question_idx = question_ids + [0] * pad_length
          question_len = len(question_ids)
          ques_mask = np.zeros([1, self.max_question])
          ques_mask[0, 0:question_len] = 1
          ques_mask = ques_mask.tolist()[0]
  
      return question_idx, question_len, ques_mask
  
file_path: nlp-architect/examples/reading_comprehension/match_lstm_mrc/matchlstm_ansptr.py
imports: from __future__ import division
  from __future__ import print_function
  import re
  from collections import Counter
  import numpy
  import tensorflow
  from nlp_architect.utils.text import SpacyInstance
label_desc: Use image node_id 8 for calling the MatchLSTMAnswerPointer obj's underlying member method code with example usage: obj.get_dynamic_feed_params(question_str, vocab_reverse) and returns: question_idx,  question_len,  ques_mask