class_docstr: Stream a collection of IMDB movie reviews from text files on disk,
  either as texts or text + metadata pairs.
  
  Download the data (one time only!), saving and extracting its contents to disk::
  
      >>> import textacy.datasets
      >>> ds = textacy.datasets.IMDB()
      >>> ds.download()
      >>> ds.info
      {'name': 'imdb',
       'site_url': 'http://ai.stanford.edu/~amaas/data/sentiment',
       'description': 'Collection of 50k highly polar movie reviews split evenly into train and test sets, with 25k positive and 25k negative labels. Also includes some unlabeled reviews.'}
  
  Iterate over movie reviews as texts or records with both text and metadata::
  
      >>> for text in ds.texts(limit=5):
      ...     print(text)
      >>> for text, meta in ds.records(limit=5):
      ...     print("\n{} {}\n{}".format(meta["label"], meta["rating"], text))
  
  Filter movie reviews by a variety of metadata fields and text length::
  
      >>> for text, meta in ds.records(label="pos", limit=5):
      ...     print(meta["rating"], ":", text)
      >>> for text, meta in ds.records(rating_range=(9, 11), limit=5):
      ...     print(meta["rating"], text)
      >>> for text in ds.texts(min_len=1000, limit=5):
      ...     print(len(text))
  
  Stream movie reviews into a :class:`textacy.Corpus <textacy.corpus.Corpus>`::
  
      >>> textacy.Corpus("en", data=ds.records(limit=100))
      Corpus(100 docs; 24340 tokens)
  
  Args:
      data_dir: Path to directory on disk under which the data is stored,
          i.e. ``/path/to/data_dir/imdb``.
  
  Attributes:
      full_rating_range: Lowest and highest ratings for which movie reviews are available.
code: def _filtered_iter(self, filters):
      if filters:
          for record in self:
              if all(filter_(record) for filter_ in filters):
                  yield record
      else:
          for record in self:
              yield record
  
imports: from __future__ import annotations
  import io
  import itertools
  import logging
  import os
  import re
  from typing import Any, ClassVar, Iterable, Optional
  from ..None import constants
  from ..None import io
  from ..None import types, utils
  from .base import Dataset
label_desc: Use image node_id 8 for calling the IMDB obj's underlying member method code with example usage: obj._filtered_iter(filters) without return types