This project is funded by the MOUSSE ERC Grant no.726487 and the ELEXIS project no.731015 under the European Union's Horizon 2020 research and innovation programme.

VerbAtlas is licensed under the CC BY-NC-SA 4.0 License

Documentation for the RESTful API

Semantic Annotation with the Model API

To encourage the integration of Semantic Role Labeling into downstream applications, the Model API offers a simple solution for out-of-the-box role labeling by providing an interface to a full end-to-end state-of-the-art pretrained model.

Semantic Role Labeling

Returns Semantic Role Labeling annotations for a given sentence. In particular, it identifies and disambiguates the predicates in a sentence, and, for each predicate, it identifies and labels its arguments.

Method

GET or POST

URL

/api/model?sentence=sentence

Parameters

Name Type Description
sentence String The sentence to be annotated with predicate sense and semantic role labels.

Request Example

http://verbatlas.org/api/model?sentence=This%20is%20an%20example%20sentence.

Response

{ "tokens": [ { "index": 0, "rawText": "This" }, { "index": 1, "rawText": "is" }, { "index": 2, "rawText": "an" }, { "index": 3, "rawText": "example" }, { "index": 4, "rawText": "sentence" }, { "index": 5, "rawText": "." } ], "annotations": [ { "tokenIndex": 1, "propbank": { "frameName": "be.01", "roles": [ { "role": "ARG1", "score": 1, "span": [ 0, 1 ] }, { "role": "ARG2", "score": 1, "span": [ 2, 5 ] } ] }, "verbatlas": { "frameName": "COPULA", "roles": [ { "role": "theme", "score": 1, "span": [ 0, 1 ] }, { "role": "attribute", "score": 1, "span": [ 2, 5 ] } ] } } ] }

Semantic Information with the Resource API

The Resource API provides a RESTful interface to easily link predicate-level information, e.g., predicate lemmas and/or predicate senses, to VerbAtlas specific features, e.g., frames and semantic roles.

Predicate Information

Given a predicate (a lemma, a WordNet sense key, a WordNet synset ID or a BabelNet synset ID), it returns the corresponding VerbAtlas frame(s).

Method

GET or POST

URL

/api/verbatlas/predicate?lemma=lemma
/api/verbatlas/predicate?wordnetSenseKey=wordnetSenseKey
/api/verbatlas/predicate?wordnetID=wordnetID
/api/verbatlas/predicate?babelnetID=babelnetID

Parameters

Name Type Description
lemma String A predicate lemma, e.g., eat, drink, write, read...
wordnetSenseKey String A WordNet sense key, e.g., eat%2:34:00::
wordnetID String A WordNet synset ID, e.g., wn:01168468v.
babelnetID String A BabelNet synset ID, e.g., bn:00087460v

Request example

http://verbatlas.org/api/verbatlas/predicate?lemma=eat

Response

{ "bn:00085841v": { "va_frame_id": "va:0139f", "va_frame_name": "CORRODE_WEAR-AWAY_SCRATCH" }, "bn:00085692v": { "va_frame_id": "va:0135f", "va_frame_name": "CONSUME_SPEND" }, "bn:00087461v": { "va_frame_id": "va:0051f", "va_frame_name": "EAT_BITE" }, "bn:00087460v": { "va_frame_id": "va:0051f", "va_frame_name": "EAT_BITE" }, "bn:00087462v": { "va_frame_id": "va:0051f", "va_frame_name": "EAT_BITE" }, "bn:00087463v": { "va_frame_id": "va:0115f", "va_frame_name": "EXPERIENCE-MENTAL-STATE" } }

Request example

Given a VerbAtlas frame ID, e.g. va:0001f, it returns all the predicates that belong to the given VerbAtlas frame.

Method

GET or POST

URL

/api/verbatlas/frame?verbatlasFrameID=verbatlasFrameID

Parameters

Name Type Description
verbatlasFrameID String A VerbAtlas frame ID, e.g., va:0001f

Request Example

http://verbatlas.org/api/verbatlas/frame?verbatlasFrameID=va:0001f

Response

{ "predicate_argument_structure": [ "Agent", "Theme", "Beneficiary", "Attribute" ], "babelnet_synset_ids": [ "bn:00082138v", "bn:00082200v", "bn:00082203v", "bn:00089416v", "bn:00093787v", "bn:00094745v", "bn:00095007v" ], "wordnet_synset_ids": [ "wn:00668099v", "wn:00719231v", "wn:00668805v", "wn:00669099v", "wn:00670179v", "wn:00669630v", "wn:02457585v" ] }

PropBank to VerbAtlas: predicate sense mapping

Given a PropBank predicate sense (e.g. eat.01) it returns the corresponding VerbAtlas frame (e.g. va:0051f/EAT_BITE).

Method

GET or POST

URL

/api/verbatlas/align/sense?propbankSenseID=propbankSenseID

Paremeters

Name Type Description
propbankSenseID String A PropBank sense, e.g. eat.01

Request Example

http://verbatlas.org/api/verbatlas/align/sense?propbankSenseID=eat.01

Response

{ "va_frame_id": "va:0051f", "va_frame_name": "EAT_BITE" }

PropBank to VerbAtlas: semantic roles mapping

Given a PropBank predicate sense (e.g. eat.01) it returns the mapping from its PropBank semantic roles to the corresponding VerbAtlas semantic roles.

Method

GET or POST

URL

/api/verbatlas/align/roles?propbankSenseID=propbankSenseID

Parameters

Name Type Description
propbankSenseID String A PropBank sense, e.g. eat.01

Request Example

http://verbatlas.org/api/verbatlas/align/roles?propbankSenseID=eat.01

Response

{ "A0": "Agent", "A1": "Patient" }