A collection of some of my R scripts that I use for corpus linguistics research. Feel free to send me a pull request if you see a better way to do what I'm trying to do with these scripts.
Enjoy!
An R script to get the collocates of single words, bigrams, and trigrams in text files in a folder on your hard drive.
An R script that takes words and multi-word strings in a file on your hard drive and retrieves their corresponding frequencies in the Corpus of Contemporary American English, or a specific genre of that corpus, and saves those frequencies to a .csv file.
An R script that takes words and multi-word strings in a file on your hard drive and retrieves their corresponding frequencies in the 20th century section of the Corpus del Español, or a specific genre of that section, and saves those frequencies to a .csv file.
An R script that creates frequency lists of single words, bigrams, and trigrams in text files in a folder on your hard drive.
An R script that searches for strings in the Corpus of Contemporary American English and saves the results to a .csv file.
An R script thatsearches for strings in the Corpus del Español and saves the results to a .csv file.
An R script that searches for words and strings in text files in a folder on your hard drive.