sim_llm {NaileR}R Documentation

LLM text similarity

Description

Compute a similarity score, on a scale ranging from 0 (totally different) to 100 (the exact same), between two character strings.

Usage

sim_llm(textA, textB)

Arguments

textA, textB

two character strings.

Details

The similarity score is generated by an LLM. Therefore, the result might vary if the function is run several times.

Value

An integer between 0 and 100.

Examples

## Not run: 
# Processing time is often longer than ten seconds
# because the function uses a large language model.

textA <- "Participant A was described as a nice, outgoing man, with a friendly attitude."
textB <- "Participant A was an extroverted and caring individual."

sim_llm(textA, textB)

## End(Not run)

[Package NaileR version 1.2.3 Index]