-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
executable file
·222 lines (214 loc) · 5.29 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#!/bin/bash
# 全体的に言える事ですが、port やbrew でインストールした
# アプリは後からアンインストールなどしても、設定ファイルが
# ばらばらと残ってしまい、残骸整理が大変です。
if [ -z $(which brew)]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
else
brew --help;
fi
brew install gawk ;
brew install gsed ;
brew install sary ;
sudo port install glib2 ;
sudo port install gtk2;
sudo port install pkgconfig;
sudo port install gcc6;
brew install libtool ;
brew tap uetchy/nlp #tapを追加
brew install mecab # 入力がUTF-8になります。
brew install mecab-ipadic
brew install crf++
brew install cabocha
brew install darats
brew istall tinysvm
brew install yamcha
brew install juman
brew install mecab-jumandic
brew install knp
brew install jdepp
#awk
if [ -z $(which gawk) ]; then
sudo port install gawk ; #mac
else
gawk --version | grep -i "GNU Awk";
fi
#sed
if [ -z $(which gsed) ]; then
sudo port install gsed ; #mac
else
gsed --version | grep -i "gsed (GNU sed"
fi
# sary
if [ -z $(which sary) ]; then
brew install sary;
else
which sary;
fi
#libtool
if [ -z $(which libtool) ]; then
wget ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz . ;
tar zxvf libtool-2.4.2.tar.gz;
cd libtool-2.4.2;
make clean ;
./configure --prefix=$HOME/local;
make;
make install;
# brew install libtool ;
else
which libtool;
fi
#mecab
if [ -z $(which mecab) ]; then
wget -O mecab-0.996.tar.gz "https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE";
tar zxfv mecab-0.996.tar.gz;
cd mecab-0.996;
make clean;
./configure;
make;
make install;
#mecab ipa dic
wget -O mecab-ipadic-2.7.0-20070801.tar.gz "https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM";
tar zxfv mecab-ipadic-2.7.0-20070801.tar.gz;
cd mecab-ipadic-2.7.0-20070801;
#./configure --with-charset=utf8;
./configure ;
make;
sudo make install;
#未確認だがUTF-8入力がでふぉでよければ
# brew install mecab
# brew install mecab-ipadic
else
which mecab ;
fi
#CRF++
if [ -z $(which crf_test) ]; then
wget 'https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7QVR6VXJ5dWExSTQ' -O CRF++-0.58.tar.gz;
tar zxvf CRF++-0.58.tar.gz;
cd CRF++-0.58;
make clean ;
./configure;
make;
sudo make install;
sudo ln -s /usr/local/bin/crf_learn /usr/bin/crf_learn ;
sudo ln -s /usr/local/bin/crf_test /usr/bin/crf_test ;
# brewk install crf++
else
which crf_test;
which crf_learn;
fi
#cabocha
if [ -z $(which cabocha) ]; then
bzip2 -d cabocha-0.69.tar.bz2
tar -xf cabocha-0.69.tar
cd cabocha-0.69
make clean ;
LIBS=-liconv ./configure --with-posset=IPA
#./configure --with-mecab- config='which mecab-config' --with-charset=UTF8
make;
sudo make install;
sudo ln -s /usr/local/bin/cabocha /usr/bin/cabocha;
echo "mecabrc=/usr/local/etc/mecabrc" >> ~/.cabocharc
# brew tap uetchy/nlp
# brew install cabocha ;
else
which cabocha;
fi
#darts
if [ -f /usr/local/include/darts.h ]; then
ls /usr/local/include/darts.h ;
else
wget http://chasen.org/~taku/software/darts/src/darts-0.3.tar.gz
tar xzvf darts-0.3.tar.gz
cd darts-0.3
make clean ;
./configure ;
make ;
make install ;
# brew install darts
fi
#tinySVN
#mac の場合のpatch
#http://naoyat.hatenablog.jp/entry/2012/01/25/202231
if [ -z $(which svm_learn) ]; then
wget http://chasen.org/~taku/software/TinySVM/src/TinySVM-0.09.tar.gz
tar xzvf TinySVM-0.09.tar.gz
cd TinySVM-0.09
patch -p1 < ../TinySVM-0.09.naoyat-macosx.patch
./configure
make
make check
make install
# brew install tinysvm ;
else
which svm_learn ;
fi
#YamCha
if [ -z $(which yamcha) ]; then
wget http://chasen.org/~taku/software/yamcha/src/yamcha-0.33.tar.gz
tar xzvf yamcha-0.33.tar.gz
cd yamcha-0.33
./configure
make
make check
make install
# brew install yamcha
else
which yamcha ;
fi
#juman
if [ -z $(which juman) ]; then
wget http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2
tar jxvf juman-7.01.tar.bz2
cd juman-7.01
make clean ;
./configure
make
sudo make install
sudo ln -s /usr/local/bin/juman /usr/bin/juman;
#brew insall juman
else
which juman ;
fi
#KNP
if [ -z $(which knp) ]; then
wget "http://nlp.ist.i.kyoto-u.ac.jp/DLcounter/lime.cgi?down=http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/knp/knp-4.17.tar.bz2&name=knp-4.17.tar.bz2"
tar jxvf knp-4.17.tar.bz2
cd knp-4.17
make clean ;
./configure
make
sudo make install
sudo ln -s
# 未確認だが
# brew だと CRF++もjumanもKNPと同時にインストールされるらしい
# brew tap uetchy/nlp
# brew install knp
# brew install knp --with-crf++
else
which knp;
fi
#mecab-jumandic
if [ ! -d "/usr/local/lib/mecab/dic/jumandic/" ]; then
cd mecab-jumandic-7.0-20130310;
make clean ;
./configure ;
make ;
make install ;
# brew install mecab-jumandic
else
ls -la /usr/local/lib/mecab/dic/jumandic/ ;
fi
#JDepP
if [ -z $(which jdepp) ]; then
wget http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/jdepp/jdepp-latest.tar.gz ;
tar zxvf jdepp-latest.tar.gz ;
cd jdepp-2015-10-05 ;
./configure --with-mecab-dict=IPA --prefix=/usr/local ;
make clean ;
make model ;
make install;
#brew install jdepp
else
which jDepP ;
fi