You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by surf reta <su...@gmail.com> on 2011/07/11 03:42:58 UTC

the problem of importing org.apache.mahout.common.FileLineIterable

Dear All,

I am trying to compile the examples in "Mahout in Action". For chapter 05,
there is a program named as "GenderRescorer.java". It includes the following
class as following:

import org.apache.mahout.common.FileLineIterable;

However, the Eclipse gives the following error message:

The import org.apache.mahout.common.FileLineIterable cannot be resolved

I have included mahout-core library in the path. What is the reason cause
the above issue and how to fix it?

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by Dhruv Kumar <dk...@ecs.umass.edu>.
I don't use Eclipse, I use IntelliJ Idea (Thanks Ted) so I can only tell you
my experience for this particular IDE but it should give you an approach to
follow for Eclipse too.

In Idea, one has to import the Mahout jar files as dependencies into the
application. Provided that Mahout is installed properly, the jars which you
need are located under the core/target/ directory.  These jars contain all
packages, including the one which you need.






On Sun, Jul 10, 2011 at 10:11 PM, surf reta <su...@gmail.com> wrote:

> Based on the API documentation, it seems that this FileLineIterable
>  belongs
> to
> package org.apache.mahout.common.iterator
>
> But how can I ensure to import this specific package, and where to download
> it at first?
> I already included mahout-core in the build path. Shouldn't that includes
> this specific package? Thanks.
>
> On Sun, Jul 10, 2011 at 9:55 PM, Dhruv Kumar <dk...@ecs.umass.edu> wrote:
>
> > import org.apache.mahout.common.iterator.FileLineIterable;
> >
> > In general, you should consult the API documentation of Mahout for the
> > correct packages to import.
> >
> > https://builds.apache.org//job/Mahout-Quality/javadoc/
> >
> >
> >
> >
> >
> > On Sun, Jul 10, 2011 at 9:52 PM, edwin <ed...@gmail.com> wrote:
> >
> > > For debugging, you can probably hunt it down pretty quick in the
> source.
> > > perhaps package name needs "iterator" in the example code?
> > >
> > > cheers.
> > >
> > > On Jul 10, 2011, at 6:42 PM, surf reta wrote:
> > >
> > > > Dear All,
> > > >
> > > > I am trying to compile the examples in "Mahout in Action". For
> chapter
> > > 05,
> > > > there is a program named as "GenderRescorer.java". It includes the
> > > following
> > > > class as following:
> > > >
> > > > import org.apache.mahout.common.FileLineIterable;
> > > >
> > > > However, the Eclipse gives the following error message:
> > > >
> > > > The import org.apache.mahout.common.FileLineIterable cannot be
> resolved
> > > >
> > > > I have included mahout-core library in the path. What is the reason
> > cause
> > > > the above issue and how to fix it?
> > >
> > >
> >
>

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by surf reta <su...@gmail.com>.
Based on the API documentation, it seems that this FileLineIterable  belongs
to
package org.apache.mahout.common.iterator

But how can I ensure to import this specific package, and where to download
it at first?
I already included mahout-core in the build path. Shouldn't that includes
this specific package? Thanks.

On Sun, Jul 10, 2011 at 9:55 PM, Dhruv Kumar <dk...@ecs.umass.edu> wrote:

> import org.apache.mahout.common.iterator.FileLineIterable;
>
> In general, you should consult the API documentation of Mahout for the
> correct packages to import.
>
> https://builds.apache.org//job/Mahout-Quality/javadoc/
>
>
>
>
>
> On Sun, Jul 10, 2011 at 9:52 PM, edwin <ed...@gmail.com> wrote:
>
> > For debugging, you can probably hunt it down pretty quick in the source.
> > perhaps package name needs "iterator" in the example code?
> >
> > cheers.
> >
> > On Jul 10, 2011, at 6:42 PM, surf reta wrote:
> >
> > > Dear All,
> > >
> > > I am trying to compile the examples in "Mahout in Action". For chapter
> > 05,
> > > there is a program named as "GenderRescorer.java". It includes the
> > following
> > > class as following:
> > >
> > > import org.apache.mahout.common.FileLineIterable;
> > >
> > > However, the Eclipse gives the following error message:
> > >
> > > The import org.apache.mahout.common.FileLineIterable cannot be resolved
> > >
> > > I have included mahout-core library in the path. What is the reason
> cause
> > > the above issue and how to fix it?
> >
> >
>

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by Dhruv Kumar <dk...@ecs.umass.edu>.
import org.apache.mahout.common.iterator.FileLineIterable;

In general, you should consult the API documentation of Mahout for the
correct packages to import.

https://builds.apache.org//job/Mahout-Quality/javadoc/





On Sun, Jul 10, 2011 at 9:52 PM, edwin <ed...@gmail.com> wrote:

> For debugging, you can probably hunt it down pretty quick in the source.
> perhaps package name needs "iterator" in the example code?
>
> cheers.
>
> On Jul 10, 2011, at 6:42 PM, surf reta wrote:
>
> > Dear All,
> >
> > I am trying to compile the examples in "Mahout in Action". For chapter
> 05,
> > there is a program named as "GenderRescorer.java". It includes the
> following
> > class as following:
> >
> > import org.apache.mahout.common.FileLineIterable;
> >
> > However, the Eclipse gives the following error message:
> >
> > The import org.apache.mahout.common.FileLineIterable cannot be resolved
> >
> > I have included mahout-core library in the path. What is the reason cause
> > the above issue and how to fix it?
>
>

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by edwin <ed...@gmail.com>.
For debugging, you can probably hunt it down pretty quick in the source. perhaps package name needs "iterator" in the example code?

cheers.

On Jul 10, 2011, at 6:42 PM, surf reta wrote:

> Dear All,
> 
> I am trying to compile the examples in "Mahout in Action". For chapter 05,
> there is a program named as "GenderRescorer.java". It includes the following
> class as following:
> 
> import org.apache.mahout.common.FileLineIterable;
> 
> However, the Eclipse gives the following error message:
> 
> The import org.apache.mahout.common.FileLineIterable cannot be resolved
> 
> I have included mahout-core library in the path. What is the reason cause
> the above issue and how to fix it?


Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by Dhruv Kumar <dk...@ecs.umass.edu>.
Yes, 0.5 is the latest stable release.

However, it is recommended that you use the trunk build as instructed on:
https://cwiki.apache.org/confluence/display/MAHOUT/BuildingMahout

The API documentation link given on Mahout's website reflects the latest
trunk build as well.


On Mon, Jul 11, 2011 at 10:35 AM, surf reta <su...@gmail.com> wrote:

> I used the Mahout-0.5, is this thelatest one accompanying the examples in
> "Mahout in Action". Thanks.
>
> On Mon, Jul 11, 2011 at 5:09 AM, Sean Owen <sr...@gmail.com> wrote:
>
> > It has since moved to package
> > org.apache.mahout.common.iterator.FileLineIterable.
> > The final version fo the book would reflect changes like this.
> >
> > On Mon, Jul 11, 2011 at 2:42 AM, surf reta <su...@gmail.com> wrote:
> >
> > > Dear All,
> > >
> > > I am trying to compile the examples in "Mahout in Action". For chapter
> > 05,
> > > there is a program named as "GenderRescorer.java". It includes the
> > > following
> > > class as following:
> > >
> > > import org.apache.mahout.common.FileLineIterable;
> > >
> > > However, the Eclipse gives the following error message:
> > >
> > > The import org.apache.mahout.common.FileLineIterable cannot be resolved
> > >
> > > I have included mahout-core library in the path. What is the reason
> cause
> > > the above issue and how to fix it?
> > >
> >
>

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by surf reta <su...@gmail.com>.
I used the Mahout-0.5, is this thelatest one accompanying the examples in
"Mahout in Action". Thanks.

On Mon, Jul 11, 2011 at 5:09 AM, Sean Owen <sr...@gmail.com> wrote:

> It has since moved to package
> org.apache.mahout.common.iterator.FileLineIterable.
> The final version fo the book would reflect changes like this.
>
> On Mon, Jul 11, 2011 at 2:42 AM, surf reta <su...@gmail.com> wrote:
>
> > Dear All,
> >
> > I am trying to compile the examples in "Mahout in Action". For chapter
> 05,
> > there is a program named as "GenderRescorer.java". It includes the
> > following
> > class as following:
> >
> > import org.apache.mahout.common.FileLineIterable;
> >
> > However, the Eclipse gives the following error message:
> >
> > The import org.apache.mahout.common.FileLineIterable cannot be resolved
> >
> > I have included mahout-core library in the path. What is the reason cause
> > the above issue and how to fix it?
> >
>

Re: the problem of importing org.apache.mahout.common.FileLineIterable

Posted by Sean Owen <sr...@gmail.com>.
It has since moved to package
org.apache.mahout.common.iterator.FileLineIterable.
The final version fo the book would reflect changes like this.

On Mon, Jul 11, 2011 at 2:42 AM, surf reta <su...@gmail.com> wrote:

> Dear All,
>
> I am trying to compile the examples in "Mahout in Action". For chapter 05,
> there is a program named as "GenderRescorer.java". It includes the
> following
> class as following:
>
> import org.apache.mahout.common.FileLineIterable;
>
> However, the Eclipse gives the following error message:
>
> The import org.apache.mahout.common.FileLineIterable cannot be resolved
>
> I have included mahout-core library in the path. What is the reason cause
> the above issue and how to fix it?
>