Home Technical Overview Tanl Pipeline API

Service

RESTful web API to use Tanl pipeline service.
To use this service, you need a valid access token, which can be obtained via Google or Facebook services.
You can submit a request to process a file with the pipeline.
You can select which stage of the pipeline and which output format to use selecting the following parameters.

Parameters

'token'
Access Token
'service'
'tok' | 'pos' | 'ner' | 'sst' | 'parser'
'email'
email address
'authentication'
'facebook' | 'google'
'file'
text file
'format'
'plain'|'json'

Python Example

The service can be invoked programmatically. Here is an example of a Python script for invoking the service.
    
    import requests

    f = open('file.txt')
    data = {'token':'XXXXXXXXXXXXXXX', 'service':'parser', 'email':'email@gmail.com', 'authentication':'facebook', 'format':'plain'}
    r = requests.post(url='http://tanl.di.unipi.it/it/api', data=data, files = {'file':f})
    print r.text.encode('utf-8')
    
  

Obtaining an Access Token