Search the corpus
nabu_searchSearch ancient-text corpora by full-text query or exact lemma, filtering by language, date, morphology, proximity, translations, or meter.
Instructions
Search nabu, a local corpus of ancient texts (polytonic Greek, Latin, Old Church Slavonic, Gothic, and more: literary editions, documentary papyri, gold treebanks, parallel English translations). Give EXACTLY ONE of: query — full-text FTS5 (words AND by default, "quoted phrase", prefix*; diacritics optional, μηνιν finds μῆνιν) — or lemma — exact dictionary form over the lemma index, every tier it holds: gold treebank annotation unlabeled, silver/equivalence hits labeled by a tier field (λέγω finds εἶπας, εἰπεῖν, every inflection; add morph — e.g. "case=dat,number=pl" — to keep only attestations with that morphology, each hit showing the decoded evidence). Add near for PROXIMITY — keep only hits where that term sits within window words (default 10, 0=adjacent) of query (or lemma, expanded to its surface forms) in the SAME passage, order-independent; both matched terms are bracketed in the snippet (near does not compose with morph). Hits are relevance-ranked and bounded (default 10, max 50) with an honest 'showing k' note; each carries urn, language, license_class, and source — PRESERVE the license fields when quoting. meter/meter_pattern (text search only) restrict hits to metrically SCANNED passages — the pedecerto (Latin) / hypotactic (Greek) meter enrichment layer; the note names that layer or explains an empty one. words (text search only) is the Tibetan word-grain filter: keep only hits whose match aligns with word boundaries per the nabu-data segmentation dataset (degrades honestly for non-Tibetan queries or an unsynced module). Three further LANES replace the ranked text search (each composes with the args its schema line names, nothing else): fuzzy: true — substring/fragment search over the documentary trigram index (]μηνιν αει[, the CLI's --fuzzy); translations: true — the query matched against the translations held in passage annotations, hits being the ORIGINAL passages with the matched layer (the CLI's --translations); sense — the word-sense desk (a DCS WordSem id or sense name → the passages whose tokens cite it, each with its citing tokens; the CLI's nabu sense). betacode: true reads query/lemma/near as TLG Beta Code (mh=nin → μῆνιν). Use nabu_show with a hit's urn for the full passage, nabu_status for what the corpus covers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Latest date: signed historical year; composes with from. | |
| from | No | Earliest date: signed HISTORICAL year, negative = BCE, no year 0 (-300 = 300 BCE, 14 = 14 CE). Filters the document timeline — the dated documents of most sources, every date class (see date_basis to pick one); a document the timeline does not date is absent under a date filter. Text search only (not lemma). | |
| kind | No | Document-kind filter (P99, text search only): the ruled cross-corpus classification classes (config/kind_classes.yml — funerary, letter, literary, divination, …). FAMILY matching at any depth: a path prefix matches its whole family (funerary ⊇ funerary/epitaph; literary/narrative ⊇ literary/narrative/epic), a full path narrows, an explicit % pattern matches as given. The honesty buckets are first-class values: `unknown` (upstream's own "cannot determine") and `unmapped` (a raw value awaiting a fold rule). Only classified documents can match — most of the corpus carries no kind facet and falls out under the filter (`nabu kind census` lists the classes). | |
| lang | No | ISO-639-3 passage language filter: grc, lat, chu, got, orv, eng, … | |
| lect | No | Lect filter (P57-4, nabu-lects module, text search only): keep only hits whose (language, source) resolves to this lect id or a more specific one under it — prefix semantics over the nabu-lects anchor[:stage][/variety][@ortho] grammar (lect: "lat" matches lat:med; lect: "lat:med" matches lat:med and lat:med/xyz, not lat:cla). Errors if the nabu-lects module is not synced on this box. | |
| near | No | Proximity: keep only hits where this term occurs within `window` words of query (or lemma) in the SAME passage. FTS5 NEAR over the folded search forms, order-independent; expands a lemma anchor to its attested surface forms first. Does NOT compose with morph. | |
| fuzzy | No | Fragment lane (the CLI's search --fuzzy): `query` is a literal substring/fragment matched over the documentary trigram index (editorial [ ] stripped, diacritics folded, at least 3 characters after folding) — not FTS syntax. Hits carry a folded `snippet` with the match bracketed; `coverage` lists the sources the index covers. Composes with lang/license/from/to/century/date_basis/place/kind/facets/limit only. | |
| gloss | No | Token-gloss filter WITH lemma: keep attestations whose upstream token gloss contains this word (whole word, case-insensitive) — bhsa/achemenet (English), aes/tlhdig (German). E.g. lemma "דבר" + gloss "word" splits BHSA's consonantal homograph from "speak". Composes with morph; not with near. Lemma hits from those sources always carry token_gloss. WITHOUT lemma (and no query): the gloss lane — every WORD some source glosses this ("king" → BHSA מלך, achemenet šarru, …) across lemmas; words AND, "phrase", prefix*, diacritic-insensitive. Each hit is a word {lemma, form, gloss, source, language, tokens, passages} with urn = its first attestation; `coverage` lists the indexed sources. Composes with lang/license/limit only. | |
| lemma | No | Dictionary form for exact-lemma search over the lemma index (every tier; non-gold hits carry `tier`). Mutually exclusive with query. | |
| limit | No | Maximum hits returned. | |
| meter | No | Meter facet (P45-5): only passages carrying a meter enrichment (the pedecerto/hypotactic scansion layer) whose meter code/name matches case-insensitively (pedecerto codes H, P, …; hypotactic names like 'dactylic hexameter'). Text search only (not lemma/near); most of the corpus is unscanned and absent under it. The note names the source layer, or explains an empty/unknown one. | |
| morph | No | Morphology facets, only WITH lemma: comma-joined key=value in Universal Dependencies vocabulary (case, number, gender, person, tense, mood, voice, degree; values dat, pl/sg, masc, aor, opt, sub…), all required. E.g. "case=dat,number=pl". UD treebanks match on feats; PROIEL/TOROT positional tags, GLAUx's AGDT postags, Diorisis analyses, BHSA/DSS (ETCBC/Abegg) features, OSHB morph codes, CorA msd (ReM/ReN) and morph (REF), IMP msd (goo300k), Menota msa and Coptic Scriptorium pos tags (polarity, prontype, definite, verbform) are decoded to the same names (Hebrew/Aramaic add state, stem, conjugation: e.g. "stem=piel,conjugation=wayq"); ORACC has no inflectional morphology so these facets never match it. | |
| place | No | Provenance filter (P75 C-1): a namespaced place ref (tm:2810, cigs:GIR) matches identity claims on the document's place_ref axis; a place NAME resolves through the derived place index and registry decisions (name recall kept); a LIKE pattern (oxyrhynch%) stays the name lane. The note names the lane that answered. Localized documents only. | |
| query | No | Full-text query. Mutually exclusive with lemma. | |
| sense | No | Sense desk (the CLI's `nabu sense TERM`): a sense id (59344, or comma-joined ids) or a sense NAME matched case-insensitively against the sense shelf (finger; LIKE wildcards: circum%). Returns the matched senses (id, headword, gloss, passage count) and the passages citing them, each with its citing tokens (form, lemma, ids). Replaces query/lemma; composes with sense_gloss/limit only. | |
| words | No | Tibetan word-grain filter (P54-4, text search only): Tibetan is indexed at syllable grain, so a multi-syllable query also matches an accidental syllable run crossing a word boundary — words: true keeps only hits whose matched span aligns with word boundaries per the nabu-data xct/segmentation dataset (present-only word_grain key when applied). Non-Tibetan queries or an unsynced module degrade to plain search with a word_grain_note, never an error. | |
| facets | No | Facet filters (text search only), an object of facet name → pattern, all required (AND): any facet the catalog carries, at document grain (genre, province, material, collection, author…) or passage grain (sillok subject, itkc genre) — {"subject": "왕실-%"}. The pattern matches the value or its ref case-insensitively; LIKE % patterns pass through. At most 8 pairs; composes with kind (both must hold). Unfaceted documents fall out under it. | |
| script | No | Script filter (P75 C-2), ISO 15924-style registry tag (latn, xsux, egyd): keeps documents whose held text carries the ~script lect axis OR whose artifact-script axis claims the tag ("Latin-script Gaulish"). Text search only. | |
| window | No | With near: max words between the two terms (default 10; 0 = adjacent). | |
| century | No | Shorthand for one century's from/to (6 = 6th c. CE, -2 = 2nd c. BCE); mutually exclusive with from/to. | |
| license | No | Exact effective license class filter. | |
| betacode | No | Beta Code input (the CLI's search --betacode): query, lemma and near are TLG Beta Code, transliterated to Greek before matching (mh=nin → μῆνιν; case-blind, *capitals, FTS quotes and prefix* pass through). The decoded terms come back in a present-only `betacode` object. A deliberate flag — never auto-detected; not with sense/similar_to. | |
| date_basis | No | Date-basis filter (CLI --date-basis parity, text search only): keep only documents whose PRIMARY dated row is of one of these classes, comma-joined — artifact (the source's own artifact/typed date), composition (attributed author-era dating), edition (a print/edition year), silver (a model ESTIMATE, never an upstream claim). Composes with from/to/century: `date_basis: "artifact"` holds out author-era datings. An unknown class is refused naming the known set. | |
| similar_to | No | A passage URN: return its SEMANTIC neighbors instead of a text search (same-language cross-edition retrieval over the local vector store — other witnesses of a verse, passages saying the same thing). Banded close/near/loose, never raw scores; same-language ONLY (cross-language measured unreliable and not served); model named in the payload — statistical similarity, never a curated alignment (nabu_align/nabu_parallels serve those). Replaces query/lemma; composes with limit only. | |
| sense_gloss | No | With sense: also match the term inside the sense's gloss ("linear measure"). | |
| translations | No | Translations lane (the CLI's search --translations): `query` (words AND, "phrase", prefix*) is matched against the translations held in passage ANNOTATIONS (coptic, cdli/ebl #tr, hittite-glossed trans_de, corph, …); hits are the ORIGINAL passages, each naming the matched `layer` with a bracketed `snippet` of it. Composes with lang (the original's language)/license/limit only. | |
| meter_pattern | No | Meter facet: exact foot/scansion pattern, case-insensitive (pedecerto DSDS, hypotactic '-u u -uu …'); composes with meter or stands alone. Text search only. | |
| 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. |