MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / __init__

Method __init__

data_convert/task_format/event_extraction.py:9–15  ·  view source on GitHub ↗
(self, doc_json)

Source from the content-addressed store, hash-verified

7
8class DyIEPP(TaskFormat):
9 def __init__(self, doc_json):
10 self.doc_key = doc_json['doc_key']
11 self.sentences = doc_json['sentences']
12 self.ner = doc_json['ner']
13 self.relations = doc_json['relations']
14 self.events = doc_json['events']
15 self.sentence_start = doc_json.get('sentence_start', doc_json['_sentence_start'])
16
17 def generate_sentence(self, type_format='subtype'):
18 for sentence, events_in_sentence, sentence_start in zip(self.sentences, self.events, self.sentence_start):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected