topic_model_LDA: Create topic models using LDA

Description Usage Arguments See Also Examples

Description

Divide collection of text into their natural groups. Get the most informative terms by a specificed number of topics, using LDA method. Please process your text column first i.e. remove stop words etc. prior to calling this function.

Usage

1
2
topic_model_LDA(input_text, plot = T, number_of_topics = 4,
  number_of_top_terms_by_themes = 10)

Arguments

input_text

should be a text columm from a dataframe

plot

return a plot? TRUE by defult

number_of_topics

number of topics/themes to return (4 by default)

number_of_top_terms_by_themes

number of words per theme

See Also

LDA

Examples

1
2
3
4
5
6
7
## Not run: 
data("text_data")
top_terms_by_topic_LDA(verbatim$text,number_of_topics = 5)
verbatim %>% filter(NPS_RATING %in% c("Detractor")) %>%
select(text) %>% top_terms_by_topic_LDA(.,number_of_topics = 5)

## End(Not run)

fahadshery/textsummary documentation built on May 6, 2019, 7:02 p.m.