'Rosette' API

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


Build Status

This is the Rosette API client binding for R.

Getting Started

Install the module thru CRAN:

install.packages('rosetteAPI')

There may be times when the latest version is not yet available on CRAN. In that case you can install from GitHub:

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

If the version you are using is not the latest from CRAN or GitHub, you can verify the compatibilty with api.rosette.com. If you have an on-premise version of Rosette API server, please contact support for binding compatibility with your installation.

To check your installed version:

> packageVersion("rosetteAPI")

Example using the Rosette API language detection endpoint

library(rosetteApi)
library(jsonlite)
 
parameters <- list()
parameters[[ "contentUri" ]] <- "https://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)

API Parameters

Parameter Endpoint Required
content categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics, syntax/dependencies, transliteration (Yes) Either content or contentUri required
contentUri categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics, syntax/dependencies Either content or contentUri required
language categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics, name similarity No
documentFile categories, entities, language, morphology, relationships, sentences, sentiment, tokens, topics No
name1 name similarity Yes
name2 name similarity Yes
name name translation Yes
targetLanguage name translation, transliteration (No) Yes
entityType name translation No
sourceLanguageOfOrigin name translation No
sourceLanguageOfUse name translation No
sourceScript name translation, transliteration No
sourceLanguage transliteration Yes
targetScript name translation, transliteration No
targetScheme name translation No
options relationships No
accuracyMode relationships Yes
explain sentiment No
morphology morphology Yes

Docker

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>

Documentation

View the latest documentation

Release Notes

See the wiki

Additional Information

See Rosette API site

News

rosetteApi 1.12.1 (2019-03-14)

  • New Similar Terms endpoint /semantics/similar
  • New Similar Terms example
  • /text-embedding endpoint changed to /semantics/vector
  • /text-embedding example changed to /semantics/vector example

rosetteApi 1.9.0 (2018-01-19)

  • New multilingual language example
  • User Agent now includes runtime version

rosetteApi 1.8.0 (2017-10-24)

  • New topics endpoint

rosetteApi 1.7.0 (2017-06-14)

  • New name_deduplication endpoint
  • New name_deduplication example
  • New transliteration endpoint
  • New transliteration example

rosetteApi 1.4.2 (2016-12-14)

  • Refactor of internal code
  • Modified api response to be a list(content, header)
  • Changed from rjson to jsonlite
  • Cleaned up examples
  • parameter argument is now a list and does not need to be converted to JSON

rosetteApi 1.4.1

  • Removed deprecated entities linked

rosetteApi 1.4.0

  • New syntax/dependencies endpoint
  • New syntax_dependencies example

rosetteApi 1.3.0

  • New text_embedding example

rosetteApi 1.2.0

  • New entities example
  • Removed entities linked example
  • Deprecated entites linked
  • Parameters serialized correctly

rosetteApi 1.0.1

  • Fixed small bug with NAMESPACE file and modified the README example

rosetteApi 1.0

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.12.1 by Seth Gransky, 7 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: Chris Park [aut] , Sam Hausmann [aut] , Hannah Gaudet [ctb] , Ian Redpath [ctb] , Seth Gransky [ctb, cre] , Basis Technology Corp. [cph]


Documentation:   PDF Manual  


Task views: Web Technologies and Services


Apache License 2.0 | file LICENSE license


Imports httr, jsonlite

Suggests knitr, rmarkdown, testthat


See at CRAN