document vs text file

document

noun
  • A file that contains text. 

  • An object conveying information by whatever means, capable of being indexed alongside other similar objects. 

  • An original or official paper used as the basis, proof, or support of anything else, including any writing, book, or other instrument conveying information pertinent to such proof or support. 

  • Any material substance on which the information is represented by writing. 

verb
  • To furnish with documents or papers necessary to establish facts or give information. 

  • To record in documents. 

text file

noun
  • A data file containing only plain, human-readable text, distinct from documents with embedded formatting 

  • A data file in a character encoding that allows it to be read in non-specialised text editor. 

How often have the words document and text file occurred in a corpus of books? (source: Google Ngram Viewer )