you are absolutely right, it is because lucene-smartcn.jar is not included
in the mahout-examples-0.7-SNAPSHOT-job.jar!

thanks again and wish u a great day!

On Thu, Nov 22, 2012 at 1:48 AM, Jérémie Gomez <[email protected]>wrote:

> Hi,
>
> My understanding is that the seq2sparse command line uses this jar behind
> the scene :  examples/target/mahout-examples-0.8-SNAPSHOT-job.jar. It
> packages many dependencies, including
> org.apache.lucene.analysis.cn.ChineseAnalyzer, but not
> including org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer.
>
> If you want to use the SmartChineseAnalyzer you'll have to add it as a
> dependency either by modifying maven dependencies and rebuiling, or just by
> injecting the ChineseAnalyzer class into the jar (using jar xf, jar cf,
> etc.).
>
>
> Jeremie
>
> 2012/11/21 Phoenix Bai <[email protected]>
>
> > HI All,
> >
> > I tried to specify the analyzer class for seq2sparse, but it is throwing
> > ClassNotFoundException.
> >
> > I tried two and some is working, and others not:
> >
> > 1) works perfectly: -a org.apache.lucene.analysis.WhitespaceAnalyzer
> > 2) works perfectly: -a org.apache.lucene.analysis.cn.ChineseAnalyzer
> > 3) not working: -a
> >  org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
> > throws "java.lang.ClassNotFoundException:
> > org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer"
> >
> > to check if the jar is in the classpath:
> > $mahout classpath
> >
> > result:
> >
> >
> ...:/cloud/mahout-0.7/lib/lucene-queries-3.6.0.jar:/cloud/mahout-0.7/lib/lucene-smartcn-3.6.1.jar:...
> >
> > it is there.
> >
> > I can`t figure out what goes wrong here.
> > so, could you please enlighten me?
> >
> > thank you very much in advance!
> >
>

Reply via email to