~ubuntu-branches/ubuntu/hardy/dbacl/hardy

« back to all changes in this revision

Viewing changes to TREC/classify

  • Committer: Bazaar Package Importer
  • Author(s): Zak B. Elep
  • Date: 2006-03-26 22:35:35 UTC
  • mto: (2.1.1 etch) (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060326223535-icwiulpkzesds4mq
ImportĀ upstreamĀ versionĀ 1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
. ./share/dbacl/TREC/OPTIONS
 
3
line=`./bin/dbacl -m $DBACL_COPTS -c ./db/ham -c ./db/spam $1 2>>stderr.log`
 
4
hscore=`expr "$line" : "$DBACL_CHAM" \| 0`
 
5
sscore=`expr "$line" : "$DBACL_CSPAM" \| 0`
 
6
score=`echo "$DBACL_SGN ($hscore - $sscore)" | bc`
 
7
case $score in
 
8
0) class='ham' ;;
 
9
-*) class='ham' ;;
 
10
*) class='spam' ;;
 
11
esac
 
12
echo class=$class score=$score