Learn R Programming

cognizer (version 0.0.1)

text_tone: IBM Tone Analyzer of Text

Description

Infers three types of tone - emotion, language, social - from the whole text or at sentense level.

Usage

text_tone(text, userpwd, keep_data = "true", callback = NULL, content_type = "text/plain; charset=utf-8", version = "2016-05-19", tones = "", sentences = "true")

Arguments

text
Character vector.
userpwd
Character scalar that contains 'username:password' string.
keep_data
Character scalar specifying whether to share your data with Watson services for the purpose of training their models.
callback
Function that can be applied to responses to examine http status, headers, and content, to debug or to write a custom parser for content. The default callback parses content into a data.frame while dropping other response values to make the output easily passable to tidyverse packages like dplyr or ggplot2. For further details or debugging one can pass a fail or a more compicated function.
content_type
Characte scalar specifying the HTTP header with type of text and its encoding.
version
Character scalar that specifies the data of most recent version of the algorithm.
tones
Character scalar that allows selecting one the three possible tones: emotion, language, social.
sentences
Character scalar specifying whether to do analysis at the sentence level.

Value

Data.frame containing parsed content in a tidy fashion.

See Also

Check http://www.ibm.com/watson/developercloud/doc/tone-analyzer/ for further documentation, and https://tone-analyzer-demo.mybluemix.net/?cm_mc_uid=70865809903714586773519&cm_mc_sid_50200000=1468424667 for a web demo.