-
Notifications
You must be signed in to change notification settings - Fork 15
/
SETUP
40 lines (28 loc) · 1.16 KB
/
SETUP
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
Setup:
(1) You need Python 2.5 or later. Python 3 does not seem to work.
(2) To use SVM models, you'll need SVM Light (http://svmlight.joachims.org/)
- once installed, you'll need to modify sbd.py slightly:
at the top, change the paths to SVM_LEARN and SVM_CLASSIFY to point
to the files you've installed.
-----
Example calls (if python defaults to version 2.4, you'll need to specify
python2.5):
(show command line options)
python sbd.py -h
(split sentences in sample.txt using the provided Naive Bayes model)
python sbd.py -m model_nb sample.txt
(now using the provided SVM model)
python sbd.py -m model_svm sample.txt
(now keeping tokenized output)
python sbd.py -m model_nb -t sample.txt
(now writing output to sample.sent)
python sbd.py -m model_nb -t sample.txt -o sample.sent
-----
Note about SVM_LIGHT:
The provided SVM model was built with SVM_LIGHT version 6.01. It seems that
SVM_CLASSIFY requires a matching version or it will crash. So, you can either
try to use version 6.01, or you can make the following quick fix:
open model_svm/svm_model
change the first line from:
SVM-light Version V6.02
to whatever your version is.