forked from chokkan/crfsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
72 lines (69 loc) · 1.91 KB
/
README
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
## Build
```shell
134 git clone https://github.com/enterprise-search/liblbfgs.git
135 git clone https://github.com/enterprise-search/crfsuite.git
136 cd crfsuite/
137 sh autogen.sh
138 ./configure --with-liblbfgs=../liblbfgs
139 make -j 8
140 pwd
141 ./configure --with-liblbfgs=/home/max_zhang_airwallex_com/liblbfgs
142 make -j 8
143 make
144 make install
145 cd swig/python/
146 ls
147 sh prepare.sh
148 python3 setup.py build_ext
149 cd ../..
150 sudo make install
151 cd -
152 python3 setup.py build_ext
153 sudo make install
154 ls
155 python3
156 cd -
157 python3
158 cd swig/python/
159 ls
160 ls build/
161 find build/
162 cd build/lib.linux-x86_64-3.10/
163 python3
164 cd ..
165 ls
166 make
167 vi Mak
168 sudo python3 setup.py install
169 python3
170 cd
171 python3
172 ls
173 cd crfsuite/
174 sudo make install
175 echo $?
176 cd swig/python/
177 sudo python3 setup.py install
178 cd
179 python3
180 python -c "import sys; print(sys.path)"
181 python3 -c "import sys; print(sys.path)"
182 echo $LD_LIBRARY_PATH
183 env LD_LIBRARY_PATH=/usr/local/lib python3
188 curl -O https://www.cnts.ua.ac.be/conll2000/chunking/train.txt.gz
190 gunzip train.txt.gz
192 less train.txt
194 cd crfsuite/
196 env LD_LIBRARY_PATH=/usr/local/lib python3 example/ner.py
197 env LD_LIBRARY_PATH=/usr/local/lib python3 example/ner.py < ../train.txt
198 less ../train.txt
199 env LD_LIBRARY_PATH=/usr/local/lib python3 example/chunking.py < ../train.txt
200 env LD_LIBRARY_PATH=/usr/local/lib python3 example/chunking.py < ../train.txt > train.data
201 less train.data
202 ls
203 crfsuite learn train.data
204 env LD_LIBRARY_PATH=/usr/local/lib crfsuite learn train.data
205 history
```
## References
- https://www.chokkan.org/software/crfsuite/tutorial.html