Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#GetSyosetuList.R | |
#Copyright (c) 2014 nezuq | |
#This software is released under the MIT License. | |
#http://opensource.org/licenses/mit-license.php | |
#依存パッケージのインストール | |
install.packages("rJava") | |
install.packages("devtools") | |
library(devtools) | |
install_github('seleniumJars', 'LluisRamon') |
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
#【本処理】 | |
#Twitter検索キーワード | |
keyword.tgt <- '"島風くん"' | |
#Twitter検索対象日付 | |
date.tgt <- "2014-05-17" | |
#Twitterで検索 | |
date.next <- format(as.POSIXct(date.tgt) - 1, "%Y-%m-%d") | |
twt.raw <- searchTwitter(keyword.tgt, n = 1500, since = date.next, cainfo = cacert.name) | |
twt <- twListToDF(twt.raw) |
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
create table user( | |
user_id INTEGER PRIMARY KEY, | |
nick TEXT , | |
hp_url TEXT , | |
gender TEXT , | |
blood_type TEXT , | |
age INTEGER , | |
birthday TEXT , | |
job TEXT , | |
introduction TEXT , |
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
CREATE TABLE illust(illust_id INTEGER PRIMARY KEY, user_id INTEGER, extension TEXT, title TEXT, server_no INTEGER, user_name TEXT, illust_128_url TEXT, x1 TEXT, x2 TEXT, illust_480mw_url TEXT, x3 TEXT, x4 TEXT, illust_entry_dt TEXT, tags TEXT, tool_name TEXT, evaluate_cnt INTEGER, evaluate_sum INTEGER, view_cnt INTEGER, caption TEXT, page_cnt INTEGER, x5 TEXT, x6 TEXT, x7 TEXT, x8 TEXT, user_disp_id TEXT, x9 TEXT, r18_flg INTEGER, x10 TEXT, x11 TEXT, user_url TEXT); |
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
library(ROAuth) | |
library(twitteR) | |
library(igraph) | |
#【認証処理】 | |
# 設定情報を取得 | |
twit.consumerKey <- "<あなたのTwitter-API key>" | |
twit.consumerSecret <- "<あなたのTwitter-API secret>" |
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 CaboCha | |
c = CaboCha.Parser() | |
sent = '国境の長いトンネルを抜けると雪国であった。夜の底が白くなった。信号所に汽車が止まった。' | |
print c.parseToString(sent) |
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 sys | |
reload(sys) | |
sys.setdefaultencoding('UTF-8') | |
import MeCab | |
import nltk | |
from numpy import * |
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 -*- | |
# ncxml2csv.py | |
# Copyright (c) 2014 nezuq | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
from __future__ import unicode_literals | |
import sys |