Git Product home page Git Product logo

Comments (4)

osainz59 avatar osainz59 commented on May 24, 2024

Hi @SapaePhyu !

The eassiest way to reproduce the results is by running the following command:

python -m a2t.evaluation --config resources/predefined_configs/{DATASET}.arguments.config.json

Where {DATASET} can be ace or wikievents.

However, answering your question, the templates contain placeholders for different information, such as the event trigger ({trg}), trigger type ({trg_type}) and of course, the filler candidate ({arg}). So, on your example:

text = "..."
template = "{arg} bought something."
verbalization = template.format(**{"arg": "John D. Idol", "trg": "hired", "trg_type": "..."})

model_input = "{original_sentence} </s> {verbalization}".format(original_sentence=text, verbalization=verbalization)

Note that this is a very simplified example.

You can see the templates on the appendix of the paper or in the task configs at resources/predefined_configs/.

from ask2transformers.

SapaePhyu avatar SapaePhyu commented on May 24, 2024

Thank you, Sainz! Is it correct to think that the inputs of placeholders are the outputs of NER? If so, is there any constraint of selecting the entities, or do the placeholders accept all entities one by one?

from ask2transformers.

osainz59 avatar osainz59 commented on May 24, 2024

Yes! The actual models perform trigger-entity classification in order to assign role fillers to the events. Depending on your evaluation you would want to use gold entities or some entities predicted from a NER model. Regarding the constraints, in the configuration file for each dataset there are defined what we call valid_conditions, that is, the trigger type entity type pairs that are allowed for a given role. Although the probabilities are computed for every trigger-entity pair, only the ones that fulfill the valid conditions are accepted as valid answers.

from ask2transformers.

SapaePhyu avatar SapaePhyu commented on May 24, 2024

Thank you so much for your detailed explanation!!

from ask2transformers.

Related Issues (12)

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.