{"id":19076496,"url":"https://github.com/torfsen/sbl2py","last_synced_at":"2026-06-19T19:32:27.400Z","repository":{"id":19342677,"uuid":"22581738","full_name":"torfsen/sbl2py","owner":"torfsen","description":"A Snowball-to-Python compiler","archived":false,"fork":false,"pushed_at":"2023-02-27T15:29:42.000Z","size":3276,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T16:11:05.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torfsen.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","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":"2014-08-03T19:15:24.000Z","updated_at":"2021-05-09T18:42:24.000Z","dependencies_parsed_at":"2025-01-02T18:35:19.100Z","dependency_job_id":null,"html_url":"https://github.com/torfsen/sbl2py","commit_stats":null,"previous_names":["torfuspolymorphus/sbl2py"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/torfsen/sbl2py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fsbl2py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fsbl2py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fsbl2py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fsbl2py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torfsen","download_url":"https://codeload.github.com/torfsen/sbl2py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torfsen%2Fsbl2py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34546192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":[],"created_at":"2024-11-09T01:59:33.003Z","updated_at":"2026-06-19T19:32:27.378Z","avatar_url":"https://github.com/torfsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"sbl2py - A Snowball-to-Python Compiler\n######################################\n*sbl2py* translates code written in the Snowball_ string processing\nlanguage into Python_::\n\n    import sbl2py\n    import sbl2py.utils\n\n    sbl_code = \"\"\"\n    externals ( stem )\n    define stem as (\n        backwards ( ['ly'] delete )\n    )\n    \"\"\"\n    py_code = sbl2py.translate_string(sbl_code)\n    module = sbl2py.utils.module_from_code('demo_module', py_code)\n    print module.stem('fabulously')\n\nOutput::\n\n    fabulous\n\n.. _Snowball: http://snowball.tartarus.org/compiler/snowman.html\n.. _Python: https://www.python.org\n\n\nFeatures\n========\n*sbl2py* should support all of the Snowball features that are commonly\nused. In particular, all features used by the stemming algorithms from\nthe Snowball stemmer package are supported.\n\n\nInstallation\n============\nInstalling *sbl2py* is easy using pip_::\n\n    pip install sbl2py\n\n.. _pip: http://pip.readthedocs.org/en/latest/index.html\n\n\nUsage\n=====\nThe easiest way to translate a Snowball file into a Python module is\nusing the ``sbl2py`` script which is automatically installed with\n*sbl2py*::\n\n    sbl2py SNOWBALL_FILE PYTHON_FILE\n\nSee ``sbl2py --help`` for the available options.\n\nYou can also use *sbl2py* from within Python. The ``sbl2py`` module\noffers two functions that translate Snowball code from a string\n(``translate_string``) or a file (``translate_file``) and return the\ncorresponding Python source as a string. If you want to execute the\ncode, simply use the ``module_from_code`` function of the\n``sbl2py.utils`` module.\n\nThe generated Python modules export all routines from the original\nSnowball code that are listed in the ``externals`` section. That is,\nif you have ``externals ( stem )`` in your Snowball code and store\nthe generated Python module in a file called ``mystemmer.py`` then\nyou can call the ``stem`` routine as follows::\n\n    import mystemmer\n    print mystemmer.stem('foobar')\n\nLicense\n=======\n*sbl2py* is covered by the `MIT License`_. The Snowball source code\nand the word lists in the ``test`` directory are covered by the\n`BSD-3 License`_. Please see the ``LICENSE`` file for details.\n\n.. _`MIT License`: http://opensource.org/licenses/MIT\n.. _`BSD-3 License`: http://opensource.org/licenses/BSD-3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fsbl2py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorfsen%2Fsbl2py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorfsen%2Fsbl2py/lists"}