lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Bugs in contrib/snowball/.../SnowballProgram.java -> Kraaij-Pohlmann gives Index-OOB Exception
Date Mon, 11 Dec 2006 19:30:56 GMT
Andreas, I could generate the error as you describe.
You can report this bug in http://issues.apache.org/jira/browse/LUCENE

There seem to be a few updates in http://snowball.tartarus.org not
reflected currently in Lucene -
  - SnowballProgram.java has this bug fix as you describe

  The algorithms seem to have changed in a few of the stemmers:
  - DanishStemmer
  - EnglishStemmer
  - FrenchStemmer
  - ItalianStemmer
  - NorwegianStemmer
  - PortugueseStemmer
  - RussianStemmer
  - SpanishStemmer
  - SwedishStemmer

  Added stemmer:
  - HungarianStemmer

  Cosmetic changes:
  - FinishStemmer
  - GermanStemmer

So I guess it might be worth to update all these in Lucene.

"Andreas Kohn" <andreas.kohn@gmail.com> wrote on 11/12/2006 10:18:16:

> Hi,
>
> while playing with the various stemmers of Lucene(-1.9.1), I got an
> index out of bounds exception:
>
> lucene-1.9.1>java -cp
> build/contrib/snowball/lucene-snowball-1.9.2-dev.jar
> net.sf.snowball.TestApp Kp bla.txt
> Exception in thread "main" java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:64)
>         at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:615)
>         at net.sf.snowball.TestApp.main(TestApp.java:56)
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out
> of range: 11
>         at java.lang.StringBuffer.charAt(StringBuffer.java:303)
>         at net.sf.snowball.SnowballProgram.
> find_among_b(SnowballProgram.java:270)
>         at net.sf.snowball.ext.KpStemmer.r_Step_4(KpStemmer.java:1122)
>         at net.sf.snowball.ext.KpStemmer.stem(KpStemmer.java:1997)
>
> This happens when executing
> lucene-1.9.1>java -cp
> build/contrib/snowball/lucene-snowball-1.9.2-dev.jar
> net.sf.snowball.TestApp Kp bla.txt
>
> bla.txt contains just this word: 'spijsvertering'.
>
> After some debugging, and some tests with the original snowball
> distribution from snowball.tartarus.org, it seems that the attached
> change is needed to avoid the exception.
> (The change comes from tartarus' SnowballProgram.java)
> Can anyone confirm? Should I open a bug? Do you need more details?
>
> Regards,
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message