startthat.work home

PE-06 Keyword in context (KWIC; concordance)

List every occurrence of a keyword or phrase with a fixed number of surrounding words, giving a table of document, position and context.

Prepare and extractEvidence: DocumentedPreparation technique, runs in step 5.2Strongest statement: describe

What it does

Lists every occurrence of a keyword or phrase with a fixed number of surrounding words. Artefact: a table of document, position, preceding words, keyword and following words. Read how the term is used and whether use differs by source or period.

When to use it

Use when a frequent or surprising term needs checking for how it is used before it is counted or coded.

When it does not fit

Use it to check what a frequent or surprising term means before counting it. It is a reading aid, not a measurement. Reading only the first matches is the common misuse.

Result format

The result is a table with one row per occurrence of the keyword, giving the document, the position, the preceding words, the keyword and the following words. It ends with a statement of how the term is used and whether use differs by source or period.

Requirements on the material

PropertyRequirement typeRequirement
StructureApplies in some casesrequires=unstructured; requires=semi-structured
Content typeAlways appliesrequires=text
Unit of analysisAlways appliesrequires=document
Appraises source credibilityApplies in some casesno

Not restricted on: Variable types, Time structure, How the sample was chosen, Level of detail available, Number of sources, Whether sources can be joined, Amount of material, Known data problems, Producer interest, Source dependence, Origin, Document genre, Language, Personal information, Security classification, Licence.

Minimum materialnone
Additional sources needednone
Not for (rules)none
Not for (text)The context table is used as a measurement of frequency or sentiment, or only the first matches are read.

Choosing and ordering

Kind of techniquePreparation technique, runs in step 5.2
Phase tagverify and prepare
Other phase tagsanalyse
Kind of findingpattern
Question answeredwhat
Strongest statement it supportsdescribe
Needs as input
Makes as output
Must exist firstNone
Loop targetproceed with limit stated

Library checks by stakes

Each stakes level includes the checks of the level below it. Checks that need a person apply at high stakes only, so the process leaves them out at lower stakes (decision 38). Repeatability: deterministic.

StakesCheckPerson involvedCounts as a different method
exploratoryinput validationnoneno
decision-informinginput validationnoneno
decision-informingspot checkoptionalno
decision-informinghuman review sampleneeded; left out below high stakesno
high-stakesinput validationnoneno
high-stakesspot checkoptionalno
high-stakeshuman review sampleneededno
high-stakesindependent reviewneededno
high-stakessource-span citationnoneno

Failure modes and limits

Model suitabilitymodel plus code
Typical model failureReads only the first few matches and reports a pattern of use for the whole corpus.
Error sourcesinput data; data transformation
Certainty limitsCertainty about usage drops when only part of the matches are read (reporting bias) or when the window is too short to show meaning (indirectness).

Evidence and tag basis

Documented. In the quanteda software the default window is 5 words, and the pattern can be a phrase, wildcard or regular expression. (quanteda kwic reference)

Tag basis: input profile inference; selection inference; sequencing inference; robustness inference. All tag values are inference unless a source is named.