This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://history.google.com/history/ | |
# 上のリンクのギアアイコンからダウンロードできる検索履歴のzipを全て表示するやつ | |
require 'kconv' | |
require 'json' | |
require 'cgi' | |
zip_path = ARGV[0] | |
raise "Googleからダウンロードした.zipファイルを指定してください。" unless /検索-20.*\.zip/ === zip_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import logging | |
import sys | |
import os.path | |
import bz2 | |
from gensim.corpora import WikiCorpus | |
from gensim.corpora.wikicorpus import filterWiki |