Welcome to the Rosette API suite of linguistic tools and services for R! With the Rosette API endpoints you can extract entities and relationships, translate and compare names, and analyze sentiment of documents and entities from large amounts of unstructured text.
Rosette can process one call at a time. You can send a second call once you have received a response from the first.
The maximum payload size is 600KB, with a maximum character count of 50,000.
Rosette uses API keys to allow access to the API. You can find your Rosette API key on our Developer Portal, or Sign Up for a new API key.
Visit our Features and Functions page for a more detailed look at the functionality of the Rosette API endpoints.
Parameter | Endpoint | Required |
---|---|---|
content | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, syntax/dependencies | Either content or contentUri required |
contentUri | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, syntax/dependencies | Either content or contentUri required |
language | categories, entities, language, morphology, relationships, sentences, sentiment, tokens, name similarity | No |
documentFile | categories, entities, language, morphology, relationships, sentences, sentiment, tokens | No |
name1 | name similarity | Yes |
name2 | name similarity | Yes |
name | name translation | Yes |
targetLanguage | name translation | Yes |
entityType | name translation | No |
sourceLanguageOfOrigin | name translation | No |
sourceLanguageOfUse | name translation | No |
sourceScript | name translation | No |
targetScript | name translation | No |
targetScheme | name translation | No |
options | relationships | No |
accuracyMode | relationships | Yes |
explain | sentiment | No |
shortString | sentiment | No |
morphology | morphology | Yes |
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 = 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)