The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
An R package to process text with the Receptiviti API.
A Python package is also available at Receptiviti/receptiviti-python.
Download R from r-project.org, then install the package from an R console:
Release (version 0.2.0)
install.packages("receptiviti")
Development (version 0.2.1)
# install.packages("remotes")
::install_github("Receptiviti/receptiviti-r") remotes
And load the package:
library(receptiviti)
# score a single text
<- receptiviti("a text to score")
single
# score multiple texts, and write results to a file
<- receptiviti(c("first text to score", "second text"), "filename.csv")
multi
# score texts in separate files
## defaults to look for .txt files
<- receptiviti(dir = "./path/to/txt_folder")
file_results
## could be .csv
<- receptiviti(
file_results dir = "./path/to/csv_folder",
text_column = "text", file_type = "csv"
)
# score texts in a single file
<- receptiviti("./path/to/file.csv", text_column = "text") results
To access the API, you will need to load your key and secret, as found on your dashboard.
You can enter these as arguments in each function call, but by default they will be looked for in these environment variables:
RECEPTIVITI_KEY="32lettersandnumbers"
RECEPTIVITI_SECRET="56LettersAndNumbers"
You can store these in your R environment file permanently:
# opens ~/.Renviron; after editing, save and restart R
::edit_r_environ() usethis
Or set them temporarily:
Sys.setenv(
RECEPTIVITI_KEY = "32lettersandnumbers",
RECEPTIVITI_SECRET = "56LettersAndNumbers"
)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.