Skip to content

Instantly share code, notes, and snippets.

@sdjacobs
sdjacobs / get-french-unigrams.py
Created December 4, 2014 18:15
Get count of all French unigrams in the Google Books corpus
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from google_ngram_downloader import readline_google_store
all_records = readline_google_store(ngram_len=1, lang="fre")
this_ngram = "WORDS"
this_count = "COUNT"
for (fname, url, records) in all_records: