Skip to content

shared/helpers/create-annotation

This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.

  • Package: @leipzigtreechat/shared
  • Source file: packages/shared/src/helpers/create-annotation.ts

The interface for the information needed for a qanary annotation value the value of the found annotation range the range of the found annotation

function createAnnotationInKnowledgeGraph({
message,
componentName,
annotation,
annotationType = "qa:AnnotationAnswer",
}: ICreateAnnotationInKnowledgeGraphOptions): Promise<void>

Creates an annotation in the knowledge graph given in the message

Parameters

  • { message, componentName, annotation, annotationType = "qa:AnnotationAnswer", } (ICreateAnnotationInKnowledgeGraphOptions) Returns
  • Promise<void> Defined at: line 54
interface IAnnotationInformation

The interface for the information needed for a qanary annotation value the value of the found annotation range the range of the found annotation

Properties

  • value (string): the value of the found annotation
  • range (IAnnotationInformationRange): the range of the found annotation
  • confidence (number): the confidence of the found annotation Defined at: line 12
interface IAnnotationInformationRange

The range info range for a qanary annotation start the start of the found annotation end the end of the found annotation

Properties

  • start (number): the start of the found annotation
  • end (number): the end of the found annotation Defined at: line 26
interface ICreateAnnotationInKnowledgeGraphOptions

The options to create an annotation in the knowledge graph

Properties

  • message (IQanaryMessage): the qanary message containing the endpoint and graph
  • componentName (string): the component name that creates the annotation
  • annotation (IAnnotationInformation): the actual annotation to be created
  • annotationType (string): the type of the annotation, prefixed with “qa:”, defaults to “qa:AnnotationAnswer” Defined at: line 36