{ "info": { "author": "pluskid & kronuz & zsp007", "author_email": "pluskid@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing" ], "description": "pymmseg-cpp\n by pluskid & kronuz\n http://github.com/pluskid/pymmseg-cpp\n\n== DESCRIPTION:\n\npymmseg-cpp is a Python interface to rmmseg-cpp. rmmseg-cpp is a high\nperformance Chinese word segmentation utility for Ruby. However, the\ncore part is written in C++ independent of Ruby. So I decide to write\na Python interface for it in order to use it in my Python project.\n\n== FEATURES:\n\n* Runs fast and the memory consumption is small.\n\n* Support user customized dictionaries.\n\n* UTF-8 and Unicode encoding is supported.\n\n== SYNOPSIS:\n\n=== A simple script\n\npymmseg-cpp provides a simple script (bin/pymmseg), which can read the\ntext from standard input and print the segmented result to standard\noutput. Try pymmseg -h for help on the options.\n\n=== As a Python module\n\nTo use pymmseg-cpp in normal Python program, first import the module and\ninit by loading the dictionaries:\n\n from pymmseg import mmseg\n\n mmseg.Dictionary.load_dictionaries()\n\nIf you want to load your own customized dictionaries, please customize\n``mmseg.Dictionary.dictionaries`` before calling load_dictionaries.\n\nThen create an Algorithm iterable object and iterate through it:\n\n algor = mmseg.Algorithm(text)\n for tok in algor:\n print '%s [%d..%d]' % (tok.text, tok.start, tok.end)\n\n=== Customize the dictionary\n\nYou can also load your own character dictionary or word dictionary in the\nfollowing way:\n\n from pymmseg import mmseg\n\n mmseg.dict_load_words('customize_words.dic')\n mmseg.dict_load_chars('customize_chars.dic')\n\n==== Format for chars.dic\n\n* each line contains the freq of the character, a space, and then the character\n\n==== Format for words.dic\n\n* each line contains the length of the word, a space, and then the word\n\n==== WARNING\n\n* The length of the word means number of characters in the word, not number of bytes\n* The format of words.dic is different from chars.dic, see above\n* There should be a newline at the end of all the dict file\n\n== REQUIREMENTS:\n\n* python 2.5+\n* g++\n\n== INSTALLATION:\n\npymmseg-cpp should be installed using pip or setuptools:\n\n pip install pymmseg-cpp\n\n easy_install pymmseg-cpp\n\nDownload the package at\nhttp://code.google.com/p/pymmseg-cpp/downloads/list. If you download\nthe source tarball, you'll need to compile it by using:\n\n python setup.py build\n\nif you download the pre-compiled version, this step can be skipped.\nThen copy the pymmseg directory to your Python's package path. e.g.\n/usr/lib/python2.5/site-packages/ . Now you can use pymmseg in your\napplication.\n\n== CONTRIBUTIONS:\n\nPython native extension code contributed by German M. Bravo (Kronuz)\nfor a ~400% performance boost under Python.\n\n== LICENSE:\n\n(The MIT License)\n\nCopyright (c) 2012\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/pluskid/pymmseg-cpp/archive/master.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pluskid/pymmseg-cpp", "keywords": "mmseg chinese word segmentation tokenization", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pymmseg", "package_url": "https://pypi.org/project/pymmseg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pymmseg/", "project_urls": { "Download": "https://github.com/pluskid/pymmseg-cpp/archive/master.tar.gz", "Homepage": "http://github.com/pluskid/pymmseg-cpp" }, "release_url": "https://pypi.org/project/pymmseg/1.2.0/", "requires_dist": null, "requires_python": null, "summary": "pyMMSeg-cpp, a high performance Chinese word segmentation utility.", "version": "1.2.0" }, "last_serial": 748483, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "cb39f98b116388b6de1b39929577ea59", "sha256": "3bbf532c0b9728a89845c4c04f2249afc283e9248ad00c60a0eda0c7c4c9c82f" }, "downloads": -1, "filename": "pymmseg-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cb39f98b116388b6de1b39929577ea59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 513934, "upload_time": "2013-02-11T01:07:00", "url": "https://files.pythonhosted.org/packages/89/ee/cf97622814e83a8cb7912d71a22ede82e278935efa136007fe2dfc9f6370/pymmseg-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb39f98b116388b6de1b39929577ea59", "sha256": "3bbf532c0b9728a89845c4c04f2249afc283e9248ad00c60a0eda0c7c4c9c82f" }, "downloads": -1, "filename": "pymmseg-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cb39f98b116388b6de1b39929577ea59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 513934, "upload_time": "2013-02-11T01:07:00", "url": "https://files.pythonhosted.org/packages/89/ee/cf97622814e83a8cb7912d71a22ede82e278935efa136007fe2dfc9f6370/pymmseg-1.2.0.tar.gz" } ] }