#!/bin/sh

dir=../ngram-count-gt

if [ -f $dir/swbd.3grams.gz ]; then
	gz=.gz
else
	gz=
fi

#gunzip -c $dir/swbd.3grams$gz | \
#get-gt-counts out=swbd

smooth="-addsmooth 0.001"

# create LM from counts
ngram-count -debug 1 \
	$smooth \
	-read $dir/swbd.3grams$gz \
	-vocab $dir/eval2001.vocab \
	-lm swbd.3bo$gz

ngram -debug 0 \
	-lm swbd.3bo$gz \
	-ppl $dir/eval97.text

rm -f swbd.3bo$gz

