templates.nif-21.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nif Show documentation
Show all versions of nif Show documentation
A small library for NLP Interchange Format (NIF) — Edit
{
"@context": "$contextJSON",
"@graph" : [
#foreach( $bean in $beans)
{
#if($bean.nifType == "CONTEXT")
"@id" : "$bean.referenceContextId",
"@type" : [ "Context", "OffsetBasedString" ],
"beginIndex" : $bean.context.beginIndex,
"endIndex" : $bean.context.endIndex,
"isString" : "$bean.mention"
#end
#if($bean.nifType == "ENTITY")
"@id": "$bean.context.NIF21id",
"@type": "Annotation",
"taAnnotatorsRef" : "$bean.annotator",
"taClassRef": [ #foreach ($type in $bean.types)"$type"#if( $foreach.hasNext ),#end#end],
"taConfidence": $bean.score,
"taIdentRef": "$bean.taIdentRef",
"referenceContext": "$bean.referenceContextId"#if($bean.taClassRef),
"taMsClassRef":[#foreach ($type in $bean.taClassRef)"$type"#if( $foreach.hasNext ),#end#end]#end
#end}#if( $foreach.hasNext )
,#end
#end
]
}