class_docstr: Read documents recursively from a directory.
  Each file/line (depends on `lines_are_documents`) is interpreted as a plain text document.
class_docstr_tok: ["Read","documents","recursively","from","a","directory",".","Each","file\/line","(","depends","on","`","lines_are_documents","`",")","is","interpreted","as","a","plain","text","document","."]
docstr: Generate documents from the underlying plain text collection (of one or more files).
  
  Yields
  ------
  str
      One document (if lines_are_documents - True), otherwise - each file is one document.
docstr_tok: ["Generate","documents","from","the","underlying","plain","text","collection","(","of","one","or","more","files",")",".","Yields","--","--","--","str","One","document","(","if","lines_are_documents","-","True",")",",","otherwise","-","each","file","is","one","document","."]
code: def getstream(self):
      """Generate documents from the underlying plain text collection (of one or more files).
  
      Yields
      ------
      str
          One document (if lines_are_documents - True), otherwise - each file is one document.
  
      """
      num_texts = 0
      for path in self.iter_filepaths():
          with open(path, "rt", encoding=self.encoding) as f:
              if self.lines_are_documents:
                  for line in f:
                      yield line.strip()
                      num_texts += 1
              else:
                  yield f.read().strip()
                  num_texts += 1
  
      self.length = num_texts
  
imports: from __future__ import with_statement
  import logging
  import os
  import random
  import re
  import sys
  from gensim import interfaces, utils
  from gensim.corpora.dictionary import Dictionary
  from gensim.parsing.preprocessing import remove_stopword_tokens, remove_short_tokens, lower_to_unicode, strip_multiple_whitespaces
  from gensim.utils import deaccent, simple_tokenize
  from smart_open import open
label_desc: Use image node_id 13 for calling the TextDirectoryCorpus obj's underlying member method code with example usage: obj.getstream() without return types