View source: R/text_preprocessing.R
extract_topics | R Documentation |
This function implements a simple non-negative matrix factorization (NMF) approach to topic modeling, without requiring additional packages.
extract_topics(
text_data,
text_column = "abstract",
n_topics = 5,
max_terms = 10,
n_iterations = 50,
seed = NULL
)
text_data |
A data frame containing the text data |
text_column |
Name of the column containing the text |
n_topics |
Number of topics to extract |
max_terms |
Maximum number of terms per topic to return |
n_iterations |
Number of iterations for the NMF algorithm |
seed |
Optional seed for reproducibility. If NULL, no seed is set. |
A list containing topic-term and document-topic matrices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.