Git Product home page Git Product logo

fido's Introduction

FIDO

This is the code for our paper Exploiting Definitions for Frame Identification (EACL 2021).

Testing Environment

This project is built on python==3.7.6, torch=1.4.0, transformers==2.9.0.

Use Our Pre-trained Models - FIDO

Download the pre-trained models at: trained on FrameNet 1.5, trained on FrameNet 1.7.

The accuracy of the pre-trained models are:

dev test
FN 1.5 92.4 91.5
FN 1.7 92.4 92.3

The file you would like to predict should be "data/fn1.5/test.csv" or "data/fn1.7/test.csv".

Put the extracted "model_fn1.5" or "model_fn1.7" folder under the "pretrained_models/" directory, and run predict.sh.

It will generate two files: "test_prediction_labels.txt" and "test_prediction_probs.txt" under the model directory.

Train from Scratch

For FrameNet 1.5, data files (train.csv, dev.csv and test.csv) should be put under "data/fn1.5/".

For FrameNet 1.7, similarly, data files should be put under "data/fn1.7/".

Run train.sh. You should get similar results compared to the table above.

Data Format

id, sentence, lu_name, lu_head_position, lu_defs, frame_names, frame_defs, label

lu_name: the target word or phrase
lu_head_position: the position index of the target in the sentence
lu_defs: all the target word definitions associated with the candidate frames (each LU will have different definitions for different associated frames), separated by "~$~"
frame_names: candidate frames, separated by "~$~"
frame_defs: candidate frame definitions, separated by "~$~"
label: an integer indicating the correct frame from the frame_names (lu_defs, frame_names and frame_defs should have the same corresponding order)

An example of the data format can be found under "data/fn1.5/".

The "data/fn1.5/" folder *only contains a small sample* of the data. To replicate the results in the paper, you will need full text of the FrameNet data, as well as the same data split.

Get full access to the FrameNet data at here.

We followed the same train/dev/test split as in Das et al. (2014) and Swayamdipta et al. (2017). Details of the data processing can be found at Open-SESAME.

Contact and Reference

For questions and issues, please contact [email protected]. Our paper can be cited as:

@inproceedings{jiang-riloff-2021-exploiting,
title="{Exploiting Definitions for Frame Identification}",
author={Jiang, Tianyu and Riloff, Ellen},
booktitle={Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics (EACL 2021)},
year={2021}
}

fido's People

Contributors

tyjiangu avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

jdevasier

fido's Issues

When will you release the code?

Great job!Looking forward to your release of the code.
And, I am confused that you take the first token's hidden vector as output if target word has more token rather than average pooling or anything. Could you explain the reason for doing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.