tfdf.py
- 各単語のTerm Frequency, Document Frequencyを計算する。
- MeCab, mecab-ipadic-neologdによる分かち書きを行う。
- 動詞は原形に変換してから集計する。
- アルファベットはスペースで分割し、小文字に変換する。
- 記号のみの単語や、平仮名・片仮名のみからなる1文字の単語は削除する。
# Description | |
# A Hubot script for shoda script | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# | |
# Author: | |
# tondol |
# Description | |
# A Hubot script for shoda script | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# | |
# Author: | |
# tondol |
request = require 'request' | |
cheerio = require 'cheerio' | |
module.exports = (robot) -> | |
robot.respond /kssn/i, (msg) -> | |
url = "http://www.eventernote.com/actors/3562" | |
options = | |
url: url | |
timeout: 2000 | |
headers: {'user-agent': 'eventernote scraper'} |
puts "カドカワ".split("").zip("ドワンゴ".split("")).map(&:sample).join |
# -*- coding: utf-8 -*- | |
require 'net/https' | |
require 'pp' | |
# https://gist.github.com/cielavenir/a858255c4009ecbb9b67 | |
@channel_urls = ARGV | |
@player_urls = [] |
require 'nokogiri' | |
require 'pp' | |
require 'watir-webdriver' | |
SCREEN_NAME = ARGV.shift | |
FROM_OLDEST = Date.new(2011, 1, 1) | |
MY_EMAIL = "foo" | |
MY_PASSWORD = "barbaz" | |
@browser = Watir::Browser.new :chrome |
require 'pp' | |
require 'watir-webdriver' | |
directory = File.dirname($0) | |
config = YAML.load_file(directory + "/config.yml") | |
USERNAME = ARGV.shift | |
def instagram(username, password) | |
browser = Watir::Browser.new :phantomjs |
# frozen_string_literal: true | |
# A sample Gemfile | |
source "https://rubygems.org" | |
# gem "rails" | |
gem "slack-api" | |
gem "slack-incoming-webhooks" |