qanary-component-sparql-generation/get-annotation-information
This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.
qanary-component-sparql-generation/get-annotation-information
Section titled “qanary-component-sparql-generation/get-annotation-information”- Package:
qanary-component-sparql-generation - Source file:
apps/qanary-component-sparql-generation/src/get-annotation-information.ts
Summary
Section titled “Summary”Represents an AnnotationOfInstance enriched with its corresponding type from AnnotationOfSpotInstance
Functions
Section titled “Functions”isValidRelationType
Section titled “isValidRelationType”function isValidRelationType(relationType: string): relationType is KnownRelationTypeChecks if a string is a valid relation type
Parameters
relationType(string) ReturnsrelationType is KnownRelationTypeDefined at: line 45
getRelationType
Section titled “getRelationType”function getRelationType(message: IQanaryMessage): Promise<KnownRelationType | "">Gets the relation type from AnnotationOfRelation
Parameters
message(IQanaryMessage): The Qanary message containing endpoint and graph information ReturnsPromise<KnownRelationType | "">: The validated relation type, or empty string if not found or invalid Defined at: line 55
getEnrichedInstances
Section titled “getEnrichedInstances”function getEnrichedInstances(message: IQanaryMessage): Promise<EnrichedInstance[]>Gets all AnnotationOfInstance annotations with their corresponding types from AnnotationOfSpotInstance Links them by shared text positions (start/end)
Parameters
message(IQanaryMessage): The Qanary message containing endpoint and graph information ReturnsPromise<EnrichedInstance[]>: Array of enriched instances with type information Defined at: line 109
getAnnotationInformation
Section titled “getAnnotationInformation”function getAnnotationInformation(message: IQanaryMessage): Promise<AnnotationInformation>Gets all required annotation information: relation type and instances with their types
Parameters
message(IQanaryMessage): The Qanary message containing endpoint and graph information ReturnsPromise<AnnotationInformation>: Annotation information including relation type and enriched instances Defined at: line 207
Interfaces
Section titled “Interfaces”EnrichedInstance
Section titled “EnrichedInstance”interface EnrichedInstanceRepresents an AnnotationOfInstance enriched with its corresponding type from AnnotationOfSpotInstance
Properties
instanceUri(string): The URI of the AnnotationOfInstanceentityUrn(string): The entity URN (body of AnnotationOfInstance)entityType(string): The entity type from the corresponding AnnotationOfSpotInstanceexactQuote(string): The exact text that was annotatedstart(number): Start position in the question textend(number): End position in the question textinstanceConfidence(number): Confidence score from AnnotationOfInstancespotConfidence(number): Confidence score from AnnotationOfSpotInstance Defined at: line 13
AnnotationInformation
Section titled “AnnotationInformation”interface AnnotationInformationAll annotation information required for SPARQL generation
Properties
relationType(KnownRelationType | ""): The detected and validated relation typeinstances(EnrichedInstance[]): All instances with their corresponding entity types Defined at: line 35
In qanary-component-sparql-generation
Section titled “In qanary-component-sparql-generation”qanary-component-sparql-generation/extract-coordinates-from-instancesqanary-component-sparql-generation/get-annotation-informationqanary-component-sparql-generation/get-coordinates-from-addressqanary-component-sparql-generation/get-enriched-instancesqanary-component-sparql-generation/get-predefined-sparqlqanary-component-sparql-generation/handlerqanary-component-sparql-generation/index