- macOS 10.13.6
- Xcode 10.1 (10B61)
いつの間にかビルドがうまく出来なくなったので対処。
import os | |
import shutil | |
import tempfile | |
import tcptest | |
from elasticsearch import Elasticsearch | |
SYNONYMS_PATH = "/tmp/wikipedia_synonym.txt" | |
settings = { |
perl -pe 's/(?=[ドト])ゥ(?<!ー)//g;s/(?<=[キシチニヒミリィ])イ/ー/g;s/(?<=[ァゥェォ])ィ/イ/g;s/イション/ーション/g;s/ォウ/ォー/g;s/スィ/シー/g;s/ロウ/ロー/g;s/゛//g;s/ウカ/ーカ/g;s/トギャザー/トゥゲザー/g;s/ボキャビュラリー/ボキャブラリー/g;' < bep-eng.dic.txt |
sudo yum install byobu -y --enablerepo=epel-testing |
pushd . &> /dev/null | |
cd /tmp | |
git clone --depth=1 https://github.com/tmikolov/word2vec | |
cd word2vec | |
sed -i -e 's/malloc.h/stdlib.h/g' *.c | |
make | |
rm *.c* *.txt makefile LICENSE | |
cp * /usr/local/bin | |
popd &> /dev/null |
import re | |
import sqlite3 | |
import time | |
import requests | |
DB_PATH = 'wnjpn.db' | |
SWN_PATH = 'SentiWordNet_3.0.0_20130122.txt' | |
URL = 'https://script.google.com/macros/s/Please_write_here/exec?text=%s&source=en&target=ja' | |
RESULT_PATH = 'result.csv' |
#!/usr/bin/sh | |
git clone --depth=1 -b patch https://github.com/humem/cabocha /tmp/cabocha | |
cd /tmp/cabocha | |
./configure --with-charset=utf8 | |
make | |
make install | |
pip install git+https://github.com/taku910/cabocha.git#subdirectory=python |
#!/usr/bin/env python | |
# The MIT License (MIT) | |
# Copyright © 2015 Recruit Technologies Co.,Ltd. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
import glob | |
import html | |
import re | |
import sys | |
import jaconv | |
re_ogt = re.compile(' OrthographicTranscription="([^"]+)"') | |
re_a = re.compile('\;([^\)]+)\)?') | |
re_semicolon = re.compile(';([^\)]+)\)?') |
#!/bin/bash | |
# usage: | |
# ./randomsplit.sh [FILE] [division number] | |
# | |
# Check the number of parameters | |
if [ $# -ne 2 ]; then | |
echo "usage: ./randomsplit.sh [FILE] [division number]" 1>&2 | |
exit 1 |