parameters: (document)
return_statement: return paratextlist
docstring: Return the raw text of a document, as a list of paragraphs.
docstring_summary: Return the raw text of a document, as a list of paragraphs.
docstring_tokens: Return the raw text of a document as a list of paragraphs .
function: def getdocumenttext(document):
      '''Return the raw text of a document, as a list of paragraphs.'''
      paratextlist = []
      # Compile a list of all paragraph (p) elements
      paralist = []
      for element in document.iter():
          # Find p (paragraph) elements
          if element.tag == '{'+nsprefixes['w']+'}p':
              paralist.append(element)
      # Since a single sentence might be spread over multiple text elements, iterate through each
      # paragraph, appending all text (t) children to that paragraphs text.
      for para in paralist:
          paratext = u''
          # Loop through each paragraph
          for element in para.iter():
              # Find t (text) elements
              if element.tag == '{'+nsprefixes['w']+'}t':
                  if element.text:
                      paratext = paratext+element.text
              elif element.tag == '{'+nsprefixes['w']+'}tab':
                  paratext = paratext + '\t'
          # Add our completed paragraph text to the list of paragraph text
          if not len(paratext) == 0:
              paratextlist.append(paratext)
      return paratextlist
function_tokens: def getdocumenttext ( document ) : paratextlist = [ ] # Compile a list of all paragraph (p) elements paralist = [ ] for element in document . iter ( ) : # Find p (paragraph) elements if element . tag == '{' + nsprefixes [ 'w' ] + '}p' : paralist . append ( element ) # Since a single sentence might be spread over multiple text elements, iterate through each # paragraph, appending all text (t) children to that paragraphs text. for para in paralist : paratext = u'' # Loop through each paragraph for element in para . iter ( ) : # Find t (text) elements if element . tag == '{' + nsprefixes [ 'w' ] + '}t' : if element . text : paratext = paratext + element . text elif element . tag == '{' + nsprefixes [ 'w' ] + '}tab' : paratext = paratext + '\t' # Add our completed paragraph text to the list of paragraph text if not len ( paratext ) == 0 : paratextlist . append ( paratext ) return paratextlist