Learn R Programming

BERTopic (version 0.1.0)

bertopic_get_representative_docs: Representative documents for a topic

Description

Retrieve representative documents for a given topic using BERTopic.get_representative_docs(). Falls back across signature variants.

Usage

bertopic_get_representative_docs(model, topic_id, top_n = 5L)

Value

A tibble with columns rank and document. If scores are available in the current BERTopic version, a score column is included.

Arguments

model

A "bertopic_r" model.

topic_id

Integer topic id.

top_n

Number of representative documents to return.