如何在 Google Ngrams 中搜索“过时”的单词和短语?

Dun*_*ock 5 google-api n-gram

我想编写一个应用程序来搜索谷歌的 Ngram 数据,以返回过去比现在更流行的单词和短语,在任意的年份范围内,按任意百分比,比现在更流行。

例如:https : //books.google.com/ngrams/graph?content=cowabunga&year_start=1950&year_end=2000&corpus=15&smoothing=3

理想情况下,我希望能够在不预先指定的情况下找到这些单词和短语。任何人都可以帮助我想出一种使用下载的 Ngrams 数据副本来做到这一点的方法吗?

tle*_*man 1

下载一些 n-gram 后的第一步是将它们转储到SQLite3 数据库中。例如,我获取了以字母“t”开头的 1-grams

要将它们转储到 SQLite 中,请运行命令sqlite3 1grams.db

sqlite> create table t1grams (ngram text, year integer, match_count integer, volume_count integer);
sqlite> .separator "\t"
sqlite> .import googlebooks-eng-all-1gram-20120701-t t1grams
Run Code Online (Sandbox Code Playgroud)

第二步是选择年份范围,将其称为YEAR_STARTYEAR_END,以及您的百分比,将其称为PERCENT_THRESHOLD

您的问题简化为一个查询,您在其中选择那些比at少见 % 的ngrams 。match_countPERCENT_THRESHOLDYEAR_ENDYEAR_START