#!/bin/sh

if [ -f ../multi-ngram/train-all.3bo.gz ]; then
	gz=.gz
else
	gz=
fi

sentence1="i've got a bad feeling"
sentence2="i've got a good feeling"

lm=../multi-ngram/train-all.3bo$gz
debug=2

{
	echo "$sentence1"
	echo "$sentence2"
} | \
ngram -debug $debug -lm $lm -ppl -

escape="***foo"

{
	echo $escape 1
	echo "$sentence1" | ngram-count -text - -write -
	echo $escape 2
	echo "$sentence2" | ngram-count -text - -write -
} | \
filter-event-counts escape="$escape" order=3 | \
ngram -debug $debug -lm $lm -escape "$escape" -counts -

