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
Metadata
Release files for krovetz 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| krovetz-1.0.2.tar.gz | 137.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| krovetz-1.0.2-cp37-cp37m-manylinux1_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| krovetz-1.0.2-cp36-cp36m-manylinux1_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.5+ x86-64 | Details |
| krovetz-1.0.2-cp36-cp36m-macosx_10_6_intel.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| krovetz-1.0.2-cp35-cp35m-manylinux1_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.5+ x86-64 | Details |
Total release size: 1.7 MB
Release files / krovetz-1.0.2.tar.gz
| Download URL | krovetz-1.0.2.tar.gz |
|---|---|
| Size | 137.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e7498a99d6bbbaab12d2a226dfeafaaa5a83b3a7986d98a67c81e16d04f534e
|
|
BLAKE2b-256 checksum How to use checksums |
b850a96094f63f2a0403afcc0d669da6d7d0c3a04b857473b3c1f821319e3c4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / krovetz-1.0.2-cp37-cp37m-manylinux1_x86_64.whl
| Download URL | krovetz-1.0.2-cp37-cp37m-manylinux1_x86_64.whl |
|---|---|
| Size | 421.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
eeef02f3a2b5a6d337b4ddbb261524f61a62209de514b18cfcd4ab3b56a264a8
|
|
BLAKE2b-256 checksum How to use checksums |
267f68fa47e906f2db5e71c4f037a3f7852b272096076681e712ab9250d8ba0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / krovetz-1.0.2-cp36-cp36m-manylinux1_x86_64.whl
| Download URL | krovetz-1.0.2-cp36-cp36m-manylinux1_x86_64.whl |
|---|---|
| Size | 421.0 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
60a0f8175c136af20532ba518be3458d9b806810c1c37803af7794ee51116fc1
|
|
BLAKE2b-256 checksum How to use checksums |
2b92f840e9fcf64fb11cbf3dd028f7dbe81b5c08155e9a9715881f3efd07107f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / krovetz-1.0.2-cp36-cp36m-macosx_10_6_intel.whl
| Download URL | krovetz-1.0.2-cp36-cp36m-macosx_10_6_intel.whl |
|---|---|
| Size | 311.8 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
c32d3bb4c9e8c4fa89613e9b34aa03a32df158151200653d4b1c7dbc6ada0435
|
|
BLAKE2b-256 checksum How to use checksums |
e82254837f60eaf73da29401844c805864f296494474da7e2a253f956a2ac46f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / krovetz-1.0.2-cp35-cp35m-manylinux1_x86_64.whl
| Download URL | krovetz-1.0.2-cp35-cp35m-manylinux1_x86_64.whl |
|---|---|
| Size | 420.4 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a7b983b2c8c7fc89abda5a389a4bcdab14baca12c3b8aa5f82e1b1f3e586e89
|
|
BLAKE2b-256 checksum How to use checksums |
fa1a2a89dbc97a22d679b42685344ab9b14982b5734bf5663940cc4c86ccf1e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|