Score every paragraph on entropy, lexical density and information density, and see which ones rate high enough to keep for analysis.
Paragraph entropy and information density
What is measured
Each paragraph gets a composite score made of seven parts: the entropy of its words, its lexical density, its information density, how much of it is rare wording, its semantic information, its novelty and its conciseness. Perplexity and KL divergence are shown beside the score without being part of it. The weight of each part is printed in the report.
Keeping and dropping
Each kind of text, from news and interviews to papers and policy documents, has a threshold of its own that a paragraph must reach to be kept. You can move the threshold in the report and see at once which paragraphs change sides. The best paragraphs on either side of it are shown next to each other, because those are the ones worth deciding by eye.
Where it helps
Interviews and scraped pages carry a good deal of greeting, filler and boilerplate. Dropping the paragraphs that say least makes coding, topic modeling and summaries cleaner, and the kept paragraphs can be downloaded as text or as a table with every measure.
Clean and check
Get a text ready before you measure anything in it.
Text cleaning and normalization: Strip emoji, stray symbols, repeated punctuation and your own stop words from a text, put its quotation marks, spelling and numbers in one consistent style, and cut long documents into pieces of even length.
Text quality check: Measure a text's size, sentence length, vocabulary range and repetition, score it from 0 to 100, and see which analyses it is fit for.
Stop word finder: Find the words that turn up everywhere in your material and say little, as a stop word list made for your own field.
Near-duplicate finder: Compare every line by meaning, pair up the ones that say nearly the same thing, and gather them into sets of duplicates.
Duplicate merging: Group the lines that say nearly the same thing, keep one of each group, and mark the rest as merged into it.
Restore punctuation: Turn a transcript or any text without punctuation into sentences with periods, commas and capital letters, grouped into paragraphs, with every word left in its place.
Fix punctuation: Correct the commas, sentence breaks, capital letters, apostrophes, hyphens and spacing of a text that already has punctuation, with every word left as written, and see each sentence that changed.
Redaction: Find email addresses, phone numbers, Social Security and card numbers, dates, addresses and names in a text, and replace each with a placeholder, a mask, or nothing.
Spelling check: Find the misspelled words in a text, each with a correction that fits the context and a note on what went wrong, and get the corrected text back. British and American spellings are both accepted.