get_text: Get a Text Stored in Various Objects

Description Usage Arguments Value Examples

View source: R/get_text.R

Description

Extract the text supplied to the term_count object.

Usage

1
2
3
4
get_text(x, ...)

## S3 method for class 'term_count'
get_text(x, ...)

Arguments

x

A term_count object.

...

term_count tags.

Value

Returns a vector or list of text strings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(dplyr)

discoure_markers <- list(
    response_cries = c("\\boh\\b", "\\bah\\b", "\\baha", "\\bouch", "yuk"),
    back_channels = c("uh[- ]huh", "uhuh", "yeah"),
    summons = "\\bhey",
    justification = "because"
)

model <- presidential_debates_2012 %>%
    with(term_count(dialogue, grouping.var = TRUE, discoure_markers))

get_text(model, 'summons')
get_text(model, 'response_cries')
get_text(model, c('summons', 'response_cries'))

trinker/termco documentation built on Jan. 7, 2022, 3:32 a.m.