Extract a keyword with context (KWIC)
Find all occurrences of a word in a text with a preview of the context before and after each occurrence (KWIC style, "Keyword In Context"), useful for analyzing how a term is used in a corpus or checking its different phrasings.
How it works
The text is split into words separated by spaces. For each word that matches the searched keyword (once the surrounding punctuation is removed), the tool displays the chosen number of words before and after that occurrence, giving a quick overview of all the contexts in which the term appears.
Does the keyword have to be exactly the same word?
Yes, the comparison is made on the whole word (once punctuation is removed at the start and end of the word), not on a substring: searching for "coffee" will not find "coffees" or "decaffeinated". For a partial search, use a regular expression search tool instead.
Why adjust the number of context words?
A short context (2-3 words) lets you quickly spot many occurrences on a single page, while a wider context (8-10 words) gives a better idea of the meaning of the full sentence, at the cost of a longer result to scan.
The analyzed text never leaves your browser: the extraction is calculated locally in JavaScript.