code: def build_input_data(sentences, labels, vocabulary):
      
      x = np.array([[vocabulary[word] for word in sentence] for sentence in sentences])
      y = np.array(labels)
      return [x, y]
docs: Maps sentencs and labels to vectors based on a vocabulary.