Type: | Package |
Title: | 'Rosette' API |
Version: | 1.14.4 |
Date: | 2020-06-17 |
Description: | 'Rosette' is an API for multilingual text analysis and information extraction. More information can be found at https://developer.rosette.com. |
License: | Apache License 2.0 | file LICENSE |
Depends: | R (≥ 3.1.0) |
Imports: | httr, jsonlite |
Suggests: | knitr, rmarkdown, testthat |
URL: | https://developer.rosette.com |
BugReports: | https://developer.rosette.com/support-ticket |
VignetteBuilder: | knitr |
RoxygenNote: | 7.1.0 |
NeedsCompilation: | no |
Packaged: | 2020-06-17 16:51:09 UTC; rstudio |
Author: | Chris Park [aut], Sam Hausmann [aut], Hannah Gaudet [ctb], Ian Redpath [ctb], Seth Gransky [ctb, cre], Basis Technology Corp. [cph] |
Maintainer: | Seth Gransky <seth@basistech.com> |
Repository: | CRAN |
Date/Publication: | 2020-06-17 23:00:02 UTC |
api wrapper function that checks for a user_key and determines the Rosette API endpoint to be utilized
Description
api wrapper function that checks for a user_key and determines the Rosette API endpoint to be utilized
Usage
api(
user_key,
endpoint,
parameters = FALSE,
custom_headers = NULL,
url_parameters = NULL,
url = "https://api.rosette.com/rest/v1/"
)
Arguments
user_key |
- Rosette API authentication key |
endpoint |
- Rosette API endpoint to be utilized |
parameters |
- parameters list to be passed to specified Rosette API endpoint |
custom_headers |
- custom headers for Rosette Api |
url_parameters |
- query parameters |
url |
- url for Rosette Api |
Value
Returns a list(content, header)
Examples
## Not run:
parameters <- list()
parameters[[ "content" ]] <- "Bill Murray will appear in new Ghostbusters
film."
response <- api(01234567890, "entities", parameters)
# The call above returns response$content and response$header
## End(Not run)
preemptive check for address-similarity request parameter errors
Description
preemptive check for address-similarity request parameter errors
Usage
check_address_parameters(parameters)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
Value
Returns list of verified parameters to be sent to Rosette API
preemptive check for content/contentUri request parameter errors
Description
preemptive check for content/contentUri request parameter errors
Usage
check_content_parameters(parameters)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
Value
Returns list of verified parameters to be sent to Rosette API
check if the required request parameters for name deduplication are correct
Description
check if the required request parameters for name deduplication are correct
Usage
check_deduplication(parameters, endpoint)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
endpoint |
- Rosette API endpoint to be utilized |
Value
Returns list of verified parameters to be sent to Rosette API
Helper to check for file submission
Description
Helper to check for file submission
Usage
check_for_multipart(parameters)
Arguments
parameters |
- JSON parameters |
Value
true if multipart
determine which morphology endpoint to use
Description
determine which morphology endpoint to use
Usage
check_morphology(parameters, endpoint)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
endpoint |
- Rosette API endpoint to be utilized |
Value
Returns the specified morphology function
check if the required request parameters for either names endpoint are correct
Description
check if the required request parameters for either names endpoint are correct
Usage
check_names(parameters, endpoint)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
endpoint |
- Rosette API endpoint to be utilized |
Value
Returns list of verified parameters to be sent to Rosette API
create a multipart
Description
create a multipart
Usage
create_multipart(parameters)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
Value
Returns a multipart
check if Rosette API response includes and error message
Description
check if Rosette API response includes and error message
Usage
error_check(response)
Arguments
response |
- response from Rosette API |
Value
Returns an error if one exists or the Rosette API response
Provides the binding Version
Description
Provides the binding Version
Usage
get_binding_version()
Value
current binding version
httr::GET request to specified Rosette API endpoint
Description
httr::GET request to specified Rosette API endpoint
Usage
get_endpoint(
user_key,
endpoint,
url,
custom_headers = NULL,
url_parameters = NULL
)
Arguments
user_key |
- Rosette API authentication key |
endpoint |
- Rosette API endpoint to be utilized |
url |
- url for Rosette Api |
custom_headers |
- custom headers for Rosette Api |
url_parameters |
- url query parameters |
Value
Returns the Rosette API response
Helper to combine custom headers with the default ones
Description
Helper to combine custom headers with the default ones
Usage
get_headers(user_key, content_type = "application/json", custom_headers = NULL)
Arguments
user_key |
- Rosette API authentication key |
content_type |
- Header Content-Type |
custom_headers |
- custom headers for the Rosette API |
Value
Returns the combined h
httr::POST request to specified Rosette API endpoint
Description
httr::POST request to specified Rosette API endpoint
Usage
post_endpoint(
user_key,
parameters,
endpoint,
url,
custom_headers = NULL,
url_parameters = NULL
)
Arguments
user_key |
- Rosette API authentication key |
parameters |
- parameters list to be passed to specified Rosette API endpoint |
endpoint |
- Rosette API endpoint to be utilized |
url |
- url for Rosette Api |
custom_headers |
- custom headers for Rosette Api |
url_parameters |
- query parameters |
Value
Returns the Rosette API response
serialize address-similarity parameters
Description
serialize address-similarity parameters
Usage
serialize_address_params(parameters)
Arguments
parameters |
- parameters list to be passed to address-similarity |
Value
Returns the serialized parameters for the Rosette API
serialize Rosette API parameters
Description
serialize Rosette API parameters
Usage
serialize_name_deduplication_parameters(parameters)
Arguments
parameters |
- parameters list to be passed to name-deduplication |
Value
Returns the serialized parameters for the Rosette API
serialize Rosette API parameters
Description
serialize Rosette API parameters
Usage
serialize_name_parameters(parameters)
Arguments
parameters |
- parameters list to be passed to either name-translation or name-similarity |
Value
Returns the serialized parameters for the Rosette API
serialize Rosette API parameters
Description
serialize Rosette API parameters
Usage
serialize_parameters(parameters)
Arguments
parameters |
- parameters list to be passed to specified Rosette API endpoint |
Value
Returns the serialized parameters for the Rosette API