trinker / termco

Regular Expression Counts of Terms and Substrings
Other
25 stars 5 forks source link

plot term_count to include `token_count` and `combine_counts` #40

Closed trinker closed 7 years ago

trinker commented 7 years ago

Should not include tokens but does.

token_list <- list(
    list(
        person = c('sam', 'i')
    ),
    list(
        place = c('here', 'house'),
        thing = c('boat', 'fox', 'rain', 'mouse', 'box', 'eggs', 'ham')
    ),
    list(
        no_like = c('not like'),
        thing = c('train', 'goat')
    )
)

(y <- token_count(sam_i_am, grouping.var = TRUE, token.list = token_list))

term_list <- list(
    list(Is = c("I")),
    list(
        oulds = c("ould"),
        thing = c('egg', 'ham')
    )
)

(x <-term_count(sam_i_am, grouping.var = TRUE, term_list, ignore.case = FALSE))

plot(combine_counts(x, y))