Difference between revisions of "Executing Services"

From Textserver wiki
Jump to: navigation, search
Line 1: Line 1:
=== Interactive and Batch requests ===
+
== Interactive and Batch requests ==
  
 
Services can be called in two ways: Manually via a browser web interface, or programmatically via a client program running on your side. See below for details on each of them.
 
Services can be called in two ways: Manually via a browser web interface, or programmatically via a client program running on your side. See below for details on each of them.
Line 26: Line 26:
  
  
=== Submitting Jobs via a Remote Client ===
+
== Submitting Jobs via a Remote Client ==
  
 
TextServer becomes most useful when used from a remote client. This allows you to integrate into your application the results of our language analyzers.
 
TextServer becomes most useful when used from a remote client. This allows you to integrate into your application the results of our language analyzers.

Revision as of 16:44, 19 January 2016

Interactive and Batch requests

Services can be called in two ways: Manually via a browser web interface, or programmatically via a client program running on your side. See below for details on each of them.

Both ways allow submitting either interactive or batch requests.

Interactive requests are served immediately (or an error is returned if it is not possible to attend the request). The client is blocked until the end of the request. Interactive requests are intended for analyzing relatively short documents where processing time is a vital factor.

Batch requests are queued and processed as soon as possible. The client receives a job id code that can be used later to retrieve the results of the processing. Batch requests are intended to analyze long documents or large multidocument collections, or when processing time is not a vital factor.


Batch requests take as input ZIP files containing one or more plain text files. Interactive requests take as input plain text (in a form text box) or a single plain text file.


Submitting Jobs via Web Browser

A registered user can submit a text for analysis from the "Execute" form in the Service Catalog. The form will require the user to select the type of request (Interactive/Batch), to provide the service parameters (e.g. language, desired output format...), and the text to be analyzed (either writting it in a text box or uploading a file).

When clicking "Execute" the request will be sent. If it is a batch request, the user will get a job id for later result retrieval. If it is an interactive request, the user will get a file in the desired output format (XML, json, etc.)


Submitting Jobs via a Remote Client

TextServer becomes most useful when used from a remote client. This allows you to integrate into your application the results of our language analyzers.

To call TextServer services from a remote client you need a program that sends a POST request with the right parameters to the right URL. Since this is easier to say than to do, we provide a set of example clients you can use as a basis to write your own.