mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r1488749 - /mahout/trunk/examples/bin/cluster-reuters.sh
Date Sun, 02 Jun 2013 17:42:32 GMT
Author: gsingers
Date: Sun Jun  2 17:42:31 2013
New Revision: 1488749

URL: http://svn.apache.org/r1488749
Log:
MAHOUT-966: add option to supply your own Reuters dataset

Modified:
    mahout/trunk/examples/bin/cluster-reuters.sh

Modified: mahout/trunk/examples/bin/cluster-reuters.sh
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/bin/cluster-reuters.sh?rev=1488749&r1=1488748&r2=1488749&view=diff
==============================================================================
--- mahout/trunk/examples/bin/cluster-reuters.sh (original)
+++ mahout/trunk/examples/bin/cluster-reuters.sh Sun Jun  2 17:42:31 2013
@@ -71,8 +71,13 @@ if [ ! -e ${WORK_DIR}/reuters-out-seqdir
   if [ ! -e ${WORK_DIR}/reuters-out ]; then
     if [ ! -e ${WORK_DIR}/reuters-sgm ]; then
       if [ ! -f ${WORK_DIR}/reuters21578.tar.gz ]; then
-        echo "Downloading Reuters-21578"
-        curl http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz -o ${WORK_DIR}/reuters21578.tar.gz
+	  if [ -n "$2" ]; then
+	      echo "Copying Reuters from local download"
+	      cp $2 ${WORK_DIR}/reuters21578.tar.gz
+	  else
+              echo "Downloading Reuters-21578"
+              curl http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz -o ${WORK_DIR}/reuters21578.tar.gz
+	  fi
       fi
       #make sure it was actually downloaded
       if [ ! -f ${WORK_DIR}/reuters21578.tar.gz ]; then



Mime
View raw message