LLMing

The goal of LLMing is to generate and assess psychological text data.

Installation

You can install the development version of LLMing from GitHub with:

# install.packages("pak")
pak::pak("sliplr19/LLMing")

Example

This is a basic example which shows you how to get BERT embeddings:

library(LLMing)

df <- data.frame(
  text = c(
    "I slept well and feel great today!",
    "I saw friends and it went well.",
    "I think I failed that exam. I'm such a disapointment."
  )
)

emb_dat <- embed(
   dat = df,
   method = "BERT",
   text_col = "text"
 )
#> Processing batch 1/1
#> 
#> Completed layers output for texts (variable: 1/1, duration: 1.111531 secs).
#> 
#> Completed layers aggregation for word_type_embeddings. 
#> 
#> Completed layers aggregation (variable 1/1, duration: 0.189682 secs).
#> 
#> Minutes from start:  0.037
#> Estimated embedding time left = 0 minutes