Skip to content

Instantly share code, notes, and snippets.

View buruzaemon's full-sized avatar

Brooke M. Fujita buruzaemon

View GitHub Profile
# -*- coding: utf-8 -*-
import re
from natto import MeCab
patt = re.compile(r'''(?x)
# Ticker symbols
[0-9\uFF10-\uFF19]{2,}(\s|\.)[A-Z\uFF21-\uFF3A]{1,2} |
# short-from contractions
[\'|\u2019](d|ll|m|s|re|ve) |
@buruzaemon
buruzaemon / gist:5351379
Last active February 27, 2019 17:08
Sample Postgresql start/stop script for Cygwin
#!/usr/bin/bash
CYGWIN=server
CYGSERVER=/usr/sbin/cygserver
PGDATA=/var/psql/data
PGCTL=/usr/sbin/pg_ctl
PGLOG=/var/psql/log/postgresql.log
usage() {
echo "USAGE: pg (start|stop|restart|reload|status)"
echo
@buruzaemon
buruzaemon / Gemfile
Created April 24, 2012 00:22
phantomjs & jasminerice
group :test, :development do
gem 'jasminerice'
end
@buruzaemon
buruzaemon / .csirc
Created November 5, 2011 14:26
Chicken Scheme resource file for using readline egg (for use on Cygwin)
(use readline irregex)
(current-input-port (make-gnu-readline-port))
(gnu-history-install-file-manager
(string-append (or (get-environment-variable "HOME") ".") "/.csi.history"))
@buruzaemon
buruzaemon / Quick Start 1
Created October 28, 2011 13:00
Natto Snippets
require 'natto'
nm = Natto::MeCab.new
=> #<Natto::MeCab:0x288f6d08 @ptr=#<FFI::Pointer address=0x28d3ab80>,
@options={},
@dicts=[#<Natto::DictionaryInfo:0x288f6ba0 filename="/usr/local/lib/mecab/dic/ipadic/sys.dic", charset="utf-8">],
@version="0.98">