Skip to main content

pub.layers.annotation

Unified abstract annotation model. All annotation types — token tags, span labels, entity mentions, situation/frame mentions, syntactic parses, discourse relations, interlinear glosses, sentiment, temporal expressions, etc. — are represented through a single abstract schema discriminated by kind and subkind.

Types

annotationLayer

Type: Record

A named layer of annotations over an expression. All annotation types use this single record type. The combination of kind, subkind, and formalism tells the appview how to render.

FieldTypeDescription
expressionat-uriThe expression this annotation layer applies to.
kindUriat-uriAT-URI of the annotation kind definition node. Community-expandable via knowledge graph.
kindstringPrimary annotation kind slug (fallback). Known values: token-tag, span, relation, tree, graph, tier, document-tag
subkindUriat-uriAT-URI of the annotation subkind definition node. Community-expandable via knowledge graph.
subkindstringAnnotation subkind slug. Known values: pos, xpos, ner, lemma, morph, supersense, sense, chunk, speaker, gloss, phonetic, prosody, tobi, language-id, entity-mention, situation-mention, frame, predicate, discourse-unit, speech-act, temporal-expression, temporal-signal, spatial-expression, spatial-signal, spatial-relation, location-mention, sentiment, emotion, stance, information-structure, error, correction, code-switch, highlight, comment, bookmark, temporal-value, temporal-vagueness, dependency, enhanced-dependency, constituency, ccg, coreference, bridging, temporal-relation, causal-relation, discourse-relation, custom
formalismUriat-uriAT-URI of the formalism definition node. Community-expandable via knowledge graph.
formalismstringFormalism slug. Known values: universal-dependencies, penn-treebank, stanford, prague, propbank, framenet, verbnet, amr, ucca, rst, erst, sdrt, pdtb, timeml, iso-space, spatialml, conll-u, brat, elan, leipzig-glossing, ipa, tobi, bpe, sentencepiece, unimorph, wals, custom
labelSetstringIdentifier for the label set used (e.g., 'universal-pos', 'ontonotes-ner').
ontologyRefat-uriReference to a pub.layers.ontology defining the types used in this layer.
tokenizationIdrefFor token-aligned layers: the tokenization these annotations are aligned to. Ref: pub.layers.defs#uuid
parentLayerRefat-uriFor dependent/subordinate layers: the parent layer this one subdivides or refines.
languagestringBCP-47 language tag for this annotation layer, if different from the expression's language.
annotationsarrayThe annotations in this layer. Array of ref: #annotation
rankintegerRank among k-best alternatives (1 = best). Absent if this is the only/primary analysis.
alternativesRefat-uriReference to the top-ranked (rank=1) layer in a k-best group. Absent on the top-ranked layer itself.
metadatarefRef: pub.layers.defs#annotationMetadata
createdAtdatetimeRecord creation timestamp.

annotation

Type: Object

A single abstract annotation. The fields populated depend on the layer's kind/subkind. For token-tags: tokenIndex + label. For spans: anchor + label. For trees: anchor + label + parentId/childIds. For relations: anchor + arguments.

FieldTypeDescription
uuidrefRef: pub.layers.defs#uuid
anchorrefHow this annotation attaches to the source data. Ref: pub.layers.defs#anchor
tokenIndexintegerFor token-level annotations: 0-based index into the tokenization.
labelstringThe primary label (POS tag, entity type, frame name, constituent label, dependency relation, etc.).
valuestringSecondary value (lemma form, gloss, normalized temporal value, etc.).
textstringSurface text of the annotated span.
parentIdrefParent annotation in tree structures. Ref: pub.layers.defs#uuid
childIdsarrayChild annotation UUIDs in tree structures. Array of ref: pub.layers.defs#uuid
headIndexintegerHead/governor token index for directed arcs (dependency parsing). -1 for root.
targetIndexintegerDependent/target token index for directed arcs.
argumentsarrayRole/argument fillers for predicate-argument structures. Array of ref: #argumentRef
confidenceintegerConfidence score 0-10000.
ontologyTypeRefat-uriReference to a type definition in a pub.layers.ontology.
knowledgeRefsarrayLinks to external knowledge bases. Array of ref: pub.layers.defs#knowledgeRef
temporalrefStructured temporal annotation. For temporal-expression, temporal-value, and temporal-vagueness subkinds. Subsumes TimeML TIMEX3 and OWL-Time. Ref: pub.layers.defs#temporalExpression
spatialrefStructured spatial annotation. For spatial-expression and location-mention subkinds. Subsumes ISO-Space (ISO 24617-7), SpatialML, and GeoJSON/WKT geometries. Ref: pub.layers.defs#spatialExpression
featuresrefOpen-ended features. Ref: pub.layers.defs#featureMap

argumentRef

Type: Object

A role/argument reference in a predicate-argument structure. Uses the composable objectRef to point to another annotation.

FieldTypeDescription
rolestringThe argument role label (e.g., ARG0, Agent, Theme, CAUSE, connective, etc.).
targetrefReference to the annotation filling this role. Ref: pub.layers.defs#objectRef
featuresrefRef: pub.layers.defs#featureMap

clusterSet

Type: Record

Groups annotations into equivalence classes. Used for coreference resolution, bridging anaphora grouping, and any annotation clustering task.

FieldTypeDescription
expressionat-uriThe expression these clusters apply to. Optional for cross-document clustering.
expressionRefsarrayFor cross-document clustering: the expressions these clusters span. Array of at-uri
corpusRefat-uriFor cross-document clustering: the corpus these clusters span.
kindUriat-uriAT-URI of the clustering kind definition node. Community-expandable via knowledge graph.
kindstringClustering kind slug (fallback). Known values: coreference, situation-coreference, bridging, same-as, clustering, custom
layerRefat-uriThe annotation layer whose annotations these clusters group.
clustersarrayThe clusters. Array of ref: #cluster
metadatarefRef: pub.layers.defs#annotationMetadata
createdAtdatetimeRecord creation timestamp.

cluster

Type: Object

A cluster of annotations (e.g., coreferent entity mentions, situation mentions referring to the same situation).

FieldTypeDescription
uuidrefRef: pub.layers.defs#uuid
canonicalLabelstringThe canonical/representative label for this cluster.
membersarrayReferences to the annotations in this cluster. Array of ref: pub.layers.defs#objectRef
knowledgeRefsarrayKnowledge graph references. Array of ref: pub.layers.defs#knowledgeRef
featuresrefRef: pub.layers.defs#featureMap