@@ -77,8 +77,17 @@ def process_row(self, row):
77
77
'evex_relation_type' : row .refined_type ,
78
78
'evex_polarity' : row .refined_polarity ,
79
79
'evex_general_event_id' : str (row .general_event_id ),
80
- 'evex_standoff_regulation_id' : ev_info .get ('regulation_uid' )
80
+ 'evex_standoff_regulation_id' :
81
+ ev_info .get ('regulation_uid' ),
82
+ 'evex_confidence' : ev_info .get ('confidence' )
81
83
}
84
+ # These are propagated to allow filtering later
85
+ epistemics = {}
86
+ if ev_info .get ('negation' ):
87
+ epistemics ['negated' ] = True
88
+ if ev_info .get ('speculation' ):
89
+ epistemics ['is_hypothesis' ] = True
90
+
82
91
if ev_info .get ('subj_coords' ):
83
92
annotations ['agents' ] = \
84
93
{'coords' : [ev_info ['subj_coords' ],
@@ -87,7 +96,8 @@ def process_row(self, row):
87
96
pmid = pmid ,
88
97
text_refs = text_refs ,
89
98
text = ev_info .get ('text' ),
90
- annotations = annotations )
99
+ annotations = annotations ,
100
+ epistemics = epistemics )
91
101
92
102
# We can set the raw Agent text which is specific to this
93
103
# given evidence.
@@ -234,7 +244,10 @@ def get_regulation_info(standoff, regulation, source_uid, target_uid):
234
244
'subj_coords' : subj_coord ,
235
245
'obj_text' : obj_text ,
236
246
'obj_coords' : obj_coord ,
237
- 'regulation_uid' : regulation .uid }
247
+ 'regulation_uid' : regulation .uid ,
248
+ 'confidence' : regulation .confidence_val ,
249
+ 'negation' : True if regulation .negation else False ,
250
+ 'speculation' : True if regulation .speculation else False }
238
251
239
252
240
253
def get_sentence_for_offset (text_lines , line_offsets , offset ):
0 commit comments