Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# (WIP)画像から主題っぽい領域を判定" | |
] | |
}, | |
{ |
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
# -*- coding: utf-8 -*- | |
# distutils: language = c++ | |
import numpy as np | |
cimport numpy as np | |
cimport cython | |
from libc.stdlib cimport malloc, free | |
from libc.math cimport log, M_PI, sin, cos, atan | |
from libc.float cimport DBL_MAX |
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/ruby -Kw | |
$KCODE="UTF-8" | |
require "CaboCha" | |
require "kconv" | |
class DepAnalyzeByCabocha | |
@cabo | |
def initialize(args=[]) | |
@cabo = CaboCha::Parser.new(args) | |
end |
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
# -*- coding: utf-8 -*- | |
import math | |
import numpy as NP | |
from scipy.maxentropy import logsumexp | |
from operator import itemgetter | |
class NewmanEM: | |
def __init__(sel): | |
pass |
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
# -*- coding: utf-8 -*- | |
import numpy as np | |
from scipy.special.basic import digamma | |
import logging | |
class NpGraph(): | |
def __init__(self,T=10,C=(1.0,1.0),phi=0.001,thresh=0.001,niter = 500): | |
self._T = T#最大クラスタ数 | |
self._c1 = C[0] | |
self._c2 = C[1] | |
self._phi0=phi |
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
# -*- coding: utf-8 -*- | |
import CaboCha | |
import chardet | |
import syslog | |
import math | |
from collections import defaultdict | |
import unicodedata | |
syslog.openlog('cabocha_wrapper',syslog.LOG_PID|syslog.LOG_PERROR,syslog.LOG_SYSLOG) | |
AVG_LENGTH = 200.0 |
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
# -*- coding: utf-8 -*- | |
import numpy as np | |
cimport numpy as np | |
from libc.math cimport log | |
from scipy.misc import logsumexp | |
cdef double digamma(double x): | |
cdef double result = 0.0 | |
cdef double xx, xx2, xx4 | |
assert x>=0, "digamma error" |
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
# -*- coding: utf-8 -*- | |
from BeautifulSoup import BeautifulSoup | |
import urllib2 | |
import re | |
URL = "http://kohaumotu.org/rongorongo_org/translit/%s.html" | |
for i in range(97,123): | |
url = URL % chr(i) | |
html = urllib2.urlopen(url).read() |
OlderNewer