The ArguAna web service is an interface to the argumentation analysis engine. The input of the service is a text that serves an authors opinion about a specific product. The result contains all extracted linguistic units like sentences, statements, entities and tokens, as well as sentiment information. In addition, different kinds of relations among these units are repesented.

JavaScript Library

In order to request the ArguAna web service from arbitrary web site we provide a JavaScript library. Since this library depends on jQuery you have to import that library as well. Please add the following lines into your HTML document.

<script type="text/javascript" src=""></script>
<script type="text/javascript" src="http://this-host/this-path/arguana-client.js"></script>

Query Format

The service can be queried via HTTP POST to submit the input text. The format in JSON is defined as follows:

{ "text" : string }

Query the Service

A call to the ArguAna service is a one-liner and looks as follows:

<script type="text/javascript">
  Arguana.analyze(query, onComplete, onSuccess, onError);
where onComplete, onSuccess, and onError are callbacks with the following signatures:
onComplete( [ data|jqXHR [, textStatus [, jqXHR|errorThrown ]]] ) {...}
onSuccess( [ data [, textStatus [, jqXHR ]]] ) {...}
onError( [ jqXHR [, textStatus [, errorThrown ]]] ) {...}
The callbacks are invoked in the same order as listed above. For callbacks you don't need you have to pass null explicitly. The first object named data contains the actual result whose format is described in the next section. For more information about the other arguments, please have a look at The jqXHR Object of the jQuery library. Let's present a more complete example to demonstrate the usage of the library:
<textarea id="text">Some input text.</textarea>
<script type="text/javascript">
  function onComplete() { alert("Complete"); }
  function onSuccess(data) { alert("Success: "  + JSON.stringify(data)); }
  function onError(jqXHR) { alert("Error: " + JSON.stringify(jqXHR)); }
  var query = { text : $("#text").val() };
  Arguana.analyze(request, onComplete, onSuccess, onError);

Note that this JavaScript executes automatically when rendering the HTML document. In general you have to bind your code to the on-click event of some button. For more information take a look at the ArguAna demo.

Result Format

The structure of the result object is defined as follows:

  // Generic

  "error"    : string,    // Some server-side error message, e.g. "Unsupported language"
  "domain"   : string,    // The domain of the processing pipeline
  "language" : string,    // The detected language of the input text
  "runtime"  : number,    // The server-side analysis runtime in milliseconds.
  // Linguistic Units
  "sentiment" : {
    "id"       : number,  // The sentiment id
    "polarity" : string,  // Overall polarity (positive, negative, objective)
    "score"    : number   // Overall score (1.0 .. 5.0)
  "sentences" : [{        // All sentences of the text
    "id"       : number,  // The sentence id
    "begin"    : number,  // Begin of sentence
    "end"      : number   // End of sentence
  "statements" : [{       // All statements of the text
    "id"       : number,  // The statement id
    "begin"    : number,  // Begin of statement
    "end"      : number,  // End of statement
    "polarity" : string   // positive, negative, objective
  "entities" : [{         // All entities of the text
    "id"    : number,     // The entity id
    "begin" : number,     // Begin of entity
    "end"   : number,     // End of entity
    "type"  : string      // The entity type
  "tokens" : [{           // All tokens of the text
    "id"     : number,
    "begin"  : number,
    "end"    : number,
    "pos"    : string,
    "lemma"  : string,
    "chunk"  : string,
    "stem"   : string,
    "morph"  : string,
    "parent" : number,    // Refers to a token id which is the parent in the dependency parse tree
    "role"   : string     // Specifies the role of the token in the dependency parse tree
  // Relations
  "relations" : [{        // All detected relations
    "type" : string       // Specifies the type of the relation
    "ids"  : [ number ],  // Array of ids participating in the relation
  // Explanation Graph
  "dependencies" : [{     // Array of directed edges in the explanation graph
    "from" : number       // Refers to an arbitrary id whose element is the starting point
    "to"   : number,      // Refers to an arbitrary id whose element is the end point


Linguistic Units

Linguistic units are meaningful text elements that are detected during the execution of the ArguAna processing pipeline. We distinguish the following units: Important Note: The id member in sentences, statements, entities and tokens are unique. That means there is no id that is used twice, e.g. for a sentence and a statement. Given an id there is only one associated element of some information type. The uniqueness is an important feature when rendering the explanation graph.


Explanation Graph

ArguAna Demo

A simple client of the ArguAna service where you can paste and submit some text to investigate the returned data can be tried here.