Learn R Programming

chatRater (version 1.1.0)

get_semantic_transparency: Get Semantic Transparency Rating

Description

Uses an LLM to obtain a semantic transparency rating for the given linguistic stimulus.

Usage

get_semantic_transparency(
  stimulus,
  model = "gpt-3.5-turbo",
  api_key = "",
  top_p = 1,
  temp = 0
)

Value

An integer rating (1-7) indicating the semantic transparency.

Arguments

stimulus

A character string representing the language material.

model

A character string specifying the LLM model (default "gpt-3.5-turbo").

api_key

API key as a character string.

top_p

Numeric value (default 1).

temp

Numeric value (default 0).

Details

Default definition: "Semantic transparency is the degree to which the meaning of a compound or phrase can be inferred from its constituent parts."

Examples

Run this code
if (FALSE) {
  sem_trans <- get_semantic_transparency("blackbird",
                                          model = "gpt-3.5-turbo",
                                          api_key = "your_api_key")
  cat("Semantic Transparency Rating:", sem_trans, "\n")
}

Run the code above in your browser using DataLab