Commit cdb097d3 authored by Arne Köhn's avatar Arne Köhn

Added svmt-minimal. I stripped some of the features and the C-Values are taken...

Added svmt-minimal. I stripped some of the features and the C-Values are taken from the config.sample of svmtool.
parent 45c97d18
#! /bin/sh
# usage: test [modelname] [inputfile] [outputfile]
WORKDIR=$(pwd)/$(dirname $0)
cd $WORKDIR
. ../svmt-config
$SVMTOOLDIR/SVMTagger $WORKDIR/models/$1 <$2 2>tmp-out-$1 >$3
SETUPTIME=$(grep "START-UP: " tmp-out-$1)
TAGTIME=$(grep "TAGGING: " tmp-out-$1)
echo SETUPTIME=$(echo $SETUPTIME | sed "s/.* START-UP: \([0-9\.]*\).*/\1/")
echo TAGTIME=$(echo $TAGTIME | sed "s/.* TAGGING: \([0-9\.]*\).*/\1/")
rm tmp-out-$1
#! /bin/sh
# usage: train [trainfile] [modelname]
# where modelname is the name of this experiment
WORKDIR=$(pwd)/$(dirname $0)
cd $WORKDIR
# with this you get $SVMDIR and $SVMTOOLDIR
. ../svmt-config
if [ ! -d tmpfiles ]
then
mkdir tmpfiles
fi
if [ ! -d models ]
then
mkdir models
fi
cat > tmpfiles/config-$2.tmp <<EOF
TRAINSET = $1
SVMDIR = $SVMDIR
NAME = $2
# --------------- window definition (lenght, core_position) ---
W = 5 2
# --------------- feature filtering (count_cut_off, max_mapping_size)
F = 2 100000
# --------------- default C Parameter values ------------------
CK = 0.1086
CU = 0.07975
# --------------- % of unknown words expected (3 by default) -
# X = 3
# --------------- weight filtering for known words ------------
Kfilter = 0
# --------------- weight filtering for unknown words ----------
Ufilter = 0
# --------------- remove intermediate files -------------------
REMOVE_FILES = 1
# --------------- action items --------------------------------
do M0 LR
A0k = C(0;-2) C(0;-1) C(0;0) C(0;1) C(0;2) C(0;-2,-1) C(0;-1,0) C(0;0,1) C(0;-1,1) C(0;1,2) C(0;-2,-1,0) C(0;-2,-1,1) C(0;-1,0,1) C(0;-1,1,2) C(0;0,1,2) C(1;-2) C(1;-1) C(1;-2,-1) C(1;-1,1) C(1;1,2) C(1;-2,-1,1) C(1;-1,1,2) k(0) k(1) k(2) m(0) m(1) m(2)
A0u = C(0;-2) C(0;-1) C(0;0) C(0;1) C(0;2) C(0;-2,-1) C(0;-1,0) C(0;0,1) C(0;-1,1) C(0;1,2) C(0;-2,-1,0) C(0;-2,-1,1) C(0;-1,0,1) C(0;-1,1,2) C(0;0,1,2) C(1;-2) C(1;-1) C(1;-2,-1) C(1;-1,1) C(1;1,2) C(1;-2,-1,1) C(1;-1,1,2) k(0) k(1) k(2) m(0) m(1) m(2) z(3) L SA AA SN CA CAA CP CC CN MW
EOF
cd models
$SVMTOOLDIR/SVMTlearn -V 1 $WORKDIR/tmpfiles/config-$2.tmp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment