flatten_sentences: Flatten sentences

Description Usage Arguments Value Examples

View source: R/flatten.R

Description

Convert the JSON/list sentences response into a flattened data frame.

Usage

1
flatten_sentences(sentences_list)

Arguments

sentences_list

The sentences component of the API response.

Value

A flattened data frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
sample_post <- gcnlp_post(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.",
                          extract_syntax = TRUE,
                          extract_entities = TRUE,
                          extract_document_sentiment = TRUE)

flatten_sentences(sentences_list = sample_post$content$sentences)

## End(Not run)

BrianWeinstein/googlenlp documentation built on May 6, 2019, 8:47 a.m.