seancarmody / ngramr

R package to query the Google Ngram Viewer
Other
48 stars 9 forks source link

Allow ggram to call ngrami #4

Closed briatte closed 11 years ago

briatte commented 11 years ago

It would be interesting if ggram could get an ignore.case = TRUE option that would call ngrami instead of ngram. I am not sure I understand the code well enough to implement this (the smoothing and aggregate arguments are mysterious to me).

seancarmody commented 11 years ago

The case insensitive functions will, for example, look for the frequencies of 'the', 'The' and 'THE'. By default aggregate=TRUE and the frequencies for each of these are summed. Setting aggregate=FALSE is equivalent to searching for 'the', 'The', and 'THE' (the results are returned separately). smoothing is a parameter that Google takes and does a simple moving average smoothing over successive years.

Thanks for the suggestion: there is now an ignore.case option for ggram.