class_docstr: Librispeech language modeling dataset.
docstr: Yields examples.
code: def _generate_examples(self, archive_path):
      """Yields examples."""
      key = 0
      for p in archive_path:
          with open(p, "r", encoding="utf-8") as f:
              for line in f:
                  line = re.sub(
                      r"\d+-\d+-\d+\s", "", line
                  )  # remove ids in transcripts
                  text = line.strip()
  
                  # Skip empty lines.
                  # very long sentences (>1000 char) are removed to prevent OOM
                  if text and len(text) < 1000:
                      yield key, {"text": text}
                  key += 1
  
file_path: speechbrain/recipes/LibriSpeech/LM/dataset.py
imports: from __future__ import absolute_import, division, print_function
  import datasets
  import re
label_desc: Use image node_id 3 for calling the LibrispeechLm obj's underlying member method code with example usage: obj._generate_examples(archive_path) without return types