library(readr)
library(dplyr)
library(tibble)
library(stringr)
sentences <- read_csv(
"data/workforce/workforce_sentences.csv",
na = character(),
col_types = cols(
sentence_id = col_character(),
document_id = col_character(),
source_line = col_character(),
text = col_character(),
reference_label = col_character(),
uncertainty = col_character(),
annotator_id = col_character(),
rationale = col_character(),
codebook_version = col_character(),
codebook_hash = col_character(),
derived = col_character(),
transformation = col_character()
)
)
pay_examples <- tibble(
example_id = sprintf("pay-%02d", 1:13),
text = c(
"$18.50 per hour",
"18.50/hr",
"$38,000 a year",
"$17-$19 an hour",
"competitive pay",
"$1,250 stipend",
"$20 hourly",
"Pay starts at $16 per hour",
"$42,500 annually",
"Stipend of 750 dollars",
"Up to $21/hour",
"18 dollars an hour",
"$38000 a year"
),
expected_currency = c(
"USD", NA, "USD", "USD", NA, "USD",
"USD", "USD", "USD", "USD", "USD", "USD",
"USD"
),
expected_unit = c(
"hour", "hour", "year", "hour", NA, "stipend",
"hour", "hour", "year", "stipend", "hour", "hour",
"year"
),
expected_lower = c(
18.50, 18.50, 38000, 17, NA, 1250,
20, 16, 42500, 750, 21, 18,
38000
),
expected_upper = c(
NA, NA, NA, 19, NA, NA,
NA, NA, NA, NA, NA, NA,
NA
)
)
knitr::kable(
pay_examples,
col.names = c(
"Example ID", "Text", "Expected currency", "Expected unit",
"Expected lower amount", "Expected upper amount"
),
caption = "Author-created price examples with expected answers",
row.names = FALSE
)