'BERTopic'-Style Topic Modeling Without 'Python'


[Up] [Top]

Documentation for package ‘Rhobots’ version 0.1.10

Help Pages

agglomerative_clustering Agglomerative (hierarchical) clustering
apply_mmr Refine topic representations with Maximal Marginal Relevance (MMR)
build_dtm Build a sparse document-term matrix from a character vector
classify_texts Classify or label texts with a fine-tuned BERT-family model
classify_texts.default Classify or label texts with a fine-tuned BERT-family model
classify_texts.hf_classifier Classify or label texts with a fine-tuned BERT-family model
cls_pool CLS-token pooling: extract the CLS hidden state as the sentence vector
cluster_docs Fit a clustering model and return cluster labels
compare_topics Compare topic prevalence across groups
cvalue_representation Construct a C-value representation model
cvalue_terms Compute C-value scores for candidate multi-word terms
c_tf_idf Class-based TF-IDF (c-TF-IDF) for cluster-level topic terms
dim_project Project new data using a fitted dimensionality-reduction model
dim_reduce Fit a dimensionality-reduction model and return the reduced matrix
embed_texts Embed a vector of texts to a numeric matrix
embed_texts.api_embedder Embed a vector of texts to a numeric matrix
embed_texts.bert_encoder Embed a vector of texts to a numeric matrix
embed_texts.default Embed a vector of texts to a numeric matrix
embed_texts_cached Compute or load document embeddings from a cache file
find_topics Find topics most similar to a search term
fit_bertopic Fit a BERTopic-style topic model
fit_topics_over_time Fit independent BERTopic models per time period and align topics
get_document_info Get document-level topic assignments as a data frame
get_representative_docs Get representative documents for one or all topics
get_stopwords Return the built-in stopword list for a language
get_topic Get term-score representation for a single topic
get_topics Get all topic-term representations
get_topic_info Get topic-level metadata as a data frame
guided_fit_bertopic Guided topic modeling with user-supplied seed words
hdbscan_clustering HDBSCAN clustering
hierarchical_topics Build a hierarchical topic tree from a fitted topic model
kmeans_clustering K-means clustering
label_topics_llm Label topics using a large language model
load_bertopic Load a previously saved BERTopic model
load_bert_weights Load BERT weights from a checkpoint into a constructed model
load_cohere_embedder Load a Cohere embedding model
load_embeddings Load an embedding matrix from disk
load_hf_bert Load a BERT-family model from HuggingFace for use in R
load_hf_classifier Load a fine-tuned BERT-family classifier from HuggingFace
load_openai_embedder Load an OpenAI embedding model
load_specter2 Load a SPECTER2 model with a task-specific adapter
load_stopwords Load a stopword list from a character vector, data frame, or file
make_wordpiece_tokenizer Create a WordPiece tokenizer for BERT models that lack 'tokenizer.json'
mean_pool Mean-pool token-level hidden states into a sentence vector
merge_topics Manually merge a set of topics into one
no_reduction Skip dimensionality reduction (identity pass-through)
pca_reduction PCA dimensionality reduction
pos_dtm Build a POS-filtered document-term matrix
pos_representation Construct a POS-based representation model
predict.bertopic_fit Predict topics for new documents using a fitted BERTopic model
print.bertopic_fit Print method for bertopic_fit objects
print.bertopic_flow Print method for bertopic_flow objects
print.bert_encoder Print method for bert_encoder objects
print.hf_classifier Print method for hf_classifier objects
print_topics Pretty-print discovered topics
reduce_outliers Reassign noise documents to the nearest real topic
reduce_topics Reduce the number of topics by iteratively merging the most similar pair
rhobots_demo Run a quick Rhobots demo using classic novels from Project Gutenberg
rhobots_install Check Rhobots system dependencies and print setup instructions
save_bertopic Save a fitted BERTopic model to disk
save_embeddings Save an embedding matrix to disk
stability_analysis Measure topic stability across multiple random seeds
sweep_topics Sweep BERTopic hyperparameters and compare topic quality
topics_over_time Compute how topic representations change over time
topic_coherence Compute lexical coherence for discovered topics
topic_quality Evaluate topic quality for a fitted BERTopic model
transform_bertopic Predict topics for new documents (standalone alias)
umap_reduction UMAP dimensionality reduction
visualize_barchart Bar charts of top terms per topic
visualize_comparison Interactive heatmap of topic - group associations
visualize_hierarchy Visualise the hierarchical topic tree as a dendrogram
visualize_quality Visualise topic quality metrics
visualize_stability Interactive heatmap of pairwise ARI scores
visualize_sweep Visualise the results of a parameter sweep
visualize_topics Visualise documents in topic space
visualize_topics_over_time Visualise topic frequency over time
visualize_topic_flow Sankey diagram of topic flow across periods
zero_shot_topics Zero-shot topic modeling with user-defined topic labels