Description Usage Arguments Value See Also Examples
Given input text, returns a probability distribution over the political alignment of the speaker.
1 |
text |
text for analysis |
local.api |
logical, whether use local or remote API |
List with party probability pairs
1 2 3 4 5 6 7 8 | affilation <- political("I am so proud to stand here today
as Prime Minister of four nations
in one United Kingdom.")
affilation
most.like <- names(affilation[which.max(unlist(affilation))])
least.like <- names(affilation[which.min(unlist(affilation))])
cat(sprintf("This text is most like %s and least like %s",
most.like, least.like))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.