SciEvents / data_structure.py
Ralston's picture
Upload 5 files
0fbb415 verified
raw
history blame contribute delete
981 Bytes
# Define how nugget is composed. Nugget is the smallest granularity unit in this work, which means the smallest granularity unit of the evaluation criteria is nugget.
nugget = {
"text": str,
"tokens": [str, ...], # the key evaluation criteria
"offsets": [int, ...] # the offset of each token
}
argument = { # argument inherits attributes from nugget
"text": str,
"nugget_type": str, # constrained by ontology
"argument_type": str, # constrained by ontology
"tokens": [str, ...],
"offsets": [int, ...]
}
event = {
"event_type": str, # constrained by ontology
"arguments": [argument, ...],
"trigger": nugget
}
document = {
"venue": str,
"title": str,
"abstract": str,
"doc_id": str,
"publication_year": int,
"sentences": [str, ...], # using spacy to split from document["abstract"]
"events": [event, ...],
"document": [str, ...] # all nugget offsets originate from here
}
datas = [document, ...]