lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiwei Wang <ww.wang...@gmail.com>
Subject Re: SnowballAnalyzer and StopAnalyzer.ENGLISH_STOP_WORDS_SET ?
Date Mon, 14 Dec 2009 13:28:42 GMT
you can construct your own analyser as SnowballAnalyzer does and as a result
you can adapt to the new Lucene version(now 3.0.0)
http://lucene.apache.org/java/3_0_0/api/contrib-snowball/org/apache/lucene/analysis/snowball/SnowballAnalyzer.html


On Mon, Dec 14, 2009 at 8:55 PM, Nick Burch <nick@torchbox.com> wrote:

> Hi All
>
> I'm upgrading my code from 2.4 to 2.9, and I've hit an issue with
> deprecations.
>
> My old code was:
>        new SnowballAnalyzer("English", StopAnalyzer.ENGLISH_STOP_WORDS);
>
> Looking at the JavaDocs, I'd expected that the new format would be:
>        new SnowballAnalyzer(Version.LUCENE_CURRENT, "English",
> StopAnalyzer.ENGLISH_STOP_WORDS_SET);
>
> However, while StopAnalyzer has depcrecated ENGLISH_STOP_WORDS in favour of
> ENGLISH_STOP_WORDS_SET, and while SnowballAnalyzer seems to use a Set based
> stopwords list internally, there doesn't seem to be a constructor for
> SnowballAnalyzer that takes a set, only a String[] one
>
> Has anyone hit this before? Am I safe to make a patch to SnowballAnalyzer
> to create a matching constructor taking Set rather than String[] so I can
> use the non deprecated stopwords from StopAnalyzer, or am I barking up the
> wrong tree here?
>
> Thanks
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Weiwei Wang
Alex Wang
王巍巍
Room 403, Mengmin Wei Building
Computer Science Department
Gulou Campus of Nanjing University
Nanjing, P.R.China, 210093

Homepage: http://cs.nju.edu.cn/rl/weiweiwang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message