-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ccks2020 support, add template generation utils in
dee.event_types
- Loading branch information
Showing
7 changed files
with
603 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,3 +196,4 @@ Data/WikiEvents/*.json* | |
dueefin_*.json | ||
PTPCG*.json | ||
Data/ChFinAnn/types/*.json | ||
Data/CCKS2020/*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from dee.event_types import get_doc_type | ||
from dee.utils import default_dump_json, default_load_json | ||
|
||
if __name__ == "__main__": | ||
for dname in ["train", "dev", "test"]: | ||
data = default_load_json(f"Data/CCKS2020/{dname}.json") | ||
new_data = [] | ||
for doc_id, content in data: | ||
doc_type = get_doc_type(content["recguid_eventname_eventdict_list"]) | ||
content["doc_type"] = doc_type | ||
new_data.append([doc_id, content]) | ||
default_dump_json(new_data, f"Data/CCKS2020/typed_{dname}.json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.