How google get the 'use over time for' data from the before internet years? Recently I am reading a book and I found there are lots of words I rarely saw. While I was searching their meaning, I found that for a single vocabulary google has a use over time for: statistic -- from 1800 to 2010. 

I may imagine how google could gather the frequency that a vocabulary to be used in Internet. But what about before the Internet? How they know the frequency of the people in 1800 using a vocabulary? Does they first convert the chartaceous material into digital data then computing for the result or something else?
I am not sure if you are familiar with this, but in linguistics there is a term "corpus". It is a large collection of texts used for statisical analysis and other linguistic research, both historical and contemporary. 

There are corpora of digitalized texts, both literature and other domains such as newspapers, bulletins, etc etc. I recon Google uses data from such corpora.

For example: https://www.sketchengine.eu for English.

Here's a somewhat robust list of corpora: https://en.wikipedia.org/wiki/List_of_text_corpora