Learn R Programming

googlenlp (version 0.2.0)

analyze_entities: analyze_entities

Description

Send a request, and retrieve the entities and language responses. This function retrieves the results from the analyzeEntities method.

Usage

analyze_entities(text_body, flatten = TRUE)

Arguments

text_body

The text string to send to the API.

flatten

If TRUE (default), then the results of each method are flattened and converted to a data frame.

Value

A list containing two elements: entities and language.

If flatten is TRUE, then the entities element is converted to a data frame.

Examples

Run this code
# NOT RUN {
sample_entities <- analyze_entities(text_body = "Google, headquartered in Mountain View, unveiled
                                       the new Android phone at the Consumer Electronic Show.
                                       Sundar Pichai said in his keynote that users love
                                       their new Android phones.",
                                    flatten = TRUE)
sample_entities$entities
sample_entities$language
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab