Stemming with german2 on hyphenated compound words

Simon <[email protected]> Tue, 24 Sep 2024 10:23:23 +0200
Newsgroups gmane.comp.search.snowball
Message-ID <trinity-8ab9e424-0e13-4ad5-ae5d-87168430b71a-1727166203849@3c-app-gmx-bs29>
--===============2972710652243415933==
Content-Type: text/html; charset=UTF-8

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello,<br/>
<br/>
I have a problem using the german2 stemmer on hyphenated compound words&nbsp;with ElasticSearch.</div>

<div>&nbsp;</div>

<div>As an example I have 2 words: &quot;Export-Schnittstelle&quot; and &quot;Schnittstelle&quot;, for these words the stemmer creates &quot;Export-Schnittstell&quot; or &quot;Schnittstell&quot; respectively, which is great because with the right tokenization I can now search for &quot;Schnitstelle&quot; (which the stemmer within my search analyzer will transform to &quot;Schnittstell&quot;) and it will match the second part from the word &quot;Export-Schnittstelle&quot; aka &quot;Export-Schnittstell&quot;.&nbsp;<br/>
<br/>
Now I would expect that this is how it works for all hyphenated&nbsp;compound words. But unfortunately that&#39;s not the case. So I now have 2 other words &quot;PA-Schiene&quot; and &quot;Schiene&quot;. Here the stemmer creates two completely different words: &quot;PA-Schi&quot; and &quot;Schien&quot;.&nbsp;&nbsp;</div>

<div>&nbsp;</div>

<div>Can someone explain to my why this is and if there is a way to fix this? Maybe by using different stemming, like light_german oder minimal_german?<br/>
<br/>
I&#39;ll post this on the elasticsearch discussion board as well, as I&#39;m not sure if this is entirely the right place for the question, but I&#39;d be thankful for any insight on the topic.<br/>
<br/>
Thanks in advance.<br/>
<br/>
Best Regards<br/>
Simon</div></div></body></html>


--===============2972710652243415933==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Snowball-discuss mailing list
[email protected]
https://lists.tartarus.org/mailman/listinfo/snowball-discuss

--===============2972710652243415933==--