if (FALSE) {
doc <- pdf2txt_auto("paper.pdf")
# Track specific words across sections
words_to_track <- c("machine learning", "neural network", "accuracy")
dist <- calculate_word_distribution(doc, words_to_track)
# Use equal-length segments instead
dist <- calculate_word_distribution(doc, words_to_track,
use_sections = FALSE,
n_segments = 20)
}
Run the code above in your browser using DataLab