{"id":35048492,"url":"https://github.com/kajuberdut/porter2","last_synced_at":"2026-05-20T17:35:22.060Z","repository":{"id":57454217,"uuid":"434471057","full_name":"kajuberdut/porter2","owner":"kajuberdut","description":"A python wrapper around surgebase's porter2 implementation.","archived":false,"fork":false,"pushed_at":"2023-06-05T04:08:07.000Z","size":820,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-25T20:58:13.079Z","etag":null,"topics":["nlp","snowball","stemming","stemming-porters"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kajuberdut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-03T04:56:46.000Z","updated_at":"2021-12-05T16:25:12.000Z","dependencies_parsed_at":"2024-06-20T20:11:44.643Z","dependency_job_id":"a96e6387-3897-40d2-ad7a-6c54464944fa","html_url":"https://github.com/kajuberdut/porter2","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"a849a544c60c128557687f368516815871eba848"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kajuberdut/porter2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kajuberdut%2Fporter2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kajuberdut%2Fporter2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kajuberdut%2Fporter2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kajuberdut%2Fporter2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kajuberdut","download_url":"https://codeload.github.com/kajuberdut/porter2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kajuberdut%2Fporter2/sbom","scorecard":{"id":547974,"data":{"date":"2025-08-11","repo":{"name":"github.com/kajuberdut/porter2","commit":"a849a544c60c128557687f368516815871eba848"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T10:01:35.776Z","repository_id":57454217,"created_at":"2025-08-20T10:01:35.776Z","updated_at":"2025-08-20T10:01:35.776Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28076549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nlp","snowball","stemming","stemming-porters"],"created_at":"2025-12-27T09:03:44.811Z","updated_at":"2025-12-27T09:04:08.204Z","avatar_url":"https://github.com/kajuberdut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# porter2\nA python wrapper around surgebase's porter2 implimentation. \n\nThe surgebase library impliments a finate state machine and as such has very good performance.\nFor more information see [Credits](#credits-and-info)\n\n## Usage\n```python\nfrom porter2 import stem\n\nprint(stem(\"running\"))\n# \"run\"\n```\n\n## What does the python library do?\nIn order to make this wrapper library I took the porter2.go file from Surgebase, made a few small modifications including\nmaking the stem function accept and return C strings and renaming the package to main.\nI then compiled that file to C, and provided a [small wrapper](https://github.com/kajuberdut/porter2/blob/main/porter2/__init__.py) to call the C version.\n\nBecuase 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](https://github.com/kajuberdut/porter2/blob/main/porter2/surgebase/zipper.py) to unzip it\non 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 small amount of time longer than future imports.\n\n## Alternatives for Porter2 in Python\n* [pystemmer](https://github.com/snowballstem/pystemmer)\n* [A Python version](https://github.com/evandempsey/porter2-stemmer)\n* [Another Python version from Whoosh](https://github.com/mchaput/whoosh/blob/main/src/whoosh/lang/porter2.py)\n\n## Credits and Info\nI'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.\n* [Martin Porter](https://en.wikipedia.org/wiki/Martin_Porter)\n* [SurgeBase for go source](https://github.com/surgebase/porter2)\n* [Jian Zhen](https://github.com/zhenjl)\n\n## Additional Info\n* [Jian Zhen's blog post](https://zhen.org/blog/generating-porter2-fsm-for-fun-and-performance/)\n* [Porter 2 Wikipedia Entry](https://en.wikipedia.org/wiki/Stemming)\n* [History of the Porter Stemmer](https://tartarus.org/martin/PorterStemmer/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajuberdut%2Fporter2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkajuberdut%2Fporter2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajuberdut%2Fporter2/lists"}