class_docstr: Glove Preprocessor to split tokens that can be passed into glove embeddings 
docstr: Build vocabulary
          
code: def build_vocab(self, text):
      """Build vocabulary"""
      words_to_indexes = {PAD: 0, UNK: 1}
      counts = {}
      for sentence in text:
          for word in sentence.split():
              if word not in words_to_indexes:
                  words_to_indexes[word] = len(words_to_indexes)
                  counts[word] = 1
              else:
                  counts[word] += 1
      indexes_to_words = {v: k for k, v in words_to_indexes.items()}
  
      self.word_vocab = words_to_indexes
      self.reverse_word_vocab = indexes_to_words
      self.counts = counts
  
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 2 for calling the GlovePreprocessor obj's underlying member method code with example usage: obj.build_vocab(text) without return types