# Create sample term analysis
terms <- c("diabetes", "treatment", "clinical")
search_results <- data.frame(
id = paste0("art", 1:20),
title = paste("Study on", sample(terms, 20, replace = TRUE)),
abstract = paste("Research about", sample(terms, 20, replace = TRUE))
)
gold_standard <- paste0("art", c(1, 3, 5, 7, 9))
# Analyze term effectiveness
term_analysis <- term_effectiveness(terms, search_results, gold_standard)
# Calculate effectiveness scores
term_scores <- calc_tes(term_analysis)
print(term_scores[order(term_scores$tes, decreasing = TRUE), ])
Run the code above in your browser using DataLab