Git Product home page Git Product logo

r-binding's Introduction

Build Status

rosette-api

This is the Rosette API client binding for R.

Getting Started

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
> library(devtools)
> 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, please check for its 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" ]] <- "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)

API Parameters

Parameter Endpoint Required
content categories, entities, language, morphology, relationships, sentences, sentiment, tokens, syntax/dependencies, transliteration (Yes) 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, 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

Additional Information

See Rosette API site

r-binding's People

Contributors

samhausmann avatar cp2boston avatar lauren12292 avatar hgaudet avatar seth-mg avatar bwsawyer avatar kbailey-basistech avatar

Watchers

James Chang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.