Fred: REST APIs

FRED is a tool for automatically producing RDF/OWL ontologies and linked data from natural language sentences. The method is based on Combinatory Categorial Grammar, Discourse Representation Theory, Linguistic Frames, and Ontology Design Patterns. Results are enriched with NER and WSD.

TODO: list of references to papers on FRED.

REST APIs



  • Accept: The Accept request-header field can be used to specify the desired media type for the response. Content types available are:
    • text/html
    • text/plain
    • application/json
    • application/rdf+xml
    • text/turtle
    • application/x-turtle
    • text/rdf+n3
    • image/png
    • i.e. ~$ curl -G -X GET -H "Accept: text/turtle" [...] URL
           ~$ curl -G -X GET -H "Accept: application/rdf+xml" [...] URL
           ~$ curl -G -X GET -H "Accept: application/json" [...] URL
           ~$ curl -G -X GET -H "Accept: image/png" [...] URL
  • Mandatory parameters:
    • text: the textual sentence which you want to submit to FRED.
    • i.e. ~$ curl -G -X GET -H "Accept: text/turlte" --data-urlencode text="Miles Davis was an american jazz musician" [...] URL
  • Optional parameters:
    • prefix: the prefix used for the namespace of terms introduced by FRED in the output
      • default value: fred
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d prefix="pfx:" [...] URL
    • namespace: the namespace used for terms introduced by FRED in the output
      • default value: http://www.ontologydesignpatterns.org/ont/fred/domain.owl#
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d namespace="http://www.example-ontology.org/domain#" [...] URL
    • wsd: it allows FRED to provide alignments to WordNet synsets, WordNet Super-senses and Dolce classes derived from the word-sense disambiguation of an input sentence
      • true: Word-sense disambiguation is performed;
      • false: Word-sense disambiguation is not performed;
      • default value: false
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d wsd="true" [...] URL
    • tense: it includes temporal relations between events according to their grammatical tense
      • true: it includes temporal relations between events according to their grammatical tense;
      • false: it does not include temporal relations between events according to their grammatical tense;
      • default value: false
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d tense="true" [...] URL
    • roles: this parameter allows to use FrameNet roles into the resulting ontology
      • true: FrameNet roles are used;
      • false: FrameNet roles are not used. In their place VerbNet roles are used;
      • default value: false
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d roles="true" [...] URL
    • semantic-subgraph: this parameter allows to generate an OWL ontology which only expresses the semantics of a sentence without additional RDF triples, such as those containing text spans, part-of-speeches, etc.
      • true: only the semantic-subgraph is returned;
      • false: the complete graph is returned
      • default value: false
      i.e. ~$ curl -G -X GET -H "Accept: text/turtle" --data-urlencode text="Miles Davis was an american jazz musician" /
              -d semantic-subgraph="true" [...] URL

Powered by

K~tools Tagme Apache Stanbol C&C tools