class_docstr: Represents a vocabulary that can be built from a dataset.
docstr: Loads a vocabulary (one token per line) from disk.
docstr_tok: ["Loads","a","vocabulary","(","one","token","per","line",")","from","disk","."]
code: def load(self, path: str) -> None:
      """Loads a vocabulary (one token per line) from disk."""
      vocab = collections.OrderedDict()
      with open(path, "rb") as f:
          for i, token in enumerate(f):
              assert isinstance(token, bytes), "Expected byte tokens."
              vocab[token.rstrip()] = i
      logging.info("Loaded vocabulary, size: %d", len(vocab))
      self.vocab = vocab
  
file_path: flax/examples/sst2/vocabulary.py
imports: import collections
  from typing import Iterable, Optional, Sequence
  from absl import logging
label_desc: Use image node_id 11 for calling the Vocabulary obj's underlying member method code with example usage: obj.load(path) without return types