Skip to content
/ R2R Public

R2R: RST to RDF a docker service to parse a plain document and produce RDF with RST semantics

Notifications You must be signed in to change notification settings

ccolonna/R2R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===============
R2R: RST to RDF
===============

R2R produces RDF annotated according to RST owl semantics at https://github.com/Christian-Nja/rst-ontology

The following application is deployed as multi-service docker container.

To install it do:

$ git clone <repository>
$ cd r2r
$ docker-compose build

# to launch the service

$ docker-compose run

*************
* ATTENTION: You need docker-compose and docker on your machine
*****

The container exposes a Flask Api listening on localhost:5050

To parse a file do:

curl -X POST -F "input=@<plain_file>" -F "doc=<doc_number> -F "ns=<namespace>" -F "ext=xml" -F "s=0.8" http://localhost:5050/rst 

OPTIONAL PARAMETERS:
	doc : the doc parsed number to be append to namespace (use this with a counter if your parsing a corpora). [default = 1]
	ns  : namespace. [default = https://w3id.org/stlab/fred/rst/data/]
	ext : rdf serialization format [default=n3]
	s   : saliency treshold for facts endpoint. Extract all the facts with saliency score greater than s [default=0.7]

================================================
*************
*	    *
* ENDPOINTS * 
*           *
*************

/rst       =>  " returns RDF graph according to RST semantics "
/fred      =>  " returns RDF graph according to FRED semantics "
/bridge    =>  " returns bridge RDF graph between RST semantics and FRED semantics
/saliency  =>  " returns discourse segments with relative saliency score and saliency color according to a binary blue-red gradient
/facts     =>  " a simple example to extract important facts: return Event, Agent and Patient"

About

R2R: RST to RDF a docker service to parse a plain document and produce RDF with RST semantics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published