class_docstr: Utility class for 1B word benchmark dataset.
  
  The current implementation reads the data from the tokenized text
  files.
class_docstr_tok: ["Utility","class","for","1B","word","benchmark","dataset",".","The","current","implementation","reads","the","data","from","the","tokenized","text","files","."]
docstr: Initialize LM1BDataset reader.
  
  Args:
    filepattern: Dataset file pattern.
    vocab: Vocabulary.
docstr_tok: ["Initialize","LM1BDataset","reader",".","Args",":","filepattern",":","Dataset","file","pattern",".","vocab",":","Vocabulary","."]
code: def __init__(self, filepattern, vocab):
      """Initialize LM1BDataset reader.
  
      Args:
        filepattern: Dataset file pattern.
        vocab: Vocabulary.
      """
      self._vocab = vocab
      self._all_shards = tf.io.gfile.glob(filepattern)
      tf.compat.v1.logging.info(
          "Found %d shards at %s", len(self._all_shards), filepattern
      )
  
imports: import random
  import numpy
  from textattack.shared.utils import LazyLoader
label_desc: Use image node_id 1 to create a new LM1BDataset object from inherited base classes: object with example: obj = LM1BDataset(filepattern, vocab)