docstr: Converting a dataset to vocab should have a specific set of words along with PAD and UNK
docstr_tok: ["Converting","a","dataset","to","vocab","should","have","a","specific","set","of","words","along","with","PAD","and","UNK"]
code: def test_dataset_vocab(self, train_file):
      """
      Converting a dataset to vocab should have a specific set of words along with PAD and UNK
      """
      train_set = data.read_dataset(str(train_file), WVType.OTHER, 1)
      vocab = data.dataset_vocab(train_set)
      expected = set(
          [PAD, UNK] + [x.lower() for y in SENTENCES for x in y]
      )
      assert set(vocab) == expected
  
file_path: stanza/stanza/tests/classifiers/test_data.py
imports: import json
  import pytest
  import stanza.models.classifiers.data
  from stanza.models.classifiers.utils import WVType
  from stanza.models.common.vocab import PAD, UNK
  from stanza.models.constituency.parse_tree import Tree
label_desc: Use image node_id 3 for calling the TestClassifierData obj's underlying member method code with example usage: obj.test_dataset_vocab(train_file) without return types