political: Returns a probability distribution over the political...

Description Usage Arguments Value See Also Examples

Description

Given input text, returns a probability distribution over the political alignment of the speaker.

Usage

1

Arguments

text

text for analysis

version

for api version

...

additional arguments to passed to request

api_key

your personal indico API key

cloud

subdomain for indico private cloud

Value

List with party probability pairs

See Also

sentiment, language

Examples

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))

IndicoDataSolutions/IndicoIo-R documentation built on May 7, 2019, 6:37 a.m.