Currently ISPRAS API provides software development kits for 2 languages: Python and Ruby. All are alpha versions.

Applications written in other programming languages should use HTTP REST API directly.

How to install and use it

  1. Download it, extract and run
    python setup.py install
  2. You can use pydoc to list available services
    pydoc ispras
    and check methods for each service
    pydoc ispras.texterra
  3. To use any service of ISPRAS API in your project, import subclass of module
    from ispras import texterra
  4. Now you can create an access object using your Apikey
    t = texterra.API('YOURKEY')
    # You can specify service name and version:
    t = texterra.API('YOURKEY', 'texterra', 'v3.1')
  5. To access different tools just call corresponding method
    doc = t.posTaggingAnnotate('Hello World') 
    # You can also invoke Texterra with custom request: 
    result = t.customQuery(path, query) # for GET request 
    result = t.customQuery(path, query, form) # for POST request
  6. Methods return dictionary, so you can navigate through it according to API Documentation
    for an in doc['annotations']['pos-token']:
            print(an['text'], an['value'])

How to install and use it

  1. Use
    gem install ispras-api
  2. To use any service of ISPRAS API in your project, use
    require 'ispras-api'
  3. Now you can create an access object using your Apikey
    t = TexterraAPI.new 'APIKEY', 'texterra', 'v3.1'
  4. To access different tools just call corresponding method
    doc = t.pos_tagging_annotate 'Hello World'
    # You can also invoke Texterra with custom request:
    result = t.custom_query path, query # for GET request
    result = t.custom_query path, query, form # for POST request
  5. Methods return hash, so you can navigate through it according to API Documentation
    doc[:annotations][:'pos-token'].each do |an|
        puts an[:annotated_text], an[:value]
    end