Skip to main content

porter2

A python wrapper around surgebase's porter2 implimentation.

The surgebase library impliments a finate state machine and as such has very good performance. For more information see Credits

Usage

from porter2 import stem

print(stem("running"))
# "run"

What does the python library do?

In order to make this wrapper library I took the porter2.go file from Surgebase, made a few small modifications including making the stem function accept and return C strings and renaming the package to main. I then compiled that file to C, and provided a small wrapper to call the c version.

Becuase the C version of porter2.go is 2.4 MB, I went ahead and compressed it using Python's built in bz2 and added the zipper module to unzip it on first use. The bz2 version is about 0.8 MB. As a result of the decompression step, the very first time porter2 is imported it will take a fraction of a second longer than future imports.

Alternatives for Porter2 in Python

Credits and Info

I'm not clear on the relationship between surgebase and Jian Zhen but zhenjl appears to deserve authorship credit and surgebase is where I found the go implimentation.

Additional Info

Metadata

Release files for porter2 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for porter2 0.1.1
File Size Uploaded Provenance
porter2-0.1.1.tar.gz 820.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for porter2 0.1.1
File Interpreter ABI Platform
porter2-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / porter2-0.1.1.tar.gz

Download URL porter2-0.1.1.tar.gz
Size 820.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ecd64e7bb9b768cf64bc9b2d459fedad666b9bd0414f331b331928a2833aef85
BLAKE2b-256 checksum
How to use checksums
68ec60bf82bec2bc77d5417555a13c0d9e2db09a2366010e5dae1f6e69504a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / porter2-0.1.1-py3-none-any.whl

Download URL porter2-0.1.1-py3-none-any.whl
Size 817.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc2cd6d3dfe61c57ec1e482cf03044cdc3b1a9c8730fa444d1b6226374a0daeb
BLAKE2b-256 checksum
How to use checksums
ffead5829c638158aa2870af74640c52836021db83d5cb7fc1766329dca164a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Security for porter2 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page