File size: 268 Bytes
b11ac48
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from nltk.corpus import framenet as fn
import json

frames_to_roles = {}

for frame in fn.frames():
    frames_to_roles[frame.name] = list(frame.FE.keys())


with open("resources/fn_frames_to_roles.json", "w", encoding="utf-8") as f:
    json.dump(frames_to_roles, f)