ask_palmetto: Get topic coherence from Palmetto remote or local

View source: R/topic_coherence.R

ask_palmettoR Documentation

Get topic coherence from Palmetto remote or local

Description

Get topic coherence from Palmetto remote or local

Usage

ask_palmetto(solution, depth = "full", coherence = "npmi", backend = "web")

Arguments

solution

A wide tibble where each column contains a top-N terms.

depth

The number of top terms to use to use for coherence estimation. If backend = "web", then the number cannot be less than 3 and more than 10.

coherence

A name of coherence metric. Valid names: "ca", "cp", "cv", "npmi", "uci", "umass". Default is npmi.

backend

Path to Palmetto either "web" or a string with an URL. Example: http://localhost:7777/service/.

Value

A wide tibble with requested coherence scores.

Examples

df1 <- tibble::tibble(col1 = c("apple", "banana", "cherry"), col2 = c("dog", "cat", "mouse"))

ask_palmetto(df1)

paskn/topicl documentation built on Feb. 1, 2025, 9:33 p.m.