Krovetz Stemmer
Project description
Py Krovetz
This is a Python wrapper for Krovetz Stemmer C++ library. It uses Cython to build a wrapper and allow access to the cpp object in python.
Usage
import krovetz
ks = krovetz.PyKrovetzStemmer()
ks.stem('walked')
Installation
Requirements
Python
All the requirements are handled automatic. However, tests have been made on Linux GNU and OSX using Python 3.5-3.6. Notice that using python 3.5 and macos might not work as some compilation of python 3.5 are linked to older versions of OpenSSL. This affects the communication of pip
and PyPI website when retrieving libraries. If you plan to use this combination, make sure that Python is linked to an updated version of OpenSSL.
python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Version should be 1.*.*
C++ compiler
The original code of the stemmer is written in C++
. Thus, a C++
compiler is needed when building yourself. If this is your decision, make sure you have a C++ compiler installed. We have tested gcc
in Linux system and clang
in MacOS. Regardless of this, other combinations and compilers might also work.
Setup
PyPI
PyPI provides a ready-to-go version (wheel) for different systems and Python versions.
pip install -i https://test.pypi.org/simple/ krovetz
If you want to force binary version:
pip install -i https://test.pypi.org/simple/ --only-binary=krovetz krovetz
Currently, we support distributions for Python 3.5 - 3.7 in Linux and Python 3.6 in macOS >= 10.9.
Compiling yourself
If you prefer to compile your own package, you can do it using the following command.
pip3 install -i https://test.pypi.org/simple/ --no-binary=krovetz krovetz
Using your own Cython
You can use your own Cython
to generate the c++ source. Our git repo only includes cython files (.pxd) and not the files generated by Cython
. Therefore, if you plan to install from here, you need to have Cython
installed in order to generate C++
files.
pip install cython
Then just do:
pip install git+https://github.com/ptorrestr/py_krovetz.git
Development
We are using pipenv to handle the development environment. This tool is very handy to manage different python versions and configurations.
Import
First, import the project in your machine
git clone https://github.com/ptorrestr/py_krovetz.git
Environment setup
You can install the environment needed just using the following command
pipenv install
Have a look on files Pipfile
and Pipfile.lock
in order to check the versions of the dependencies used in our development machine.
Testing
Test can be run using the environment defined by pipenv
.
pienv run python setup.py test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file krovetz-1.0.2.tar.gz
.
File metadata
- Download URL: krovetz-1.0.2.tar.gz
- Upload date:
- Size: 137.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e7498a99d6bbbaab12d2a226dfeafaaa5a83b3a7986d98a67c81e16d04f534e |
|
MD5 | 44c8f43b11a548e2ca900856a1afdc68 |
|
BLAKE2b-256 | b850a96094f63f2a0403afcc0d669da6d7d0c3a04b857473b3c1f821319e3c4d |
File details
Details for the file krovetz-1.0.2-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: krovetz-1.0.2-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 421.5 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeef02f3a2b5a6d337b4ddbb261524f61a62209de514b18cfcd4ab3b56a264a8 |
|
MD5 | b9ff2d1f41981d5e5a14d19389b17972 |
|
BLAKE2b-256 | 267f68fa47e906f2db5e71c4f037a3f7852b272096076681e712ab9250d8ba0a |
File details
Details for the file krovetz-1.0.2-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: krovetz-1.0.2-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 421.0 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60a0f8175c136af20532ba518be3458d9b806810c1c37803af7794ee51116fc1 |
|
MD5 | 3f871931e1fd24ef5170f93b01d54ba0 |
|
BLAKE2b-256 | 2b92f840e9fcf64fb11cbf3dd028f7dbe81b5c08155e9a9715881f3efd07107f |
File details
Details for the file krovetz-1.0.2-cp36-cp36m-macosx_10_6_intel.whl
.
File metadata
- Download URL: krovetz-1.0.2-cp36-cp36m-macosx_10_6_intel.whl
- Upload date:
- Size: 311.8 kB
- Tags: CPython 3.6m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32d3bb4c9e8c4fa89613e9b34aa03a32df158151200653d4b1c7dbc6ada0435 |
|
MD5 | dd80267b9bd743b32e67b1917fda7799 |
|
BLAKE2b-256 | e82254837f60eaf73da29401844c805864f296494474da7e2a253f956a2ac46f |
File details
Details for the file krovetz-1.0.2-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: krovetz-1.0.2-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 420.4 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a7b983b2c8c7fc89abda5a389a4bcdab14baca12c3b8aa5f82e1b1f3e586e89 |
|
MD5 | ce81e20be4229b07230d7e2759f01991 |
|
BLAKE2b-256 | fa1a2a89dbc97a22d679b42685344ab9b14982b5734bf5663940cc4c86ccf1e2 |