Return-Path: X-Original-To: apmail-mahout-commits-archive@www.apache.org Delivered-To: apmail-mahout-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9C8E17A95 for ; Thu, 23 Apr 2015 20:00:37 +0000 (UTC) Received: (qmail 3587 invoked by uid 500); 23 Apr 2015 20:00:37 -0000 Delivered-To: apmail-mahout-commits-archive@mahout.apache.org Received: (qmail 3535 invoked by uid 500); 23 Apr 2015 20:00:37 -0000 Mailing-List: contact commits-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mahout.apache.org Delivered-To: mailing list commits@mahout.apache.org Received: (qmail 3526 invoked by uid 99); 23 Apr 2015 20:00:37 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 20:00:37 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 90909AC07D1 for ; Thu, 23 Apr 2015 20:00:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1675715 - /mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext Date: Thu, 23 Apr 2015 20:00:37 -0000 To: commits@mahout.apache.org From: apalumbo@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150423200037.90909AC07D1@hades.apache.org> Author: apalumbo Date: Thu Apr 23 20:00:37 2015 New Revision: 1675715 URL: http://svn.apache.org/r1675715 Log: fix a couple of things Modified: mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext Modified: mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext URL: http://svn.apache.org/viewvc/mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext?rev=1675715&r1=1675714&r2=1675715&view=diff ============================================================================== --- mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext (original) +++ mahout/site/mahout_cms/trunk/content/users/environment/classify-a-doc-from-the-shell.mdtext Thu Apr 23 20:00:37 2015 @@ -26,13 +26,13 @@ For now, lets take the script apart piec ## Imports -Our Mahout Naive Bayes Imports: +Our Mahout Naive Bayes imports: import org.apache.mahout.classifier.naivebayes._ import org.apache.mahout.classifier.stats._ import org.apache.mahout.nlp.tfidf._ -Hadoop Imports needed to read our dictionary: +Hadoop imports needed to read our dictionary: import org.apache.hadoop.io.Text import org.apache.hadoop.io.IntWritable @@ -231,7 +231,6 @@ The label with the highest score wins th def classifyText(txt: String): String = { val v = vectorizeDocument(txt, dictionaryMap, dfCountMap) classifyDocument(v) - } ## Now we can simply call our classifyText(...) method on any String