Skip to main content

pub.layers.alignment

Alignment records for parallel structure correspondence. Handles interlinear glossing (Leipzig glossing rules), parallel text alignment (translation), cross-tokenization mapping (word-to-morpheme), audio-text forced alignment, and any many-to-many correspondence between annotation elements or sequences.

Types

alignment

NSID: pub.layers.alignment.alignment Type: Record

An alignment between two parallel sequences. The sequences can be tokenizations, annotation layers, expressions (for parallel text), or tiers. Links establish many-to-many correspondence between elements indexed by position.

FieldTypeDescription
expressionat-uriPrimary expression context (for within-document alignments).
kindUriat-uriAT-URI of the alignment kind definition node. Community-expandable via knowledge graph.
kindstringAlignment kind slug (fallback). Known values: tokenization-to-tokenization, interlinear, parallel-text, audio-to-text, layer-to-layer, error-to-correction, custom
subkindUriat-uriAT-URI of the alignment subkind definition node. Community-expandable via knowledge graph.
subkindstringAlignment subkind slug (fallback). Known values: word-to-morpheme, word-to-word, sentence-to-sentence, phrase-to-phrase, morpheme-to-gloss, forced-alignment, manual-alignment, custom
sourcerefReference to the source sequence. Ref: pub.layers.defs#objectRef
targetrefReference to the target sequence. Ref: pub.layers.defs#objectRef
sourceLangstringBCP-47 language tag for the source (for parallel text alignment).
targetLangstringBCP-47 language tag for the target.
linksarrayThe alignment links. Array of ref: pub.layers.defs#alignmentLink
metadatarefRef: pub.layers.defs#annotationMetadata
knowledgeRefsarrayKnowledge graph references. Array of ref: pub.layers.defs#knowledgeRef
licensingrefLicensing terms governing this alignment (supports dual/multi/component licensing). Ref: pub.layers.defs#licensing
eprintRefsarrayEprint records (papers/preprints) describing or associated with this alignment. Array of at-uri (max 64)
reproducibilityrefHow this alignment was produced (code, commit, command, environment, seed). Ref: pub.layers.defs#reproducibilityInfo
featuresrefRef: pub.layers.defs#featureMap
createdAtdatetimeRecord creation timestamp.

XRPC Queries

getAlignment

NSID: pub.layers.alignment.getAlignment

Retrieve a single alignment record by AT-URI.

ParameterTypeDescription
uriat-uri (required)The AT-URI of the alignment record.

Output: { uri, cid, value } where value is the alignment record object.

listAlignments

NSID: pub.layers.alignment.listAlignments

List alignments for a given expression context (required expression AT-URI) with pagination.

ParameterTypeDescription
expressionat-uri (required)The AT-URI of the expression context to list alignments for.
kindstringFilter by alignment kind slug (maxLength 128).
limitintegerMaximum number of records to return (1-100, default 50).
cursorstringPagination cursor from previous response.

Output: { records: { uri, cid, value }[], cursor?: string } where value is the alignment record.