Function: createTextSelectionAnnotation()
@ghentcdh/annotated-text / createTextSelectionAnnotation
Function: createTextSelectionAnnotation()
createTextSelectionAnnotation(
sourceUri
,language
,selectedText
,annotation
):object
Defined in: libs/core/src/lib/adapter/annotation/w3c/utils/text-selection-annotation.ts:45
Parameters
sourceUri
string
language
string
selectedText
string
annotation
AnnotationUpdate
Returns
object
@context
@context:
string
body
body: {
format
:"text"
;language
:string
;source
:string
;type
:"TextualBody"
;value
:string
; } | {purpose
:"tagging"
;type
:"TextualBody"
;value
:string
; } | {id
:string
;purpose
:"describing"
;source
:string
;type
:"SpecificResource"
;value
:any
; } | {textType
:string
;type
:"AnnotationType"
; } | ({format
:"text"
;language
:string
;source
:string
;type
:"TextualBody"
;value
:string
; } | {purpose
:"tagging"
;type
:"TextualBody"
;value
:string
; } | {id
:string
;purpose
:"describing"
;source
:string
;type
:"SpecificResource"
;value
:any
; } | {textType
:string
;type
:"AnnotationType"
; })[]
id
id:
string
motivation
motivation:
"tagging"
|"classifying"
target
target: {
processingLanguage
:string
;selector
: {end
:number
;start
:number
;type
:"TextPositionSelector"
; };source
:string
;textDirection
:"ltr"
|"rtl"
;type
:"Text"
; } |object
[]