docs: def from_stanford_dependencies(this_class, stream, tree,
                                     include_erased=False, include_punct=True):
          """Construct a Sentence. stream is an iterable over strings
          where each string is a line representing a Stanford Dependency
          as in the output of the command line Stanford Dependency tool:
  
              deprel(gov-index, dep-depindex)
  
          The corresponding Penn Treebank formatted tree must be provided
          as well."""
          stream = iter(stream)
          sentence = this_class()
          covered_indices = set()
          tags_and_words = ptb_tags_and_words_re.findall(tree)
          # perform some basic cleanups
          tags_and_words = [(tag, word.replace(r'\/', '/'))
                            for (tag, word) in tags_and_words if tag != '-NONE-']
          for line in stream:
              if not line.strip():
                  if sentence:
                      # empty line means the sentence is over
                      break
                  else:
                      continue
              line = line.replace(r'\/', '/')
              matches = deps_re.findall(line)
              assert len(matches) == 1
              (deprel, gov_form, head, gov_is_copy, form, index,
               dep_is_copy) = matches[0]
              index = int(index)
              tag, word = tags_and_words[index - 1]
              assert form == word
              covered_indices.add(index)
  
              if not include_punct and deprel == 'punct':
                  continue
              if gov_is_copy or dep_is_copy:
                  extra = {}
                  if gov_is_copy:
                      extra['gov_is_copy'] = len(gov_is_copy)
                  if dep_is_copy:
                      extra['dep_is_copy'] = len(dep_is_copy)
              else:
                  extra = None
              token = Token(index, form, None, tag, tag, None, int(head),
                            deprel, None, None, extra)
              sentence.append(token)
  
          if include_erased:
              # look through words in the tree to see if any of them
              # were erased
              for index, (tag, word) in enumerate(tags_and_words, 1):
                  if index in covered_indices:
                      continue
                  token = Token(index, word, None, tag, tag, None, 0,
                                'erased', None, None, None)
                  sentence.append(token)
  
          sentence.sort()
          return sentence