class_docstr: Intent extraction dataset base class
  
  Args:
      sentence_length (int): max sentence length
class_docstr_tok: ["Intent","extraction","dataset","base","class","Args",":","sentence_length","(","int",")",":","max","sentence","length"]
code: def _load_data(self, train_set, test_set):
      # vectorize
      # add offset of 2 for PAD and OOV
      train_size = len(train_set)
      test_size = len(test_set)
      texts, tags, intents = list(zip(*train_set + test_set))
      text_vectors, self._tokens_vocab = word_vector_generator(
          texts, lower=True, start=1
      )
      tag_vectors, self._tags_vocab = word_vector_generator(
          tags, lower=False, start=1
      )
      chars_vectors, self._chars_vocab = character_vector_generator(
          texts, start=1
      )
      i, self._intents_vocab = word_vector_generator([intents])
      i = np.asarray(i[0])
  
      text_vectors = pad_sentences(
          text_vectors, max_length=self.sentence_len
      )
      tag_vectors = pad_sentences(
          tag_vectors, max_length=self.sentence_len
      )
      chars_vectors = [
          pad_sentences(d, max_length=self.word_len)
          for d in chars_vectors
      ]
      zeros = np.zeros(
          (len(chars_vectors), self.sentence_len, self.word_len)
      )
      for idx, d in enumerate(chars_vectors):
          d = d[: self.sentence_len]
          zeros[idx, : d.shape[0]] = d
      chars_vectors = zeros.astype(dtype=np.int32)
  
      self.vecs["train"] = [
          text_vectors[:train_size],
          chars_vectors[:train_size],
          i[:train_size],
          tag_vectors[:train_size],
      ]
      self.vecs["test"] = [
          text_vectors[-test_size:],
          chars_vectors[-test_size:],
          i[-test_size:],
          tag_vectors[-test_size:],
      ]
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import json
  import os
  import sys
  import numpy
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.text import SpacyInstance, Vocabulary, character_vector_generator, word_vector_generator
label_desc: Use image node_id 2 for calling the IntentDataset obj's underlying member method code with example usage: obj._load_data(train_set, test_set) without return types