sim_llm {NaileR} | R Documentation |
Compute a similarity score, on a scale ranging from 0 (totally different) to 100 (the exact same), between two character strings.
sim_llm(textA, textB)
textA , textB |
two character strings. |
The similarity score is generated by an LLM. Therefore, the result might vary if the function is run several times.
An integer between 0 and 100.
## 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)