Skip to content
simstat.com Statistics by simulation

Keyword in context (KWIC)

Paste a text and a search term to list every occurrence with the words around it. The text never leaves your browser.

A word or phrase. * matches any letters: analy* finds analysis, analyse, analyst; * data finds any word followed by data. Case is ignored.

Concordance

Paste a text and enter a search term.

Concordance lines: left context, match, right context
# Left context Match Right context

What this tool does

A keyword-in-context (KWIC) concordance lines up every occurrence of a term with its surrounding words, so you can see how it is used rather than only how often. It is the natural next step after a word frequency count, and it uses exactly the same rules for what counts as a word: letters and digits, with internal apostrophes and hyphens, compared without regard to case.

The formula

For a text of words w₁ … wN, a match at position i with left width L and right width R shows

wi−L…wi−1 [wi…wi+m−1] wi+m…wi+m+R−1

where m is the number of words in the search term. Context is counted in words, keeps the original punctuation, and may run across sentence boundaries.

How to read the result

Sorting by left context groups the words that come just before the match, revealing patterns such as not satisfied versus very satisfied; sorting by right context shows what typically follows. Read lines in their order in the text when the sequence of an argument matters. A concordance is a way of looking, not a measurement: use it to check what a frequent word really refers to, to find examples for a codebook, or to spot meanings that a dictionary-based count would miss. The CSV export keeps the word position so lines can be traced back to the source.