Porter2 Stemmer
An implementation of the Porter2 English stemming algorithm.
Free software: BSD license
Documentation: http://porter2-stemmer.readthedocs.org/
What is stemming?
Stemming is a technique used in Natural Language Processing to reduce different inflected forms of words to a single invariant root form. The root form is called the stem and may or may not be identical to the morphological root of the word.
What is it good for?
Lots of things, but query expansion in information retrieval is the canonical example. Let’s say you are building a search engine. If someone searches for “cat” it would be nice if they were shown documents that contained the word “cats” too. Unless the query and document index are stemmed, that won’t happen. Stemming can be thought of as a method to reduce the specificity of queries in order to pull back more relevant results. As such, it involves a trade-off.
What type of stemmer is this?
Porter2 is a suffix-stripping stemmer. It transforms words into stems by applying a deterministic sequence of changes to the final portion of the word. Other stemmers work differently. They may, for instance, simply look up the inflected form in a table and map it to a morphological root, or they may use a clustering approach to map diverse forms to a centre form. Different approaches have different advantages and disadvantages.
How do I use it?
Very simply. Import it, instantiate a stemmer, and away you go:
from porter2stemmer import Porter2Stemmer
stemmer = Porter2Stemmer()
print(stemmer.stem('conspicuous'))
History
1.0 (2016-03-31)
First release on PyPI.
Metadata
Release files for porter2stemmer 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| porter2stemmer-1.0.tar.gz | 14.3 kB | Without provenance | Details for porter2stemmer-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| porter2stemmer-1.0-py2.7.egg | Legacy Egg format | - | - | Details for porter2stemmer-1.0-py2.7.egg |
Total release size: 23.6 kB
Release files / porter2stemmer-1.0.tar.gz
| Download URL | porter2stemmer-1.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba478ad6550258a1fd8e102e554387dd9ac73f73059483eefee98211f0ad5244
|
|
BLAKE2b-256 checksum How to use checksums |
d7e8ce7cc2c30bee2cdb68686340480e1183b3af3be530c54ef06ffa1658c836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / porter2stemmer-1.0-py2.7.egg
| Download URL | porter2stemmer-1.0-py2.7.egg |
|---|---|
| Size | 9.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
561b2537767a086e3bd33558e8f3cd4cb60ee2b0240c4c06eb98754601db34dd
|
|
BLAKE2b-256 checksum How to use checksums |
29566268d7bd5974bc947b87718b25d85dd21c154e5054debb19d6d0cf7fc5d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for porter2stemmer 1.0
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.