AidText

Document-term matrix

Count each word in each of your files, side by side, to compare what several texts talk about.

Document-term matrix: word counts across files

What the matrix holds

One row for each word, one column for each of your files, and in each cell how often the word is used in that file. It covers the most frequent words across all files, as many as you ask for. Forms of one word can be counted together, so city and cities share a row.

What else is worked out

Cosine similarity compares the files by their mix of words: 1 means the same mix and 0 means no word in common. For every file, TF-IDF picks out the words that set it apart from the others. A table gives each word's total, the share of files that use it and its average per file.

What it is good for

A document-term matrix is the starting point of most quantitative text analysis. Comparing speeches by speaker, reports by year or interviews by site begins here, and the downloaded table goes straight into R, Python, SPSS or a spreadsheet for whatever comes next.

Words and vocabulary

What words a text is built from, and how wide its vocabulary runs.

All tools · Privacy