[Snowball-discuss] Lithuanian stemmer in snowballstemmer Python library
Olly Betts
olly at survex.com
Tue Mar 3 20:25:32 GMT 2020
On Tue, Mar 03, 2020 at 02:51:44PM +0100, Konstantin Gavras wrote:
> 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?
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 https://pip.pypa.io/en/latest/development/release-process/#python-2-support
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
More information about the Snowball-discuss
mailing list