Norwegian stemmer question

Blake Madden <[email protected]> Sat, 26 Jul 2025 13:50:27 +0000
Newsgroups gmane.comp.search.snowball
Message-ID <DM8P221MB0310A5A2DE4F6584853ADDBFBA58A@DM8P221MB0310.NAMP221.PROD.OUTLOOK.COM>
--===============7315382497693561284==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_DM8P221MB0310A5A2DE4F6584853ADDBFBA58ADM8P221MB0310NAMP_"

--_000_DM8P221MB0310A5A2DE4F6584853ADDBFBA58ADM8P221MB0310NAMP_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I was trying to understand the recent changes to the Norwegian stemmer, in =
particular step 1 for "ers".  The rule states:

(b) ers
find the longest suffix preceding ers, and perform the action indicated.

(i> amm   ast   ind   kap   kk   lt   nk   omm   pp   v   =F8st
do nothing
(ii> giv   hav   skap
delete ers suffix
Something I'm confused by is that "balders" gets stemmed to "bald", accordi=
ng to the output files. Why is the "ers" removed in this case? It isn't pro=
ceeded by "giv", "hav", or "skap", so it shouldn't be deleted. And nothing =
in step 2 or 3 is looking at "ers", so it shouldn't be getting removed ther=
e.

Also, I'm confused by where it says for "amm   ast   ind   kap   kk   lt   =
nk   omm   pp   v   =F8st" to "do nothing"? Why are these explicitly mentio=
ned? If it isn't "giv   hav   skap", then nothing should happen anyway, rig=
ht? If "ers" is proceeded by "bald", I would expect for it to not delete an=
ything.

I tried looking at the Snowball code and I noticed this:

  'giv' 'hav' 'skap' ''
    (delete)

There is a blank '' included in the list of values in front of the suffix t=
hat would trigger a delete. What does that imply, it's not explained in the=
 docs.

Thank you for any clarification,
Blake

--_000_DM8P221MB0310A5A2DE4F6584853ADDBFBA58ADM8P221MB0310NAMP_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
Hello,</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
I was trying to understand the recent changes to the Norwegian stemmer, in =
particular step 1 for &quot;<b><i>ers</i></b>&quot;.&nbsp; The rule states:=
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<dt class=3D"elementToProof"><span style=3D"font-family: Calibri, Helvetica=
, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">(<i>b</i>)
<b><i>ers</i></b> </span></dt><dd class=3D"elementToProof"><span style=3D"f=
ont-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, =
0, 0);">find the longest suffix preceding
<b><i>ers</i></b>, and perform the action indicated. </span>
<dl><dt><span style=3D"font-family: Calibri, Helvetica, sans-serif; font-si=
ze: 12pt; color: rgb(0, 0, 0);">(<i>i</i>&gt;
<b><i>amm &nbsp; ast &nbsp; ind &nbsp; kap &nbsp; kk &nbsp; lt &nbsp; nk &n=
bsp; omm &nbsp; pp &nbsp; v &nbsp; =F8st</i></b> </span></dt><dd><span styl=
e=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: r=
gb(0, 0, 0);">do nothing
</span></dd><dt><span style=3D"font-family: Calibri, Helvetica, sans-serif;=
 font-size: 12pt; color: rgb(0, 0, 0);">(<i>ii</i>&gt;
<b><i>giv &nbsp; hav &nbsp; skap</i></b> </span></dt><dd><span style=3D"fon=
t-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,=
 0);">delete
<b><i>ers</i></b>&nbsp;suffix </span></dd></dl>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
Something I'm confused by is that &quot;balders&quot; gets stemmed to &quot=
;bald&quot;, according to the output files. Why is the &quot;ers&quot; remo=
ved in this case? It isn't proceeded by &quot;giv&quot;, &quot;hav&quot;, o=
r &quot;skap&quot;, so it shouldn't be deleted. And nothing in step 2 or 3 =
is looking at &quot;ers&quot;,
 so it shouldn't be getting removed there.</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; color: rgb(0, 0,=
 0);" class=3D"elementToProof">
<span style=3D"font-size: 12pt;">Also, I'm confused by where it says for &q=
uot;<b><i>amm &nbsp; ast &nbsp; ind &nbsp; kap &nbsp; kk &nbsp; lt &nbsp; n=
k &nbsp; omm &nbsp; pp &nbsp; v &nbsp; =F8st</i></b>&quot; to &quot;do noth=
ing&quot;? Why are these explicitly mentioned? If it isn't &quot;</span><sp=
an style=3D"font-size: 16px; background-color: rgb(255, 255, 255);"><b><i>g=
iv
 &nbsp; hav &nbsp; skap</i></b></span><span style=3D"font-size: 12pt;">&quo=
t;, then nothing should happen anyway, right? If &quot;ers&quot; is proceed=
ed by &quot;bald&quot;, I would expect for it to not delete anything.</span=
></div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
I tried looking at the Snowball code and I noticed this:</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
&nbsp; 'giv' 'hav' 'skap' ''<br>
&nbsp; &nbsp; (delete)</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
There is a blank '' included in the list of values in front of the suffix t=
hat would trigger a delete. What does that imply, it's not explained in the=
 docs.</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
Thank you for any clarification,</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);" class=3D"elementToProof">
Blake</div>
</dd></body>
</html>

--_000_DM8P221MB0310A5A2DE4F6584853ADDBFBA58ADM8P221MB0310NAMP_--


--===============7315382497693561284==
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

--===============7315382497693561284==--