| Title: | SOCcer Occupation and Industry Classification |
|---|---|
| Description: | Brings SOCcer and CLIPS from online only to your favorite working environment - R. Thanks to the power of Rust and ONNX. |
| Authors: | Daniel Russ [aut, cre] |
| Maintainer: | Daniel Russ <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-07-20 18:05:38 UTC |
| Source: | https://github.com/danielruss/soccerrsr |
Generates dense vector embeddings using the GIST-small-Embedding model. Automatically detects the type of input based on column names.
embed_job(text1, text2 = NULL) embed_jobs(df)embed_job(text1, text2 = NULL) embed_jobs(df)
text1 |
A single character string to embed (job title or product/service) |
text2 |
An optional single character string for additional context (job task) |
df |
A data frame containing either:
|
NA values in JobTitle, products_services, or JobTask
will be replaced with a single space character and a warning will be issued
indicating which rows are affected.
A numeric vector of length 384 (embed_job) or a numeric matrix
of shape n x 384 (embed_jobs) where each row is an embedding.
## Not run: # Single embedding embed_job("Doctor", "Diagnose patients") embed_job("Doctor") # Batch embedding - SOCcerNET df <- data.frame(JobTitle = c("Doctor", "Lawyer"), JobTask = c("Diagnose patients", "Draft contracts")) embed_jobs(df) # Batch embedding - CLIPS df <- data.frame(products_services = c("Software development", "Cloud hosting")) embed_jobs(df) ## End(Not run)## Not run: # Single embedding embed_job("Doctor", "Diagnose patients") embed_job("Doctor") # Batch embedding - SOCcerNET df <- data.frame(JobTitle = c("Doctor", "Lawyer"), JobTask = c("Diagnose patients", "Draft contracts")) embed_jobs(df) # Batch embedding - CLIPS df <- data.frame(products_services = c("Software development", "Cloud hosting")) embed_jobs(df) ## End(Not run)
Embed a job
embed_job(text1, text2 = NULL)embed_job(text1, text2 = NULL)
Run SOCcerNET from R
soccer_net(df, n, block_size)soccer_net(df, n, block_size)
Classifies job descriptions or product/service descriptions into occupational
or industry codes. run_soccernet() codes jobs into US SOC 2010 codes.
run_clips() codes products and services into industry
classifications. SOCcerNET can use optional soc1980, noc2011, or isco1988
columns to assist in the soc2010 coding. CLIPS can use a sic1987 columns.
run_soccernet(df, n = 10, block_size = 8) run_clips(df, n = 10, block_size = 20)run_soccernet(df, n = 10, block_size = 8) run_clips(df, n = 10, block_size = 20)
df |
A data frame containing the text to classify. See Details for required columns. |
n |
Number of candidate codes to return per row (default: |
block_size |
Number of rows to process per batch, tune for performance
(default: |
run_soccernet() requires:
JobTitle — job title text (required)
JobTask — job task description (optional, created as empty string if missing)
Id — unique row identifier (optional, auto-generated as row-001, row-002, etc. if missing)
Optionally, crosswalk columns soc1980, noc2011, and isco1988 can be
provided as lists or character vectors.
run_clips() requires:
products_services — product or service description (required)
Id — unique row identifier (optional, auto-generated if missing)
block_size controls how many rows are processed at once. Larger values
may improve throughput but use more memory. Tune based on your hardware.
The input data frame with additional columns containing the top n
classification codes and their scores, joined by Id.
## Not run: # SOCcerNET df <- data.frame( JobTitle = c("Staff Scientist", "Data Engineer"), JobTask = c("Develop chemical assays", "Build data pipelines") ) run_soccernet(df) run_soccernet(df, n = 5, block_size = 16) # CLIPS df <- data.frame(products_services = c("Software development", "Cloud hosting")) run_clips(df) ## End(Not run)## Not run: # SOCcerNET df <- data.frame( JobTitle = c("Staff Scientist", "Data Engineer"), JobTask = c("Develop chemical assays", "Build data pipelines") ) run_soccernet(df) run_soccernet(df, n = 5, block_size = 16) # CLIPS df <- data.frame(products_services = c("Software development", "Cloud hosting")) run_clips(df) ## End(Not run)