You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by ro...@apache.org on 2012/06/10 00:54:03 UTC

svn commit: r1348516 - /mahout/trunk/examples/bin/classify-20newsgroups.sh

Author: robinanil
Date: Sat Jun  9 22:54:02 2012
New Revision: 1348516

URL: http://svn.apache.org/viewvc?rev=1348516&view=rev
Log:
fixes the numbering in the 20 newsgroups command line prompt

Modified:
    mahout/trunk/examples/bin/classify-20newsgroups.sh

Modified: mahout/trunk/examples/bin/classify-20newsgroups.sh
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/bin/classify-20newsgroups.sh?rev=1348516&r1=1348515&r2=1348516&view=diff
==============================================================================
--- mahout/trunk/examples/bin/classify-20newsgroups.sh (original)
+++ mahout/trunk/examples/bin/classify-20newsgroups.sh Sat Jun  9 22:54:02 2012
@@ -28,7 +28,7 @@ if [ "$1" = "--help" ] || [ "$1" = "--?"
 fi
 
 SCRIPT_PATH=${0%/*}
-if [ "$0" != "$SCRIPT_PATH" ] && [ "$SCRIPT_PATH" != "" ]; then 
+if [ "$0" != "$SCRIPT_PATH" ] && [ "$SCRIPT_PATH" != "" ]; then
   cd $SCRIPT_PATH
 fi
 START_PATH=`pwd`
@@ -41,8 +41,8 @@ else
   echo "Please select a number to choose the corresponding task to run"
   echo "1. ${algorithm[0]}"
   echo "2. ${algorithm[1]}"
-  echo "2. ${algorithm[2]}"
-  echo "3. ${algorithm[3]} -- cleans up the work area in $WORK_DIR"
+  echo "3. ${algorithm[2]}"
+  echo "4. ${algorithm[3]} -- cleans up the work area in $WORK_DIR"
   read -p "Enter your choice : " choice
 fi
 
@@ -71,11 +71,11 @@ set -e
 
 if [ "x$alg" == "xnaivebayes"  -o  "x$alg" == "xcnaivebayes" ]; then
   c=""
-  
+
   if [ "x$alg" == "xcnaivebayes" ]; then
     c=" -c"
   fi
-  
+
   set -x
   echo "Preparing 20newsgroups data"
   rm -rf ${WORK_DIR}/20news-all
@@ -86,7 +86,7 @@ if [ "x$alg" == "xnaivebayes"  -o  "x$al
   ./bin/mahout seqdirectory \
     -i ${WORK_DIR}/20news-all \
     -o ${WORK_DIR}/20news-seq
-  
+
   echo "Converting sequence files to vectors"
   ./bin/mahout seq2sparse \
     -i ${WORK_DIR}/20news-seq \
@@ -105,14 +105,14 @@ if [ "x$alg" == "xnaivebayes"  -o  "x$al
     -o ${WORK_DIR}/model \
     -li ${WORK_DIR}/labelindex \
     -ow $c
-  
+
   echo "Self testing on training set"
 
   ./bin/mahout testnb \
     -i ${WORK_DIR}/20news-train-vectors\
     -m ${WORK_DIR}/model \
     -l ${WORK_DIR}/labelindex \
-    -ow -o ${WORK_DIR}/20news-testing $c 
+    -ow -o ${WORK_DIR}/20news-testing $c
 
   echo "Testing on holdout set"