pub.layers.corpus
Corpus records. A corpus is a named, versioned collection of expressions with shared metadata, annotation guidelines, and ontologies. For nesting corpora into projects, releases, and language groups (and for browsable, citable rollups across many corpora), see the catalog namespace; a corpus is a produce member of a catalog.collection.
The record mains declare key: any (Scheme A): rkeys may be arbitrary strings rather than TIDs.
Types
corpus
NSID: pub.layers.corpus.corpus
Type: Record
A corpus: a curated collection of expressions.
| Field | Type | Description |
|---|---|---|
name | string | Corpus name. (required, max 512) |
description | string | Detailed description of the corpus. (max 50000) |
version | string | Version string for the corpus release. (max 64) |
languages | array | BCP-47 language tags this record covers. Empty when language is unspecified or unknown. Array of strings (item max 32). No array-level cap. |
languageRefs | array | Structured language references grounding each language via glottolog, iso639-3, or cldr and carrying script, region, variety, and role. Richer companion to the languages tag array. Array of ref: pub.layers.defs#languageRef |
knowledgeRefs | array | Knowledge graph references grounding this corpus (e.g., source catalog identifiers, dataset registries such as ldc or elra, associated publications). Array of ref: pub.layers.defs#knowledgeRef (max 64) |
domainUri | at-uri | AT-URI of the domain definition node. Community-expandable via knowledge graph. |
domain | string | Domain slug (fallback when domainUri unavailable). Known values: news, biomedical, legal, social-media, dialogue, literary, scientific, web, spoken, custom |
licensing | ref | Licensing terms governing this corpus (supports dual/multi/component licensing). Ref: pub.layers.defs#licensing |
ontologyRefs | array | Ontologies used in this corpus. Array of at-uri |
eprintRefs | array | Eprint records (papers/preprints) describing or associated with this corpus. Array of at-uri (max 64) |
reproducibility | ref | How this corpus was produced (code, commit, command, environment, seed). Ref: pub.layers.defs#reproducibilityInfo |
expressionCount | integer | Number of expressions in the corpus. |
annotationDesign | ref | Annotation project design: annotator assignment, adjudication, and quality criteria. Ref: pub.layers.corpus.defs#annotationDesign |
features | ref | Ref: pub.layers.defs#featureMap |
createdAt | datetime | Record creation timestamp. (required) |
annotationDesign
NSID: pub.layers.corpus.defs#annotationDesign
Type: Object
Annotation project design parameters: annotator assignment, adjudication, and quality criteria.
| Field | Type | Description |
|---|---|---|
redundancy | ref | How annotators are assigned to items. Ref: pub.layers.corpus.defs#redundancySpec |
adjudication | ref | How disagreements are resolved. Ref: pub.layers.corpus.defs#adjudicationSpec |
qualityCriteria | array | Acceptance criteria for annotation quality. Array of ref: pub.layers.corpus.defs#qualityCriterion |
guidelinesRef | at-uri | AT-URI of the annotation guidelines document (e.g., a pub.layers.persona.persona or external resource). |
guidelinesVersion | string | Version identifier for the annotation guidelines. |
annotationRounds | integer | Number of annotation passes in the project workflow. |
features | ref | Ref: pub.layers.defs#featureMap |
redundancySpec
NSID: pub.layers.corpus.defs#redundancySpec
Type: Object
How many annotators work on each item and how they are assigned.
| Field | Type | Description |
|---|---|---|
count | integer | Number of independent annotators per item. |
assignmentStrategyUri | at-uri | AT-URI of the assignment strategy definition node. Community-expandable via knowledge graph. |
assignmentStrategy | string | How annotators are assigned to items (fallback when assignmentStrategyUri unavailable). Known values: random, round-robin, stratified, expertise-based, custom |
annotatorPool | integer | Total number of annotators in the project. |
features | ref | Ref: pub.layers.defs#featureMap |
adjudicationSpec
NSID: pub.layers.corpus.defs#adjudicationSpec
Type: Object
How disagreements between annotators are resolved into a final annotation.
| Field | Type | Description |
|---|---|---|
methodUri | at-uri | AT-URI of the adjudication method definition node. Community-expandable via knowledge graph. |
method | string | Adjudication method (fallback when methodUri unavailable). Known values: expert, majority-vote, unanimous, discussion, dawid-skene, automatic-merge, intersection, union, none, custom |
dedicatedAdjudicator | boolean | Whether a separate adjudicator (not one of the annotators) resolves disagreements. |
agreementThreshold | integer | Agreement level (0-1000) above which adjudication is skipped. |
features | ref | Ref: pub.layers.defs#featureMap |
qualityCriterion
NSID: pub.layers.corpus.defs#qualityCriterion
Type: Object
An acceptance criterion for annotation quality.
| Field | Type | Description |
|---|---|---|
metricUri | at-uri | AT-URI of the metric definition node. Community-expandable via knowledge graph. |
metric | string | Agreement or quality metric (fallback when metricUri unavailable). Known values: cohens-kappa, fleiss-kappa, krippendorff-alpha, percent-agreement, f1, smatch, uas, las, correlation, custom |
threshold | integer | Minimum acceptable metric value (0-1000). |
scopeUri | at-uri | AT-URI of the evaluation scope definition node. Community-expandable via knowledge graph. |
scope | string | Evaluation scope (fallback when scopeUri unavailable). Known values: item, layer, document, corpus, custom |
features | ref | Ref: pub.layers.defs#featureMap |
membership
NSID: pub.layers.corpus.membership
Type: Record
A record indicating that an expression belongs to a corpus, with optional split assignment.
| Field | Type | Description |
|---|---|---|
corpusRef | at-uri | AT-URI of the corpus. (required) |
expressionRef | at-uri | AT-URI of the expression. (required) |
splitUri | at-uri | AT-URI of the split definition node. Community-expandable via knowledge graph. |
split | string | Split slug (fallback when splitUri unavailable). Known values: train, dev, test, unlabeled |
ordinal | integer | Ordering index within the corpus. |
metadata | ref | Provenance: who assigned this expression to this corpus, when, with what tool. Ref: pub.layers.defs#annotationMetadata |
features | ref | Open-ended features for this membership (e.g., source file, import batch, quality flags). Ref: pub.layers.defs#featureMap |
createdAt | datetime | Record creation timestamp. (required) |
XRPC Queries
getCorpus
NSID: pub.layers.corpus.getCorpus
Retrieve a single corpus record by AT-URI.
| Parameter | Type | Description |
|---|---|---|
uri | at-uri (required) | The AT-URI of the corpus record. |
Output: { uri, cid, value: corpus }
listCorpora
NSID: pub.layers.corpus.listCorpora
List corpus records in a repository with pagination.
| Parameter | Type | Description |
|---|---|---|
repo | at-identifier (required) | The repository handle or DID (an at-identifier). |
domain | string | Filter by domain slug. |
limit | integer | Maximum number of records to return (1-100, default 50). |
cursor | string | Pagination cursor from previous response. |
languages | array | Filter to records covering any of these BCP-47 language tags. Array of strings |
Output: { records: { uri, cid, value: corpus }[], cursor?: string } (records required)
getMembership
NSID: pub.layers.corpus.getMembership
Retrieve a single membership record by AT-URI.
| Parameter | Type | Description |
|---|---|---|
uri | at-uri (required) | The AT-URI of the membership record. |
Output: { uri, cid, value: membership }
listMemberships
NSID: pub.layers.corpus.listMemberships
List membership records for a given corpus (by corpusRef), optionally filtered by split, with pagination.
| Parameter | Type | Description |
|---|---|---|
corpusRef | at-uri (required) | The AT-URI of the corpus. |
split | string | Filter by split slug. |
limit | integer | Maximum number of records to return (1-100, default 50). |
cursor | string | Pagination cursor from previous response. |
Output: { records: { uri, cid, value: membership }[], cursor?: string } (records required)