cu-clear / semlink

Official repository for Semlink resources
32 stars 10 forks source link

mapping from propbank to framenet #10

Open jheinecke opened 2 years ago

jheinecke commented 2 years ago

Hello, thanks for this data! I'm trying to map propbank rolesets andarguments to FrameNet frames and frame-elements. But as I see this is not (yet) possible using the .json files in instances/. So I try to use the instances/semlink-2 file (together with tools/annotation.py. However, I came across cases where the FrameNet frame is None (OK, no FrameNet frame defined) NF or IN. What is the meaning of the latter two?

BTW, the python lines indicating how to use the json-files seem to have an error, the following works:

    # Let's get the FN mappings from the PB roleset "abduct.01"
    vn_mapping = pb_vn_mappings["abduct.01"]    

    # Here we just grab the first sense
    # vn_class = vn_mapping[list(vn_mapping.keys())[0]] # original line (here vn_class is a dict)
    vn_class = list(vn_mapping.keys())[0]  # should be like this

    # From VN, abduct.01 maps to VerbNet class 10.5
    fn_mapping = vn_fn_mappings[vn_class + "-" + verb]

    print (fn_mapping)
    # And from FN we get the Frame "kidnapping"

Thanks

kevincstowe commented 2 years ago

Sorry for the delay! These two codes are a holdover from a much older version. I believe "NF" is for "Not found": cases where the verb form was not in (the current) version of FrameNet. Theoretically this should be treated the same as None. "IN" was for "indefinite": cases where the sense mapped to multiple FN frames, and it wasn't clear which one to use. All three cases indicate a lack of a FN annotation.

It should be possible if not straightforward to ma p from PB rolesets/arguments to FN using the files, by going PB -> VN -> FN, which might be a solution, but I understand it's a bit of a hassle.

I've made the revision to the code you suggested, thank you!