code: def build_vocab(dataset):
      
      counter = nlp.data.count_tokens([w for e in dataset for s in e[:2] for w in s],
                                      to_lower=True)
      vocab = nlp.Vocab(counter)
      return vocab
docs: Build vocab given a dataset.