-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlabel_text_files.pl
20 lines (17 loc) · 960 Bytes
/
label_text_files.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#input parameters
# input source : csv or database or rainbow-style directories
# classes to build classifiers for: all or set
# features to generate: words, bigrams, pos, negation, stopilst, stemming, other dictionaries, rules
# classifier to use svm, naivebayes
# classifier parameters
# buildmodel or experiment : build model on all data or generate train test splits and run evaluation scripts
$dirname=shift;
$modelfilename='D:\data\PROJECTS\sentiment\globalmodels\global-.ConcatPOS.Dict.BothNEG.BiGram.NoStem-DocModel.txt';
$inputcommand = "start /wait /realtime /b perl makeMatrices.pl \"$dirname\" ConcatPOS BothNEG Dict BiGram NoStem";
print $inputcommand."\n";
$matrixoutput=`$inputcommand`;
if ($matrixoutput =~ /\n(.*?)$/) {$matrixfilename=$1;}
print $matrixfilename;
$inputcommand = "start /wait /realtime /b perl score_new_data.pl \"$matrixfilename\" \"$modelfilename\"";
print $inputcommand."\n";
$output=`$inputcommand`;