<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Jakub,</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
What you need is a compiled version of the stemmer (snowball.exe, if you're on Windows like me) ,</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
and then convert the snowball file with this program to a python script<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm no expert on Python or C, but maybe I can help you along the road :</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
1) I assume maybe you cloned the source from <a href="https://github.com/snowballstem/pystemmer" id="LPlnk923030">
https://github.com/snowballstem/pystemmer</a> ?</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
note that there is also a <a href="https://github.com/snowballstem/snowball/tree/master/python/snowballstemmer" id="LPNoLP412061">
https://github.com/snowballstem/snowball/tree/master/python/snowballstemmer</a> <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(newer version?) under snowball project itself : <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
2) From what I understand of the readme.md file of Pystemmer project, <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
it uses the c-compiler as a plugin, but maybe that's no longer necessary, <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
if you compile *.sbl snowball file to *.py, as follows :</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
3) You will have to "make" the snowball compiler with a "make" file, <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
and also the same for any snowball-language algorithm you generate.</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
4) I'm on windows, so if you're using Linux or mac I don't know how this works and you will have to adjust for OS what follows, </div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
but when I compiled a local copy of the "snowball.exe" standalone compiler, <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
from <a href="https://github.com/snowballstem/snowball/" id="LPNoLP773354">https://github.com/snowballstem/snowball/</a>
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I used the GCC compiler (GNU Compiler Collection), which comes with android studio,
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
by running a batch file in the directory that contains the c- sources and headers,
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The batch file contains this (single line, use without [ ] brackets): <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
[gcc space.c tokeniser.c analyser.c generator.c driver.c generator_csharp.c generator_java.c generator_js.c generator_python.c generator_rust.c generator_go.c generator_pascal.c -o
<b>snowball.exe</b>]</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
5) Quick solution (otherwise you have to work with PATH variable etc.): <br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Copy/move this "snowball.exe" to the directory with the algorithms, it can then compile snowball algorithms to python, java, c etc ...</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
like so: (also line from a batch file,use without [ ] brackets,this can be more lines if you compile more languages)
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>[snowball lithuanian.sbl -<b>PY</b> <i>-u</i> -o LithuanianStemmer -n LithuanianStemmer -p org.tartarus.snowball.SnowballStemmer -U
<b>20190309</b>]<br>
</span><span></span></div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
note : <b>-PY </b>is used to generate python files and <span>2019(/)03(/)09</span> is the date I used to serialize.
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
note 2: <i>-u</i> was for using UTF8, but in the latest version this seems only necessary for "c"-compilation, you can probably remove this.<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-> if it works well, you should now have "LithuanianStemmer.py"<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
6) from <a href="https://github.com/snowballstem/snowball/tree/master/python/snowballstemmer" id="LPNoLP245149">
https://github.com/snowballstem/snowball/tree/master/python/snowballstemmer</a>, you need the two files:</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><a title="among.py" href="https://github.com/snowballstem/snowball/blob/master/python/snowballstemmer/among.py">among.py</a> and
<span><a title="basestemmer.py" href="https://github.com/snowballstem/snowball/blob/master/python/snowballstemmer/basestemmer.py">basestemmer.py</a></span>, because they are referenced in the "LithuanianStemmer.py" file.</span><br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Happy Coding,</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Gerrit De Meulder</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Van:</b> Snowball-discuss <snowball-discuss-bounces@lists.tartarus.org> namens Jakub M³ynarz <mlynarzsrem@gmail.com><br>
<b>Verzonden:</b> woensdag 27 februari 2019 17:57<br>
<b>Aan:</b> snowball-discuss@lists.tartarus.org<br>
<b>Onderwerp:</b> [Snowball-discuss] Lithuanian stemmer</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">Hi,
<div>I'm going to create a project in Python which should use Lithuanian stemmer. </div>
<div>I have read that the Lithuanian stemmer algorithm was created in 2018 but when I tried to use PyStemmer or pure snowball stemmer library there was no possibility to use that algorithm. Is there any possibility to do this? Could I get any hints? I also
have a problem with building a project using 'make' command. I need '<a href="http://algorithms.mk">algorithms.mk</a>' file and I have no idea how to create it. How can I do it?</div>
<div><br>
</div>
<div>Thank you in advance<br>
</div>
<div>Jakub M³ynarz</div>
</div>
</div>
</div>
</div>
</body>
</html>