Skip to content

jpowerj/ngramdl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngramdl

R package for downloading Google Ngram Viewer data

  1. Make sure you have devtools installed (install.packages("devtools")) and loaded (require(devtools))
  2. Install using install_github("jpowerj/ngramdl")
  3. Then load using require(ngramdl)
  4. You can now use ngram2csv() to download the data you want: it takes in a list of phrases (first argument) and a filename for the csv (second argument), outputs the csv, and returns the data.frame -- this way you can preview the data right after saving, like:
ngram_data <- ngram2csv(c("phrase1","phrase2"),"ngram_counts.csv")

(c) Jeff Jacobs 2020
http://cs.stanford.edu/~jjacobs3

About

Dr. Jeffenstein's monster: half ngramr code, half my own code...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages