{"id":43057082,"url":"https://github.com/mhardalov/bulstem-py","last_synced_at":"2026-01-31T11:30:32.065Z","repository":{"id":43064796,"uuid":"194669663","full_name":"mhardalov/bulstem-py","owner":"mhardalov","description":"Python re-implementation of the BulStem algorithm","archived":false,"fork":false,"pushed_at":"2022-12-08T11:19:17.000Z","size":884,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-04T06:34:24.541Z","etag":null,"topics":["bulgarian","bulgarian-language","natural-language-processing","nlp","nlp-library","python","python-library","stemmer","stemming-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mhardalov.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}},"created_at":"2019-07-01T12:36:38.000Z","updated_at":"2024-05-15T10:02:09.000Z","dependencies_parsed_at":"2023-01-25T12:16:09.173Z","dependency_job_id":null,"html_url":"https://github.com/mhardalov/bulstem-py","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mhardalov/bulstem-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhardalov%2Fbulstem-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhardalov%2Fbulstem-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhardalov%2Fbulstem-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhardalov%2Fbulstem-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhardalov","download_url":"https://codeload.github.com/mhardalov/bulstem-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhardalov%2Fbulstem-py/sbom","scorecard":{"id":639792,"data":{"date":"2025-08-11","repo":{"name":"github.com/mhardalov/bulstem-py","commit":"b24a182352977b61df7bff2f0998de046bbaa48f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.3 not signed: https://api.github.com/repos/mhardalov/bulstem-py/releases/29418351","Warn: release artifact v0.3.2 not signed: https://api.github.com/repos/mhardalov/bulstem-py/releases/29385525","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/mhardalov/bulstem-py/releases/29191340","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/mhardalov/bulstem-py/releases/29190833","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/mhardalov/bulstem-py/releases/19214233","Warn: release artifact v0.3.3 does not have provenance: https://api.github.com/repos/mhardalov/bulstem-py/releases/29418351","Warn: release artifact v0.3.2 does not have provenance: https://api.github.com/repos/mhardalov/bulstem-py/releases/29385525","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/mhardalov/bulstem-py/releases/29191340","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/mhardalov/bulstem-py/releases/29190833","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/mhardalov/bulstem-py/releases/19214233"],"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 'master'"],"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":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2022-288 / GHSA-6hrg-qmvc-2xh8","Warn: Project is vulnerable to: PYSEC-2024-167 / GHSA-cgvx-9447-vcch","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T10:22:23.010Z","repository_id":43064796,"created_at":"2025-08-21T10:22:23.010Z","updated_at":"2025-08-21T10:22:23.010Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28940403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bulgarian","bulgarian-language","natural-language-processing","nlp","nlp-library","python","python-library","stemmer","stemming-algorithm"],"created_at":"2026-01-31T11:30:31.231Z","updated_at":"2026-01-31T11:30:32.058Z","avatar_url":"https://github.com/mhardalov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BulStem-py: A Python Re-implementation of BulStem - inflectional stemmer for Bulgarian\n\n[![Build](https://img.shields.io/circleci/build/github/mhardalov/bulstem-py/master)](https://circleci.com/gh/mhardalov/bulstem-py)\n[![PyPI](https://img.shields.io/pypi/v/bulstem.svg)](https://pypi.python.org/pypi/bulstem) \n[![License](https://img.shields.io/github/license/mhardalov/bulstem-py.svg?color=blue)](https://github.com/mhardalov//bulstem-py/blob/master/LICENSE)\n\n\n## Introduction\nThis is the Python version of the BulStem stemming algorithm. It follows the algorithm presented in\n\n```\nNakov, P. BulStem: Design and evaluation of inflectional stemmer for Bulgarian. In Workshop on \nBalkan Language Resources and Tools (Balkan Conference in Informatics).\n```\n\nSee http://people.ischool.berkeley.edu/~nakov/bulstem/ for the homepage of the algorithm. Also, check the original [paper](http://people.ischool.berkeley.edu/~nakov/bulstem/BulStem.pdf) for more details and examples.\n\n## Implementation\n\nThis implementation, in contrast of the other available uses a Trie, instead of Dictionary/Hashtable/, in order to find the longest possible rule, that can be applied to a token.\n\nBasic algorithm steps:\n1. Find the position of the first vowel in the token.\n2. Find the longest possible rule by traversing the string in reverse order until there is a matching suffix, or down to the position of the first vowel (found in Step. 1).\n3. Prepend the non-stemmed prefix to the stemmed suffix (Step. 2).\n\n## Installation\n\nThis library is compatible with Python \u003e= 3.6.\n\nClone the repository and run:\n\n### With pip\n\n```bash\npip install -e .\npip install -r requirements.txt\n```\n\n### Test\n\nA set of tests are included in the project, under the [tests folder](https://github.com/mhardalov/bulstem-py/tree/master/tests).\nThe test suit can be run as follows:\n \n\n```bash\npip install -e \".[testing]\"\npip install -r requirements-test.txt\npython -m unittest\n```\n\n## Usage\n\nThe library works with a set of rules used for stemming. The rules can be either passed as a list to the `BulStemmer` constructor, or as a path to a file.\n\nFor both options the rules need to be formatted as follows:\n\n`word ==\u003e stem ==\u003e freq`\n\nA pre-defined set of rules is included in the package, and can be used directly. The stemming rules can be found [here](https://github.com/mhardalov/bulstem-py/tree/master/bulstem/stemrules). (examples: [Reading the rules from an external file](#reading-the-rules-from-an-external-file))\n\n### Manually loading rules\n\n```python\nfrom bulstem.stem import BulStemmer\n\nstemmer = BulStemmer([\"ой ==\u003e о 10\"], min_freq=0, left_context=2)\nstemmer.stem('порой')# Excepted output: 1. 'поро'\n```\n\n`BulStemmer` constructor params:\n1. `rules` - Iterable of strings containing rules.\n2. `min_freq` - The minimum frequency of a rule to be used when stemming.\n3. `left_context` - Size of the prefix which will not be stemmed.\n\n### Reading the rules from an external file\n\n```python\nfrom bulstem.stem import BulStemmer\n\n\n# Pre-defined names of rule sets\nPRE_DEFINED_RULES = ['stem-context-1', \n                     'stem-context-2',\n                     'stem-context-3']\n                     \n# Excepted output:\n# 1 втор\n# 2 втори\n# 3 вторият\nfor i, rules_name in enumerate(PRE_DEFINED_RULES, start=1):\n    stemmer = BulStemmer.from_file(rules_name, min_freq=2, left_context=i)\n    print(i, stemmer.stem('вторият'))\n\nstemmer = BulStemmer.from_file('stem_rules_context_2_utf8.txt', min_freq=2, left_context=i)\nstemmer.stem('вторият') # Excepted output: 1. 'втори'\nstemmer.stem('вероятен') # Excepted output: 1. 'вероят'\n```\n\n`BulStemmer.from_file` params:\n1. `path` - Path (or pre-defined name) to the rules file formatted as follows: word ==\u003e stem ==\u003e freq.\n2. `min_freq` - The minimum frequency of a rule to be used when stemming.\n3. `left_context` - Size of the prefix which will not be stemmed.\n\n\n## Other implementations\n\n[Perl (Original)](http://people.ischool.berkeley.edu/~nakov/bulstem/apply_stem.pl),\n[Java (JDK 1.4)](http://people.ischool.berkeley.edu/~nakov/bulstem/Stemmer.java),\n[Ruby](https://github.com/tbmihailov/bulstem),\n[C#](https://github.com/tbmihailov/bulstem-cs),\n[Python2](https://github.com/peio/PyBulStem),\n[GATE plugin (Java)](https://gate.ac.uk/gate/plugins/Lang_Bulgarian/src/gate/bulstem/BulStemPR.java)\n\n## License\n\nFor license information, see [LICENSE](https://github.com/mhardalov/bulstem-py/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhardalov%2Fbulstem-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhardalov%2Fbulstem-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhardalov%2Fbulstem-py/lists"}