code: def build_vocab(self):
      if self.lower:
          counter = Counter(
              [w[self.idx].lower() for sent in self.data for w in sent]
          )
      else:
          counter = Counter(
              [w[self.idx] for sent in self.data for w in sent]
          )
      for k in list(counter.keys()):
          if counter[k] < self.cutoff or k in self.ignore:
              del counter[k]
  
      self._id2unit = VOCAB_PREFIX + list(
          sorted(
              list(counter.keys()),
              key=lambda k: counter[k],
              reverse=True,
          )
      )
      self._unit2id = {w: i for i, w in enumerate(self._id2unit)}
  
file_path: stanza/stanza/models/pos/vocab.py
imports: from collections import Counter, OrderedDict
  from stanza.models.common.vocab import BaseVocab, BaseMultiVocab, CharVocab
  from stanza.models.common.vocab import CompositeVocab, VOCAB_PREFIX, EMPTY, EMPTY_ID
label_desc: Use image node_id 4 for calling the WordVocab obj's underlying member method code with example usage: obj.build_vocab() without return types