Rosette API

Rosette is an API for multilingual text analysis and information extraction. More information can be found at < https://developer.rosette.com>.


This is the Rosette API client binding for R.

Install the module with: install.packages('rosetteAPI'), which will pull the release from CRAN

OR (recommended), since CRAN is potentially behind the latest release, due to the hurdles one must traverse in order to publish, install from GitHub using install_github("rosette-api/r-binding")

Command line example:

$ R -e 'install.packages("devtools")
$ cat > installrosette.R << EOF
> install_github("rosette-api/r-binding")
> q()
> EOF
$ R --no-save < installrosettte.R
library(rosetteApi)
library(jsonlite)
 
parameters <- list()
parameters[[ "contentUri" ]] <- "http://www.onlocationvacations.com/2015/03/05/the-new-ghostbusters-movie-begins-filming-in-boston-in-june/"
 
result <- api("0123456789", "categories", parameters)
# result is a list containing content and headers in native R.  Use jsonlite::toJSON to convert to JSON format.
print(jsonlite::toJSON(result$content, pretty = TRUE)
ParameterEndpointRequired
contentcategories, entities, language, morphology, relationships, sentences, sentiment, tokens, syntax_dependenciesEither content or contentUri required
contentUricategories, entities, language, morphology, relationships, sentences, sentiment, tokens, syntax_dependenciesEither content or contentUri required
languagecategories, entities, language, morphology, relationships, sentences, sentiment, tokens, name similarityNo
documentFilecategories, entities, language, morphology, relationships, sentences, sentiment, tokensNo
name1name similarityYes
name2name similarityYes
namename translationYes
targetLanguagename translationYes
entityTypename translationNo
sourceLanguageOfOriginname translationNo
sourceLanguageOfUsename translationNo
sourceScriptname translationNo
targetScriptname translationNo
targetSchemename translationNo
optionsrelationshipsNo
accuracyModerelationshipsYes
explainsentimentNo
morphologymorphologyYes

A Docker image for running the examples against the compiled source library is available on Docker Hub.

Command: docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-r

Additional environment settings: -e ALT_URL=<alternative URL> -e FILENAME=<single filename>

See Rosette API site

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rosetteApi")

1.5.0 by Chris Park, 2 months ago


https://developer.rosette.com


Report a bug at https://developer.rosette.com/support-ticket


Browse source code at https://github.com/cran/rosetteApi


Authors: Sam Hausmann [aut, cre], Chris Park [ctb], Hannah Gaudet [ctb]


Documentation:   PDF Manual  


Task views: Web Technologies and Services


file LICENSE license


Imports httr, jsonlite

Suggests knitr, rmarkdown, testthat


See at CRAN