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.
docstr: Iterate over movie reviews in this dataset, optionally filtering by
  a variety of metadata and/or text length, and yield texts only.
  
  Args:
      subset ({"train", "test"}): Filter movie reviews
          by the dataset subset into which they've already been split.
      label ({"pos", "neg", "unsup"}): Filter movie reviews
          by the assigned sentiment label (or lack thereof, for "unsup").
      rating_range: Filter movie reviews by the rating assigned by the reviewer.
          Only those with ratings in the interval [low, high) are included.
          Both low and high values must be specified, but a null value
          for either is automatically replaced by the minimum or maximum
          valid values, respectively.
      min_len: Filter reviews by the length (# characters) of their text content.
      limit: Yield no more than ``limit`` reviews that match all specified filters.
  
  Yields:
      Text of the next movie review in dataset passing all filters.
  
  Raises:
      ValueError: If any filtering options are invalid.
docstr_tok: ["Iterate","over","movie","reviews","in","this","dataset",",","optionally","filtering","by","a","variety","of","metadata","and\/or","text","length",",","and","yield","texts","only",".","Args",":","subset","(","{","``","train","''",",","``","test","''","}",")",":","Filter","movie","reviews","by","the","dataset","subset","into","which","they","'ve","already","been","split",".","label","(","{","``","pos","''",",","``","neg","''",",","``","unsup","''","}",")",":","Filter","movie","reviews","by","the","assigned","sentiment","label","(","or","lack","thereof",",","for","``","unsup","''",")",".","rating_range",":","Filter","movie","reviews","by","the","rating","assigned","by","the","reviewer",".","Only","those","with","ratings","in","the","interval","[","low",",","high",")","are","included",".","Both","low","and","high","values","must","be","specified",",","but","a","null","value","for","either","is","automatically","replaced","by","the","minimum","or","maximum","valid","values",",","respectively",".","min_len",":","Filter","reviews","by","the","length","(","#","characters",")","of","their","text","content",".","limit",":","Yield","no","more","than","``","limit","``","reviews","that","match","all","specified","filters",".","Yields",":","Text","of","the","next","movie","review","in","dataset","passing","all","filters",".","Raises",":","ValueError",":","If","any","filtering","options","are","invalid","."]
code: def texts(
      self,
      *,
      subset: Optional[str] = None,
      label: Optional[str] = None,
      rating_range: Optional[
          tuple[Optional[int], Optional[int]]
      ] = None,
      min_len: Optional[int] = None,
      limit: Optional[int] = None,
  ) -> Iterable[str]:
      """
      Iterate over movie reviews in this dataset, optionally filtering by
      a variety of metadata and/or text length, and yield texts only.
  
      Args:
          subset ({"train", "test"}): Filter movie reviews
              by the dataset subset into which they've already been split.
          label ({"pos", "neg", "unsup"}): Filter movie reviews
              by the assigned sentiment label (or lack thereof, for "unsup").
          rating_range: Filter movie reviews by the rating assigned by the reviewer.
              Only those with ratings in the interval [low, high) are included.
              Both low and high values must be specified, but a null value
              for either is automatically replaced by the minimum or maximum
              valid values, respectively.
          min_len: Filter reviews by the length (# characters) of their text content.
          limit: Yield no more than ``limit`` reviews that match all specified filters.
  
      Yields:
          Text of the next movie review in dataset passing all filters.
  
      Raises:
          ValueError: If any filtering options are invalid.
      """
      self._subset = (
          utils.to_tuple(subset) if subset is not None else None
      )
      self._label = utils.to_tuple(label) if label is not None else None
      try:
          filters = self._get_filters(rating_range, min_len)
          for record in itertools.islice(
              self._filtered_iter(filters), limit
          ):
              yield record["text"]
      finally:
          self._subset = None
          self._label = None
  
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 9 for calling the IMDB obj's underlying member method code with example usage: obj.texts() without return types