Re: Extending the Java compiler
2008-03-03 20:12:58 GMT
Sebastiano Vigna wrote: > We propose you to integrate our changes in your distribution so to both > distributing a much faster version, and avoiding us the problem of > releasing a forked compiler for MG4J. I'm pleased to say I've just committed various fixes supplied by you to the snowball HEAD. However, the patch I received didn't quite work (it referenced a non-existent AbstractSnowballTermProcessor class, for a start), so what I've committed is slightly different to the contents of the patch. For reference, the changes I committed are at http://svn.tartarus.org/trunk/snowball/?rev=502&root=Snowball&view=rev Rather than add a SnowballStemmer class which is a near duplicate of SnowballProgram (ie, identical except for the added stem() method), I added a SnowballStemmer class which inherits fom SnowballProgram. I think this makes sense, but let me know if it is a problem. The generated stemming algorithms inherit from SnowballStemmer, since they all have a stem() method. > MG4J contains a high-performance implementation of strings called > MutableString. We want to avoid StringBuffer/String whenever possible, > and use MutableString instead. To avoid dependency on MutableString, > however, and the inherent slowness of StringBuffer (which is > synchronised) at the same time, we propose to compile by default for > Java 1.5 using StringBuilder instead (the Java replacement for > StringBuffer). This change is now applied. However, in order to allow either StringBuffer or StringBuilder to be used, I had to add overloaded versions of SnowballProgram.slice_to() and assign_to(). (The other(Continue reading)
RSS Feed