flatten_tokens {googlenlp}R Documentation

Flatten tokens

Description

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

Usage

flatten_tokens(tokens_list)

Arguments

tokens_list

The tokens component of the API response.

Value

A flattened data frame.

Examples

## 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_tokens(tokens_list = sample_post$content$tokens)

## End(Not run)


[Package googlenlp version 0.2.0 Index]