Skip to main content

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.

FieldTypeDescription
namestringCorpus name. (required, max 512)
descriptionstringDetailed description of the corpus. (max 50000)
versionstringVersion string for the corpus release. (max 64)
languagesarrayBCP-47 language tags this record covers. Empty when language is unspecified or unknown. Array of strings (item max 32). No array-level cap.
languageRefsarrayStructured 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
knowledgeRefsarrayKnowledge 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)
domainUriat-uriAT-URI of the domain definition node. Community-expandable via knowledge graph.
domainstringDomain slug (fallback when domainUri unavailable). Known values: news, biomedical, legal, social-media, dialogue, literary, scientific, web, spoken, custom
licensingrefLicensing terms governing this corpus (supports dual/multi/component licensing). Ref: pub.layers.defs#licensing
ontologyRefsarrayOntologies used in this corpus. Array of at-uri
eprintRefsarrayEprint records (papers/preprints) describing or associated with this corpus. Array of at-uri (max 64)
reproducibilityrefHow this corpus was produced (code, commit, command, environment, seed). Ref: pub.layers.defs#reproducibilityInfo
expressionCountintegerNumber of expressions in the corpus.
annotationDesignrefAnnotation project design: annotator assignment, adjudication, and quality criteria. Ref: pub.layers.corpus.defs#annotationDesign
featuresrefRef: pub.layers.defs#featureMap
createdAtdatetimeRecord creation timestamp. (required)

annotationDesign

NSID: pub.layers.corpus.defs#annotationDesign Type: Object

Annotation project design parameters: annotator assignment, adjudication, and quality criteria.

FieldTypeDescription
redundancyrefHow annotators are assigned to items. Ref: pub.layers.corpus.defs#redundancySpec
adjudicationrefHow disagreements are resolved. Ref: pub.layers.corpus.defs#adjudicationSpec
qualityCriteriaarrayAcceptance criteria for annotation quality. Array of ref: pub.layers.corpus.defs#qualityCriterion
guidelinesRefat-uriAT-URI of the annotation guidelines document (e.g., a pub.layers.persona.persona or external resource).
guidelinesVersionstringVersion identifier for the annotation guidelines.
annotationRoundsintegerNumber of annotation passes in the project workflow.
featuresrefRef: 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.

FieldTypeDescription
countintegerNumber of independent annotators per item.
assignmentStrategyUriat-uriAT-URI of the assignment strategy definition node. Community-expandable via knowledge graph.
assignmentStrategystringHow annotators are assigned to items (fallback when assignmentStrategyUri unavailable). Known values: random, round-robin, stratified, expertise-based, custom
annotatorPoolintegerTotal number of annotators in the project.
featuresrefRef: pub.layers.defs#featureMap

adjudicationSpec

NSID: pub.layers.corpus.defs#adjudicationSpec Type: Object

How disagreements between annotators are resolved into a final annotation.

FieldTypeDescription
methodUriat-uriAT-URI of the adjudication method definition node. Community-expandable via knowledge graph.
methodstringAdjudication method (fallback when methodUri unavailable). Known values: expert, majority-vote, unanimous, discussion, dawid-skene, automatic-merge, intersection, union, none, custom
dedicatedAdjudicatorbooleanWhether a separate adjudicator (not one of the annotators) resolves disagreements.
agreementThresholdintegerAgreement level (0-1000) above which adjudication is skipped.
featuresrefRef: pub.layers.defs#featureMap

qualityCriterion

NSID: pub.layers.corpus.defs#qualityCriterion Type: Object

An acceptance criterion for annotation quality.

FieldTypeDescription
metricUriat-uriAT-URI of the metric definition node. Community-expandable via knowledge graph.
metricstringAgreement or quality metric (fallback when metricUri unavailable). Known values: cohens-kappa, fleiss-kappa, krippendorff-alpha, percent-agreement, f1, smatch, uas, las, correlation, custom
thresholdintegerMinimum acceptable metric value (0-1000).
scopeUriat-uriAT-URI of the evaluation scope definition node. Community-expandable via knowledge graph.
scopestringEvaluation scope (fallback when scopeUri unavailable). Known values: item, layer, document, corpus, custom
featuresrefRef: 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.

FieldTypeDescription
corpusRefat-uriAT-URI of the corpus. (required)
expressionRefat-uriAT-URI of the expression. (required)
splitUriat-uriAT-URI of the split definition node. Community-expandable via knowledge graph.
splitstringSplit slug (fallback when splitUri unavailable). Known values: train, dev, test, unlabeled
ordinalintegerOrdering index within the corpus.
metadatarefProvenance: who assigned this expression to this corpus, when, with what tool. Ref: pub.layers.defs#annotationMetadata
featuresrefOpen-ended features for this membership (e.g., source file, import batch, quality flags). Ref: pub.layers.defs#featureMap
createdAtdatetimeRecord creation timestamp. (required)

XRPC Queries

getCorpus

NSID: pub.layers.corpus.getCorpus

Retrieve a single corpus record by AT-URI.

ParameterTypeDescription
uriat-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.

ParameterTypeDescription
repoat-identifier (required)The repository handle or DID (an at-identifier).
domainstringFilter by domain slug.
limitintegerMaximum number of records to return (1-100, default 50).
cursorstringPagination cursor from previous response.
languagesarrayFilter 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.

ParameterTypeDescription
uriat-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.

ParameterTypeDescription
corpusRefat-uri (required)The AT-URI of the corpus.
splitstringFilter by split slug.
limitintegerMaximum number of records to return (1-100, default 50).
cursorstringPagination cursor from previous response.

Output: { records: { uri, cid, value: membership }[], cursor?: string } (records required)