Skip to contents

A function within the explore object that is used for finding highest beta terms within each topic

Usage

top_terms_segmentr(lda, type = c("lollipops", "bars"), top_n = 15, nrow = 2)

Arguments

lda

The LDA object made with fit_LDAs or par_fit_LDAs

type

Whether to render bars or lollis

top_n

How many of the most frequently used terms to include per topic

nrow

How many rows should the visualizations be plot across

Value

a ggplot object

Examples

lda <- SegmentR:::test_data(explore = FALSE)$lda$lda[[1]]
#> removing stopwords
#> Making DTMs
#> making tuning grid
#> setting up LDAs
lda %>% top_terms_segmentr(type = "lollipops")
#> $all_terms

#> 
#> $max_only

#> 
lda %>% top_terms_segmentr(type = "bars")
#> $all_terms

#> 
#> $max_only

#>