{ "info": { "author": "Florian Brucker", "author_email": "mail@florianbrucker.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Compilers", "Topic :: Text Processing :: Linguistic" ], "description": "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", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/torfuspolymorphus/sbl2py", "keywords": "snowball compiler", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sbl2py", "package_url": "https://pypi.org/project/sbl2py/", "platform": "any", "project_url": "https://pypi.org/project/sbl2py/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/torfuspolymorphus/sbl2py" }, "release_url": "https://pypi.org/project/sbl2py/0.1.0-2/", "requires_dist": null, "requires_python": null, "summary": "A Snowball-to-Python compiler", "version": "0.1.0-2" }, "last_serial": 1180953, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "552b79fa4c69fa3016423a61ece7c937", "sha256": "87f2463c1ce9d780afb45683cfc3d8b7daa1539ad85cc1c9679e834960585b17" }, "downloads": -1, "filename": "sbl2py-0.1.0.tar.gz", "has_sig": false, "md5_digest": "552b79fa4c69fa3016423a61ece7c937", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16124, "upload_time": "2014-08-05T12:54:47", "url": "https://files.pythonhosted.org/packages/c9/0d/f29756ac2ffaf2715417c6547c17b380df3a7879459df8a56dfeb39c97b9/sbl2py-0.1.0.tar.gz" } ], "0.1.0-1": [ { "comment_text": "", "digests": { "md5": "1551fb600c982fbd0d5f67c84114d3e0", "sha256": "7b7cab57fba127f725696a1ac15ed23cdc508f90c2250ed7bbc4ea5c3772551a" }, "downloads": -1, "filename": "sbl2py-0.1.0-1.tar.gz", "has_sig": false, "md5_digest": "1551fb600c982fbd0d5f67c84114d3e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16872, "upload_time": "2014-08-05T18:24:44", "url": "https://files.pythonhosted.org/packages/8b/9a/35a90894d80db3ec91149155f0f2f798aa4a6fc6c52276a694c7de1cc7f9/sbl2py-0.1.0-1.tar.gz" } ], "0.1.0-2": [ { "comment_text": "", "digests": { "md5": "0ad8309bf52cf7647dce582d775c85ea", "sha256": "39cc0ed71fb77cfe1007c9c94e5b78a294f255f8c73a6998f6c889dafc5dcb72" }, "downloads": -1, "filename": "sbl2py-0.1.0-2.tar.gz", "has_sig": false, "md5_digest": "0ad8309bf52cf7647dce582d775c85ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17170, "upload_time": "2014-08-05T18:44:19", "url": "https://files.pythonhosted.org/packages/74/c8/5c06bbaa104683ecc0a814dbc651cea09a38afed02bdf5e5017e7a185940/sbl2py-0.1.0-2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0ad8309bf52cf7647dce582d775c85ea", "sha256": "39cc0ed71fb77cfe1007c9c94e5b78a294f255f8c73a6998f6c889dafc5dcb72" }, "downloads": -1, "filename": "sbl2py-0.1.0-2.tar.gz", "has_sig": false, "md5_digest": "0ad8309bf52cf7647dce582d775c85ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17170, "upload_time": "2014-08-05T18:44:19", "url": "https://files.pythonhosted.org/packages/74/c8/5c06bbaa104683ecc0a814dbc651cea09a38afed02bdf5e5017e7a185940/sbl2py-0.1.0-2.tar.gz" } ] }