Concordance (keyword in context)
nabu_concordGenerate keyword-in-context concordance rows for a word or exact lemma across the Nabu corpus, showing left/right context for usage scanning while preserving license fields.
Instructions
Concordance (KWIC — keyword-in-context) over the local nabu corpus: one row per hit as left context / matched keyword / right context, the keyword located in the PRISTINE edition text (accents intact). Give EXACTLY ONE of query (full-text, same syntax as nabu_search: words AND, "phrase", prefix*, diacritics optional) or lemma (exact dictionary form over the treebanks). Rows come in CORPUS order (urn/citation), not relevance — this is for scanning a word's usage, not ranking. Context is trimmed to width characters per side (default 40, max 120; … marks clipped context). Bounded (default 10, max 50) with an honest 'showing k' note; each row carries urn, language, license_class, and source — PRESERVE the license fields when quoting. Use nabu_show for a hit's full passage, nabu_search when you want ranked relevance rather than a scan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | ISO-639-3 passage language filter: grc, lat, chu, got, orv, eng, … | |
| lemma | No | Dictionary form for exact-lemma treebank concordance. Mutually exclusive with query. | |
| limit | No | Maximum KWIC rows returned. | |
| query | No | Full-text query. Mutually exclusive with lemma. | |
| width | No | Context characters per side (left and right). | |
| license | No | Exact effective license class filter. | |
| include_restricted | No | Also serve research_private/restricted material. Default false and deliberately so: this surface must never leak private or license-restricted texts casually. Set true only when the requester understands and will honor the restriction. |