Project

ispras-api

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
This is Ruby wrapper for REST API provided by ISPRAS. More info at https://api.ispras.ru/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 5.6
~> 10.4

Runtime

~> 0.13
~> 2.6
 Project Readme

Ruby wrapper for ISPRAS API

Installation

It's simple gem, so gem install ispras-api and adding gem 'ipras-api' should work.

Usage

Currently wraps texterra and twitter-nlp services, so apikey for any of those is needed

Code should look similar to this:

require 'ispras-api'

texterra = TexterraAPI.new 'APIKEY'
text = 'Apple today updated iMac to bring numerous high-performance enhancements to the leading all-in-one desktop.'

key_concepts = texterra.key_concepts text
puts key_concepts[0]
# > {:id=>"21492980", :kbname=>"enwiki", :title=>"IMac", :weight=>"0.35956284403800964"}

wiki_url = texterra.get_attributes('21492980:enwiki', 'url(en)')[:elements][:object][:attributes][:i_attribute][:url]
# > "http://en.m.wikipedia.org/wiki/IMac" 

Don't forget to check REST documentation