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

Method __init__

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

Source from the content-addressed store, hash-verified

76 """
77
78 def __init__(self, doc_json):
79 self.doc_key = doc_json['doc_id']
80 self.sentence = doc_json['tokens']
81 self.entities = {entity['id']: entity for entity in doc_json['entity_mentions']}
82 self.relations = doc_json['relation_mentions']
83 self.events = doc_json['event_mentions']
84 # self.sentence_start = doc_json['start']
85 # self.sentence_end = doc_json['end']
86 # self.text = doc_json['text']
87
88 def generate_sentence(self, type_format='subtype'):
89 events = list()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected