code: def words(ctx, input, output):
      
      log.info('chemdataextractor.read.elements')
      log.info('Reading %s' % input.name)
      doc = Document.from_file(input)
      for element in doc.elements:
          if isinstance(element, Text):
              for sentence in element.sentences:
                  output.write(u' '.join(sentence.raw_tokens))
                  output.write(u'\n')
docs: Read input document, and output words.