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. Install this SDK using pip:
    pip install texterra
  2. You can use pydoc to get help on the package:
    pydoc texterra
    and check the documentation of methods:
    pydoc texterra.api
  3. To use Texterra API, import the package and use your API key to create an access object:
    import texterra
    t = texterra.API('YOURKEY')
  4. To access different tools, simply call the corresponding method:
    tags = t.pos_tagging('Hello World')
  5. Methods also accept iterables:
    tagged_sents = t.pos_tagging(['Flat is better than nested.', 'Now is better than never.'])

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