GithubHelp home page GithubHelp logo

semantic-role-labeling's Introduction

Semantic Role Labeling using AllenNlp

This script takes sample sentences which can be a single or list of sentences and uses AllenNLP's per-trained model on Semantic Role Labeling to make predictions.

Description

Semantic Role Labeling (SRL) models recover the latent predicate argument structure of a sentence. SRL builds representations that answer basic questions about sentence meaning, including “who” did “what” to “whom,” etc. The AllenNLP SRL model is a reimplementation of a deep BiLSTM model (He et al, 2017).

The model used for this script is found at https://s3-us-west-2.amazonaws.com/allennlp/models/srl-model-2018.05.25.tar.gz

Installing AlleNlp

AllenNLP can be installed using pip3:

pip3 install allennlp

But there are other options: https://github.com/allenai/allennlp#installation

Role Labels

ARG-0 —> Usually the doer of the Verb.

ARG-1 —> Usually the thing/entity on which the verb was done.

ARG-2 —> Usually an intstrument used to do the work, arttribute of verb (work done) on ARG-1.

ARG-3,ARG-4 are various modfifiers depending upon the type of sentence. E.g: These can be amounts, end-start points.

ARG-M —> Can be of various types. A few listed in the article: LOC(location), EXT(extent), TMP(time), DIR(direction).

semantic-role-labeling's People

Contributors

maazmikail avatar

Stargazers

Cogmeta avatar

Watchers

James Cloos avatar  avatar

Forkers

kaustav1616

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.