textTopicsReduce (EXPERIMENTAL)
Usage
textTopicsReduce(
data,
data_var,
n_topics = 10,
load_path = "./results",
save_dir,
embedding_model = "default"
)
Arguments
- data
(tibble/data.frame) A tibble with a text-variable to be analysed, and optional numeric/categorical variables that you might want to use for later analyses testing the significance of topics in relation to these variables.
- data_var
(string) Name of the text-variable in the data tibble that you want to perform topic modeling on.
- n_topics
(string) The dimension reduction algorithm, currently only "default" is supported.
- load_path
(string) The clustering algorithm to use, currently only "default" is supported.
- save_dir
(string) The directory for saving results.
- embedding_model
(string) Name of the embedding model to use such as "miniLM", "mpnet", "multi-mpnet", "distilroberta".
Value
A folder containing the model, data, folder with terms and values for each topic, and the document-topic matrix. Moreover the model itself is returned formatted as a data.frame together with metdata.
See also
See textTopics
textTopicsTest
and textTopicsWordcloud
.