knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Project Status: Abandoned – Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development.

Main points: Main functions all work, You only have to put your api key in .Renviron and corticalio will find it and use it in all calls. The bulk functions of the api do not yet work. I can't get the images to work and I haven't found a usefull way to transform the sparse matrix return in json format into a matrix object that is useful within R. Since I do not intend to continue this project, feel free to fork and also feel free to contact me. I will react to issues.

packageversion Last-changedate CRAN_Status_Badge minimal R version

Basic idea is to use the Cortical.io API from within R. Call all the endpoints from a function. Result is always a useful data frame or other result.

Got the basic functionality fixed.

Working

[x] - Term endpoint, GET 3 of the 3 types with response [x] - basic api key function that finds the correct key in Renviron or asks you for one. [x] - retina endpoint GET one function (not that usefull per se, could be used for demo purpose) [x] - 5 of the 6 text inputs

TODO

[] default in every call to search for token, if not found, give error: make it that api_key = NULL, so it can be used. but defaults to key <- api_key(api) So that internally the api search is called. if the api key is not null use the one provided. don't do anything else.

[] create parsers for every type of output to dataframe.

[] find a way to handle the retina returns. parse to sparse matrix.

[] bulk post to text.

Background information

according to website: cortical.io WARNING a lot of BIG data terms and buzzwords.

In short, the Retina is a sparse distributed semantic space (also referred to as Distributional Memory [Baroni2010]).

api has two types of retinas "retinaName": "en_synonymous","An English language retina focusing on synonymous similarity.", and "retinaName": "en_associative", "description": "An English language retina balancing synonymous and associative similarity."

HTTP Status Code Reason 200 Indicates a successful operation. 404 Indicates that the resource was not found. Returns a JSON object with a detailed error message and a description of a possible resolution.

REST API

The API endpoints related to term input are:

terms retrieve semantic representation for a term

"http://api.cortical.io/rest/terms?retina_name=en_associative&term=computer&start_index=0&max_results=10&get_fingerprint=false" terms/similar_terms get similar terms for a term "http://api.cortical.io/rest/terms/similar_terms?retina_name=en_associative&term=apple&start_index=0&max_results=10&pos_type=NOUN&get_fingerprint=false" terms/contexts get contexts for a term "http://api.cortical.io/rest/terms/contexts?retina_name=en_associative&term=apple&start_index=0&max_results=5&get_fingerprint=false"



RMHogervorst/corticalio documentation built on May 8, 2019, 7:33 a.m.