| Title: | LLM-Powered Text Classification for Social Science |
|---|---|
| Description: | Meta-package that installs and loads the full CatLLM ecosystem for LLM-powered text classification across domains. Installing cat.llm brings in cat.stack (general-purpose engine), cat.survey (survey responses), cat.vader (social media), cat.ademic (academic papers), cat.cog (cognitive assessment), cat.pol (policy documents), and cat.web (web content). Like the tidyverse, you can install the full ecosystem or individual domain packages. |
| Authors: | Chris Soria [aut, cre] |
| Maintainer: | Chris Soria <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 3.1.1 |
| Built: | 2026-06-04 16:59:37 UTC |
| Source: | https://github.com/chrissoria/cat-llm |
Explicitly loads all domain packages. Normally this happens automatically
when library(cat.llm) is called, but this function can be used to
reload after detaching.
catllm_attach()catllm_attach()
Invisibly returns a character vector of attached package names.
## Not run: # Normally this happens automatically on `library(cat.llm)`. # Call manually to re-attach after detaching: catllm_attach() ## End(Not run)## Not run: # Normally this happens automatically on `library(cat.llm)`. # Call manually to re-attach after detaching: catllm_attach() ## End(Not run)
These functions provide convenient domain-suffixed names so users can tab-complete to find the right function. Each is a thin re-export from the corresponding domain package.
classify_survey(...) extract_survey(...) explore_survey(...) classify_social(...) extract_social(...) explore_social(...) classify_academic(...) extract_academic(...) explore_academic(...) summarize_academic(...) cerad_drawn_score(...) classify_political(...) extract_political(...) explore_political(...) summarize_political(...) classify_web(...) extract_web(...) explore_web(...) summarize_web(...)classify_survey(...) extract_survey(...) explore_survey(...) classify_social(...) extract_social(...) explore_social(...) classify_academic(...) extract_academic(...) explore_academic(...) summarize_academic(...) cerad_drawn_score(...) classify_political(...) extract_political(...) explore_political(...) summarize_political(...) classify_web(...) extract_web(...) explore_web(...) summarize_web(...)
... |
Additional arguments passed to the Python function. |
## Not run: library(cat.llm) # Survey classification (re-export of cat.survey::classify) classify_survey( input_data = df$responses, categories = c("Cost", "Quality", "Service", "Other"), survey_question = "Why did you choose us?", api_key = Sys.getenv("OPENAI_API_KEY") ) # Political documents (re-export of cat.pol::classify) classify_political( source = "city_san_diego", doc_type = "ordinance", n = 50L, categories = c("Housing", "Public Safety", "Finance"), api_key = Sys.getenv("OPENAI_API_KEY") ) # Web content (re-export of cat.web::classify) classify_web( input_data = c("https://example.com/article-1", "https://example.com/article-2"), categories = c("News", "Opinion", "Tutorial"), source_domain = "example.com", api_key = Sys.getenv("OPENAI_API_KEY") ) # CERAD cognitive scoring (re-export of cat.cog::cerad_drawn_score) cerad_drawn_score( shape = "circle", image_input = "./drawings/", api_key = Sys.getenv("OPENAI_API_KEY") ) ## End(Not run)## Not run: library(cat.llm) # Survey classification (re-export of cat.survey::classify) classify_survey( input_data = df$responses, categories = c("Cost", "Quality", "Service", "Other"), survey_question = "Why did you choose us?", api_key = Sys.getenv("OPENAI_API_KEY") ) # Political documents (re-export of cat.pol::classify) classify_political( source = "city_san_diego", doc_type = "ordinance", n = 50L, categories = c("Housing", "Public Safety", "Finance"), api_key = Sys.getenv("OPENAI_API_KEY") ) # Web content (re-export of cat.web::classify) classify_web( input_data = c("https://example.com/article-1", "https://example.com/article-2"), categories = c("News", "Opinion", "Tutorial"), source_domain = "example.com", api_key = Sys.getenv("OPENAI_API_KEY") ) # CERAD cognitive scoring (re-export of cat.cog::cerad_drawn_score) cerad_drawn_score( shape = "circle", image_input = "./drawings/", api_key = Sys.getenv("OPENAI_API_KEY") ) ## End(Not run)