Commit 4af627b8 authored by Arne Koehn's avatar Arne Koehn

added hunpos-tnt-like

parent 2eb648cb
#! /bin/sh
# usage: test [modelname] [inputfile] [outputfile]
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
WORKDIR=$(dirname $abspath)
cd $WORKDIR
cat $2 | ../hunpos/tagger.native -g 40 $WORKDIR/models/$1 2>tmp-out-$1 | sed 's/\t/ /g'| sed 's/ */ /g' >$3
TAGTIME=$(grep "Tagging: " tmp-out-$1)
SETUPTIME=$(grep "Setup: " tmp-out-$1)
echo SETUPTIME=$(echo $SETUPTIME | sed "s/.* \([0-9:\.]*\).*/\1/")
echo TAGTIME=$(echo $TAGTIME | sed "s/.*real \([0-9:\.]*\).*/\1/")
rm tmp-out-$1
#! /bin/sh
# usage: train [trainfile] [modelname]
# where modelname is the name of this experiment
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
WORKDIR=$(dirname $abspath)
cd $WORKDIR
sed 's/ /\t/' $1 | ../hunpos/trainer.native -t 3 -e 1 $WORKDIR/models/$2 2>/dev/null
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