-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathnif-21.vm
28 lines (28 loc) · 1.11 KB
/
nif-21.vm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"@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.trim()"
#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",
"beginIndex": "$bean.beginIndex",
"endIndex": "$bean.endIndex",
"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
]
}