Text & writing
Text concordance / KWIC
Inspect every literal keyword occurrence with surrounding context.
A clear answer. Here’s how.
Finds non-overlapping literal matches, with optional Unicode-aware case-insensitive matching. Exports keyword-in-context rows with before/match/after text and one-based UTF-16 positions. Context lengths use UTF-16 code units, so a boundary can split a surrogate pair. Limited to 100,000 input characters and 2,000 matches; no stemming, patterns or word-boundary inference.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Your text
- The small blue boat crossed the blue lake. A small boat waited by the shore.
- Literal keyword
- blue
- Context characters each side
- 30
- Case matching
- Ignore letter case
Example result
| UTF-16 position (1-based) | Before | Match | After |
|---|---|---|---|
| 11 | The small | blue | boat crossed the blue lake. A |
| 33 | e small blue boat crossed the | blue | lake. A small boat waited by |
Literal non-overlapping matches. Context length/position use UTF-16 code units, not grapheme clusters.