<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear Olly,</p>
<p>I found the solution to my problem. I had the PyStemmer library
installed on my conda system as well. <br>
</p>
<p>This caused snowballstemmer to use PyStemmer functions, as
mentioned in the repo by shibukawa <br>
</p>
<p>"if <strong>PyStemmer</strong> is installed, <code>snowballstemmer.stemmer</code>
returns <code>PyStemmer</code>'s <code>Stemmer</code> objects.
This <code>Stemmer</code> object has same methods (<code>Stemmer.stemWord()</code>,
<code>Stemmer.stemWords()</code>).". <br>
</p>
<p>Unfortunately, PyStemmer only supports a fraction of the
snowballstemmer languages.</p>
<p>Thank you very much for your effort!</p>
<p>Best</p>
<p>Konstantin<br>
</p>
<div class="moz-cite-prefix">On 03.03.2020 21:25, Olly Betts wrote:<br>
</div>
<blockquote type="cite" cite="mid:20200303202532.GS22303@survex.com">
<pre class="moz-quote-pre" wrap="">On Tue, Mar 03, 2020 at 02:51:44PM +0100, Konstantin Gavras wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On PyPi I found the snowballstemmer library, which mentions having a
Lithuanian stemming algorithm implemented. However, when running the
library in Python, the Lithuanian algorithm is not available. Am I doing
anything wrong?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Works for me (tested with Python 2 only because I can't remember how you
create a virtual env with Python 3 - it should work with either):
$ virtualenv ENV
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/olly/ENV/bin/python2
Also creating executable in /home/olly/ENV/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
$ . ENV/bin/activate
(ENV) $ pip install snowballstemmer
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at <a class="moz-txt-link-freetext" href="https://pip.pypa.io/en/latest/development/release-process/#python-2-support">https://pip.pypa.io/en/latest/development/release-process/#python-2-support</a>
Collecting snowballstemmer
Downloading snowballstemmer-2.0.0-py2.py3-none-any.whl (97 kB)
|████████████████████████████████| 97 kB 1.9 MB/s
Installing collected packages: snowballstemmer
Successfully installed snowballstemmer-2.0.0
(ENV) $ python -c 'import snowballstemmer; s=snowballstemmer.stemmer("lithuanian"); print(s.stemWord("abatas"))'
abat
I think you'll need to share a minimal script which doesn't work for you.
Cheers,
Olly
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Konstantin Leonardo Gavras (M.A.)
University of Mannheim
Chair of Political Science/Political Psychology
A5, 6
Room 328
68131 Mannheim
Tel.: 0621 181-2083</pre>
</body>
</html>