You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tobias Lohr <to...@gmx.de> on 2008/02/04 16:13:19 UTC

How to setup German stemmer?

Hi,

I wonder how I can setup a German stemmer correctly in a list of filters 
for a field type definition.

Neither

<filter class="solr.GermanStemFilterFactory"/>

nor

<filter class="org.apache.solr.analysis.GermanStemFilterFactory"/>

works. Any suggestions?

Thanks, Tobi

Re: How to setup German stemmer?

Posted by Tobias Lohr <to...@gmx.de>.
Your suggestions don't work either! Both

<filter class="org.apache.solr.analysis.GermanStemFilter"/> and <filter 
class="solr.GermanStemFilter"/>

lead to

org.apache.solr.core.SolrException: Error loading class ..

> Probably someone who knows more about this can shed some light, but
> aren't you supposed to use GermanStemFilter instead of
> GermanStemFilterFactory ?
>
> On Feb 5, 2008 1:27 AM, Tobias Lohr <to...@gmx.de> wrote:
>   
>> No ideas??
>>
>>     
>>> Hi,
>>>
>>> I wonder how I can setup a German stemmer correctly in a list of
>>> filters for a field type definition.
>>>
>>> Neither
>>>
>>> <filter class="solr.GermanStemFilterFactory"/>
>>>
>>> nor
>>>
>>> <filter class="org.apache.solr.analysis.GermanStemFilterFactory"/>
>>>
>>> works. Any suggestions?
>>>
>>> Thanks, Tobi
>>>
>>>       
>>     
>
>
>
>   


Re: How to setup German stemmer?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Probably someone who knows more about this can shed some light, but
aren't you supposed to use GermanStemFilter instead of
GermanStemFilterFactory ?

On Feb 5, 2008 1:27 AM, Tobias Lohr <to...@gmx.de> wrote:
> No ideas??
>
> > Hi,
> >
> > I wonder how I can setup a German stemmer correctly in a list of
> > filters for a field type definition.
> >
> > Neither
> >
> > <filter class="solr.GermanStemFilterFactory"/>
> >
> > nor
> >
> > <filter class="org.apache.solr.analysis.GermanStemFilterFactory"/>
> >
> > works. Any suggestions?
> >
> > Thanks, Tobi
> >
>
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: How to setup German stemmer?

Posted by Tobias Lohr <to...@gmx.de>.
No ideas??
> Hi,
>
> I wonder how I can setup a German stemmer correctly in a list of 
> filters for a field type definition.
>
> Neither
>
> <filter class="solr.GermanStemFilterFactory"/>
>
> nor
>
> <filter class="org.apache.solr.analysis.GermanStemFilterFactory"/>
>
> works. Any suggestions?
>
> Thanks, Tobi
>


Re: How to setup German stemmer?

Posted by Chris Hostetter <ho...@fucit.org>.
First off: you have to be more specific about what you mean when you say 
neither ... or ... works" .. what happens?  Do you get an error on 
startup?  what does the error look like?

You also have to be clear about which version of Solr you are using ... 
GermanStemFilterFactory was added after Solr 1.2.

: I wonder how I can setup a German stemmer correctly in a list of filters for a
: field type definition.
: 
: Neither
: 
: <filter class="solr.GermanStemFilterFactory"/>
: 
: nor
: 
: <filter class="org.apache.solr.analysis.GermanStemFilterFactory"/>
: 
: works. Any suggestions?



-Hoss


Re: How to setup German stemmer?

Posted by Tobias Lohr <to...@gmx.de>.
@steve:

Your suggestion

    <filter class="solr.analysis.GermanStemFilterFactory"/>

didn't work either. But anyway, the snowball porter filter worked. 

@rachel: 

As I already posted, I got the following error

   org.apache.solr.core.SolrException: Error loading class '...'

I use Solr 1.2
 

> Hi Tobi,
>
> On 02/04/2008 at 4:11 PM, Tobias Lohr wrote:
>   
>> On 02/04/2008 at 3:42 PM, Steven A Rowe wrote:
>>     
>>>  <filter class="solr.SnowballPorterFilterFactory" language="German"/>
>>>       
>> thanks for your hint. I've already tried this [...]
>>     
>
> Did it work?
>
>   
>> I wonder, whether this leads to the same or a different result.
>> If the latter, what is the difference between the stemmer and
>> the snowball variant?
>>     
>
> Here is a report on the algorithm used by Lucene's GermanStemmer, which you were initially attempting to use:
>
>    <http://www.inf.fu-berlin.de/inst/pubs/tr-b-99-16.abstract.html>
>
> And here is a description of the Snowball German stemming algorithm:
>
>    <http://snowball.tartarus.org/algorithms/german/stemmer.html>
>
> Also, if you want to make the GermanStemmer work, have you tried the following?:
>
>    <filter class="solr.analysis.GermanStemFilterFactory"/>
>
> Steve
>
>   


RE: How to setup German stemmer?

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Tobi,

On 02/04/2008 at 4:11 PM, Tobias Lohr wrote:
> On 02/04/2008 at 3:42 PM, Steven A Rowe wrote:
> >  <filter class="solr.SnowballPorterFilterFactory" language="German"/>
>
> thanks for your hint. I've already tried this [...]

Did it work?

> I wonder, whether this leads to the same or a different result.
> If the latter, what is the difference between the stemmer and
> the snowball variant?

Here is a report on the algorithm used by Lucene's GermanStemmer, which you were initially attempting to use:

   <http://www.inf.fu-berlin.de/inst/pubs/tr-b-99-16.abstract.html>

And here is a description of the Snowball German stemming algorithm:

   <http://snowball.tartarus.org/algorithms/german/stemmer.html>

Also, if you want to make the GermanStemmer work, have you tried the following?:

   <filter class="solr.analysis.GermanStemFilterFactory"/>

Steve


Re: How to setup German stemmer?

Posted by Tobias Lohr <to...@gmx.de>.
Hi Steve,

thanks for your hint. I've already tried this and I wonder, whether this 
leads to the same or a different result. If the latter, what is the 
difference between the stemmer and the snowball variant?

tobi
> Hi Tobi,
>
> On 02/04/2008 at 10:13 AM, Tobias Lohr wrote:
>   
>> Hi,
>>
>> I wonder how I can setup a German stemmer correctly in a list
>> of filters for a field type definition.
>>     
>
> >From <http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-b80fb581f4e078142c694014f1a8f60c0935e080>:
>
>     <filter class="solr.SnowballPorterFilterFactory" language="German" />
>
> "German2" is also listed as a valid language value.
>
> Steve
>
>   


RE: How to setup German stemmer?

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Tobi,

On 02/04/2008 at 10:13 AM, Tobias Lohr wrote:
> Hi,
> 
> I wonder how I can setup a German stemmer correctly in a list
> of filters for a field type definition.

>From <http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-b80fb581f4e078142c694014f1a8f60c0935e080>:

    <filter class="solr.SnowballPorterFilterFactory" language="German" />

"German2" is also listed as a valid language value.

Steve