docs: def read(path, corpus=True, index_by='doi', load_ngrams=True, parse_only=None,
           corpus_class=Corpus, **kwargs):
      """
      Yields :class:`.Paper` s from JSTOR DfR package.
  
      Each :class:`.Paper` is tagged with an accession id for this
      read/conversion.
  
      Parameters
      ----------
      filepath : string
          Filepath to unzipped JSTOR DfR folder containing a citations.xml file.
  
      Returns
      -------
      papers : list
          A list of :class:`.Paper` objects.
  
      Examples
      --------
  
      .. code-block:: python
  
         >>> from tethne.readers import dfr
         >>> papers = dfr.read("/Path/to/DfR")
      """
  
      citationfname = _get_citation_filename(path)
      features = {}
      featureset_types = {}
  
      # We need the primary index field in the parse results.
      if parse_only:
          parse_only.append(index_by)
  
      papers = []
      if citationfname:   # Valid DfR dataset.
          parser = DfRParser(os.path.join(path, citationfname))
          papers += parser.parse(parse_only=parse_only)
  
      else:   # Possibly a directory containing several DfR datasets?
          papers = []
  
          # Search for DfR datasets in subdirectories.
          for dirpath, dirnames, filenames in os.walk(path):
              citationfname = _get_citation_filename(dirpath)
              if citationfname:
                  subcorpus = read(dirpath, index_by=index_by,
                                   parse_only=parse_only)
                  papers += subcorpus.papers
                  for featureset_name, featureset in subcorpus.features.iteritems():
                      if featureset_name not in features:
                          features[featureset_name] = {}
                      features[featureset_name].update(featureset.items())
                      featureset_types[featureset_name] = type(featureset)
          load_ngrams = False
  
      if len(papers) == 0:
          raise ValueError('No DfR datasets found at %s' % path)
  
      if corpus:
          corpus = corpus_class(papers, index_by=index_by, **kwargs)
  
          if load_ngrams:     # Find and read N-gram data.
              for sname in os.listdir(path):
                  fpath = os.path.join(path, sname)   # Full path.
                  if os.path.isdir(fpath) and not sname.startswith('.'):
                      datafiles = [f for f in os.listdir(fpath)
                                   if f.lower().endswith('xml')]
                      if len(datafiles) > 0:
                          features[sname] = ngrams(path, sname)
  
          for featureset_name, featureset_values in features.iteritems():
              if type(featureset_values) is dict:
                  fclass = featureset_types[featureset_name]
                  featureset_values = fclass(featureset_values)
              corpus.features[featureset_name] = featureset_values
  
          return corpus
      return papers