Hello,
I'm trying to run the first example of ch02 of Mahout in action.
I have got following errors.
Did I have to create the pom.xml.
If yes: What I have to put in? Where I have to put it?
If no: Where can I find it? Cause apparently maven did not find it.
Where can I find taste files of "org.apache.mahout.cf.taste.*"?
#####################################################################################
/usr/local/mahout-distribution-0.7/examples$ mvn --version
Apache Maven 2.2.1 (rdebian-8)
Java version: 1.6.0_24
Java home: /usr/lib/jvm/java-6-openjdk-i386/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux" version: "3.2.0-25-generic" arch: "i386" Family: "unix"
#############
/usr/local/mahout-distribution-0.7/examples$ mvn install
[INFO] Scanning for projects...
[INFO] Building Maven Default Project
[INFO] task-segment: [install]
[ERROR] BUILD ERROR
[INFO] Cannot execute mojo: resources. It requires a project with an existing
pom.xml, but the build is not using one.
[INFO] For more information, run Maven with the -e switch
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jun 22 10:17:30 CEST 2012
[INFO] Final Memory: 4M/15M
#####################
/usr/local/mahout-distribution-0.7/examples$ mvn compile
[INFO] Scanning for projects...
[INFO] Building Maven Default Project
[INFO] task-segment: [compile]
[ERROR] BUILD ERROR
[INFO] Cannot execute mojo: resources. It requires a project with an existing
pom.xml, but the build is not using one.
[INFO] For more information, run Maven with the -e switch
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jun 22 10:11:44 CEST 2012
[INFO] Final Memory: 2M/15M
################################################################################
/usr/local/mahout-distribution-0.7/examples/mia/recommender/ch02$ javac
RecommenderIntro.java
RecommenderIntro.java:3: error: package
org.apache.mahout.cf.taste.impl.model.file does not exist
import org.apache.mahout.cf.taste.impl.model.file.*;
^
RecommenderIntro.java:4: error: package
org.apache.mahout.cf.taste.impl.neighborhood does not exist
import org.apache.mahout.cf.taste.impl.neighborhood.*;
^
RecommenderIntro.java:5: error: package
org.apache.mahout.cf.taste.impl.recommender does not exist
import org.apache.mahout.cf.taste.impl.recommender.*;
^
RecommenderIntro.java:6: error: package
org.apache.mahout.cf.taste.impl.similarity does not exist
import org.apache.mahout.cf.taste.impl.similarity.*;
^
RecommenderIntro.java:7: error: package org.apache.mahout.cf.taste.model does
not exist
import org.apache.mahout.cf.taste.model.*;
^
RecommenderIntro.java:8: error: package org.apache.mahout.cf.taste.neighborhood
does not exist
import org.apache.mahout.cf.taste.neighborhood.*;
^
RecommenderIntro.java:9: error: package org.apache.mahout.cf.taste.recommender
does not exist
import org.apache.mahout.cf.taste.recommender.*;
^
RecommenderIntro.java:10: error: package org.apache.mahout.cf.taste.similarity
does not exist
import org.apache.mahout.cf.taste.similarity.*;
^
RecommenderIntro.java:22: error: cannot find symbol
DataModel model = new FileDataModel(new File("intro.csv"));
^
symbol: class DataModel
location: class RecommenderIntro
RecommenderIntro.java:22: error: cannot find symbol
DataModel model = new FileDataModel(new File("intro.csv"));
^
symbol: class FileDataModel
location: class RecommenderIntro
RecommenderIntro.java:24: error: cannot find symbol
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
^
symbol: class UserSimilarity
location: class RecommenderIntro
RecommenderIntro.java:24: error: cannot find symbol
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
^
symbol: class PearsonCorrelationSimilarity
location: class RecommenderIntro
RecommenderIntro.java:25: error: cannot find symbol
UserNeighborhood neighborhood =
^
symbol: class UserNeighborhood
location: class RecommenderIntro
RecommenderIntro.java:26: error: cannot find symbol
new NearestNUserNeighborhood(2, similarity, model);
^
symbol: class NearestNUserNeighborhood
location: class RecommenderIntro
RecommenderIntro.java:28: error: cannot find symbol
Recommender recommender = new GenericUserBasedRecommender(
^
symbol: class Recommender
location: class RecommenderIntro
RecommenderIntro.java:28: error: cannot find symbol
Recommender recommender = new GenericUserBasedRecommender(
^
symbol: class GenericUserBasedRecommender
location: class RecommenderIntro
RecommenderIntro.java:31: error: cannot find symbol
List<RecommendedItem> recommendations =
^
symbol: class RecommendedItem
location: class RecommenderIntro
RecommenderIntro.java:34: error: cannot find symbol
for (RecommendedItem recommendation : recommendations) {
^
symbol: class RecommendedItem
location: class RecommenderIntro
18 errors
Thanks.
Regards
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.