This file contains hidden or 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
pushd . | |
# Install blas | |
cd /tmp | |
wget http://www.netlib.org/blas/blas.tgz | |
tar xzf blas.tgz | |
cd BLAS* | |
gfortran -O3 -m64 -fPIC -c *.f | |
ar r libfblas.a *.o | |
ranlib libfblas.a |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
wget --no-cookies --no-check-certificate \ | |
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"\ | |
"http://download.oracle.com/otn-pub/java/jdk/8u65-b14/jdk-8u65-linux-x64.rpm" -O /tmp/jdk-8u65-linux-x64.rpm | |
rpm -ivh /tmp/jdk-8u65-linux-x64.rpm |
This file contains hidden or 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
if [ ! -e `/usr/local/bin/mecab-config --dicdir`/unidic ]; then | |
if [ "`yum list installed| grep unzip.x86_64`" = "" ]; then | |
yum install -y unzip | |
fi | |
wget "http://jaist.dl.osdn.jp/unidic/58338/unidic-mecab-2.1.2_src.zip" -O /tmp/unidic-mecab-2.1.2_src.zip | |
unzip /tmp/unidic-mecab-2.1.2_src.zip -d /tmp | |
cd /tmp/unidic-mecab-2.1.2_src | |
./configure | |
make | |
make install |
This file contains hidden or 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
import os | |
import shutil | |
import tempfile | |
import tcptest | |
from elasticsearch import Elasticsearch | |
SYNONYMS_PATH = "/tmp/wikipedia_synonym.txt" | |
settings = { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
--- linear.cpp 2015-09-27 07:03:33.000000000 +0900 | |
+++ new_linear.cpp 2016-04-09 01:32:23.000000000 +0900 | |
@@ -2685,9 +2685,10 @@ double predict_probability(const struct | |
double label=predict_values(model_, x, prob_estimates); | |
for(i=0;i<nr_w;i++) | |
- prob_estimates[i]=1/(1+exp(-prob_estimates[i])); | |
+ prob_estimates[i]=exp(prob_estimates[i]); | |
if(nr_class==2) // for binary classification |
This file contains hidden or 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 bash | |
# from 形態素解析システムJUMANをpython3で使う | |
# https://abeerforyou.com/?p=715 | |
set -eu | |
pushd . > /dev/null | |
cd /tmp | |
curl -L -O 'http://nlp.ist.i.kyoto-u.ac.jp/DLcounter/lime.cgi?down=http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2&name=juman-7.01.tar.bz2' |