class_docstr: Glove Preprocessor to split tokens that can be passed into glove embeddings 
docstr: Split text into padded lists of tokens that are part of the recognized vocabulary
  
  :param text: a piece of text (e.g. a sentence)
  :type text: str
  :return:
  indexed_text (np.array): the token/vocabulary indices of
          recognized words in text, padded to the maximum sentence length
  mask (np.array): a mask indicating which indices in indexed_text
          correspond to words (1s) and which correspond to pads (0s)
  :rtype: tuple (of np.arrays)
code: def generate_tokens(self, text: str) -> List[Any]:
      """Split text into padded lists of tokens that are part of the recognized vocabulary
  
      :param text: a piece of text (e.g. a sentence)
      :type text: str
      :return:
      indexed_text (np.array): the token/vocabulary indices of
              recognized words in text, padded to the maximum sentence length
      mask (np.array): a mask indicating which indices in indexed_text
              correspond to words (1s) and which correspond to pads (0s)
      :rtype: tuple (of np.arrays)
      """
      indexed_text = [
          self.word_vocab[word]
          if (
              (word in self.counts)
              and (self.counts[word] > self.count_threshold)
          )
          else self.word_vocab[UNK]
          for word in text.split()
      ]
      pad_length = max((self.token_cutoff - len(indexed_text)), 0)
      mask = [1] * min(len(indexed_text), self.token_cutoff) + [
          0
      ] * pad_length
  
      indexed_text = (
          indexed_text[0 : self.token_cutoff]
          + [self.word_vocab[PAD]] * pad_length
      )
  
      return [np.array(indexed_text), np.array(mask)]
  
file_path: interpret-text/python/interpret_text/experimental/common/preprocessor/glove_preprocessor.py
imports: import numpy
  import pandas
  from typing import Any, Iterable, List
  from interpret_text.experimental.common.base_explainer import BaseTextPreprocessor
label_desc: Use image node_id 5 for calling the GlovePreprocessor obj's underlying member method code with example usage: obj.generate_tokens(text) and returns: list