How to setup German stemmer?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to setup German stemmer?

Tobias Lohr
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
Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

Tobias Lohr
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
>

Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

Shalin Shekhar Mangar
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

RE: How to setup German stemmer?

steve_rowe
In reply to this post by Tobias Lohr
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

Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

Tobias Lohr
In reply to this post by Shalin Shekhar Mangar
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 <[hidden email]> 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
>>>
>>>      
>>    
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

Tobias Lohr
In reply to this post by steve_rowe
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
>
>  

Reply | Threaded
Open this post in threaded view
|

RE: How to setup German stemmer?

steve_rowe
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

Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

hossman
In reply to this post by Tobias Lohr

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

Reply | Threaded
Open this post in threaded view
|

Re: How to setup German stemmer?

Tobias Lohr
In reply to this post by steve_rowe
@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
>
>