c2.patch.jasplitter


Namec2.patch.jasplitter JSON
Version 1.0b1 PyPI version JSON
download
home_pagehttps://pypi.python.org/pypi/c2.patch.jasplitter
SummaryThis product is bugfix splitter of Plone for Japanese.
upload_time2024-02-06 02:52:29
maintainer
docs_urlNone
authorManabu TERADA
requires_python
licenseGPL version 2
keywords python plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

==============================================================================
c2.patch.jasplitter
==============================================================================


This product is bugfix splitter of Plone for Japanese.

Monkey patching below functions.

- Products.CMFPlone.UnicodeSplitter.splitter.bigram
- Products.CMFPlone.UnicodeSplitter.splitter.process_unicode
- Products.CMFPlone.UnicodeSplitter.splitter.process_unicode_glob

Details
--------

bigram
========

.. code-block:: python

    return [u[i : i + 2] for i in range(len(u) - limit)]


to

.. code-block:: python

    if len(u) == 1:
        return [u]
    else:
        return [u[i:i + 2] for i in range(len(u) - limit)]


process_unicode
================

.. code-block:: python

    swords = [g.group() for g in pattern.finditer(word)]
    for sword in swords:
        if not rx_all.match(sword[0]):
            yield sword
        else:
            yield from bigram(sword, 0)

to

.. code-block:: python

    swords = [g.group() for g in pattern.finditer(word)]
    for sword in swords:
        if not rx_all.match(sword[0]):
            yield sword
        else:
            for x in bigram(sword, 1):  # modified
                yield x

process_unicode_glob
=====================

.. code-block:: python

    if i == len(swords) - 1:
        limit = 1
    else:
        limit = 0

to

.. code-block:: python

    limit = 1


Installation
------------

Install c2.patch.jasplitter by adding it to your buildout::

    [buildout]

    ...

    eggs =
        c2.patch.jasplitter


and then running ``bin/buildout``


Contribute
----------

- Issue Tracker: https://bitbucket.org/cmscom/c2.patch.jasplitter/admin/issues
- Source Code: https://bitbucket.org/cmscom/c2.patch.jasplitter


Support
-------

If you are having issues, please let us know on the issue tracker.


License
-------

The project is licensed under the GPLv2.


Contributors
============

- Manabu TERADA, terada@cmscom.jp


Changelog
=========

1.0b1 (2024-02-06)
-------------------

- remove includeDependecies for plone6 compatibility.  [terapyon]

1.0a5 (2023-08-24)
-------------------

- Upload PyPI.  [terapyon]

1.0a4 (2023-08-17)
-------------------

- Support Python 3.  [terapyon]


1.0a3 (2017-03-9)
-----------------

- Support continual CJK and Ascii words. [terapyon]
- Missing packaging for MANIFEST [terapyon]


1.0a2 (2016-11-17)
------------------

- Package bugfix.
  [terapyon]


1.0a1 (unreleased)
------------------

- Initial release.
  [terapyon]

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.python.org/pypi/c2.patch.jasplitter",
    "name": "c2.patch.jasplitter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Python Plone",
    "author": "Manabu TERADA",
    "author_email": "terada@cmscom.jp",
    "download_url": "https://files.pythonhosted.org/packages/85/64/2bd28e415772e0e7d2d49a2b20067cae274969f768b060aa2595cedc4b3d/c2.patch.jasplitter-1.0b1.tar.gz",
    "platform": null,
    "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n==============================================================================\nc2.patch.jasplitter\n==============================================================================\n\n\nThis product is bugfix splitter of Plone for Japanese.\n\nMonkey patching below functions.\n\n- Products.CMFPlone.UnicodeSplitter.splitter.bigram\n- Products.CMFPlone.UnicodeSplitter.splitter.process_unicode\n- Products.CMFPlone.UnicodeSplitter.splitter.process_unicode_glob\n\nDetails\n--------\n\nbigram\n========\n\n.. code-block:: python\n\n    return [u[i : i + 2] for i in range(len(u) - limit)]\n\n\nto\n\n.. code-block:: python\n\n    if len(u) == 1:\n        return [u]\n    else:\n        return [u[i:i + 2] for i in range(len(u) - limit)]\n\n\nprocess_unicode\n================\n\n.. code-block:: python\n\n    swords = [g.group() for g in pattern.finditer(word)]\n    for sword in swords:\n        if not rx_all.match(sword[0]):\n            yield sword\n        else:\n            yield from bigram(sword, 0)\n\nto\n\n.. code-block:: python\n\n    swords = [g.group() for g in pattern.finditer(word)]\n    for sword in swords:\n        if not rx_all.match(sword[0]):\n            yield sword\n        else:\n            for x in bigram(sword, 1):  # modified\n                yield x\n\nprocess_unicode_glob\n=====================\n\n.. code-block:: python\n\n    if i == len(swords) - 1:\n        limit = 1\n    else:\n        limit = 0\n\nto\n\n.. code-block:: python\n\n    limit = 1\n\n\nInstallation\n------------\n\nInstall c2.patch.jasplitter by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        c2.patch.jasplitter\n\n\nand then running ``bin/buildout``\n\n\nContribute\n----------\n\n- Issue Tracker: https://bitbucket.org/cmscom/c2.patch.jasplitter/admin/issues\n- Source Code: https://bitbucket.org/cmscom/c2.patch.jasplitter\n\n\nSupport\n-------\n\nIf you are having issues, please let us know on the issue tracker.\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- Manabu TERADA, terada@cmscom.jp\n\n\nChangelog\n=========\n\n1.0b1 (2024-02-06)\n-------------------\n\n- remove includeDependecies for plone6 compatibility.  [terapyon]\n\n1.0a5 (2023-08-24)\n-------------------\n\n- Upload PyPI.  [terapyon]\n\n1.0a4 (2023-08-17)\n-------------------\n\n- Support Python 3.  [terapyon]\n\n\n1.0a3 (2017-03-9)\n-----------------\n\n- Support continual CJK and Ascii words. [terapyon]\n- Missing packaging for MANIFEST [terapyon]\n\n\n1.0a2 (2016-11-17)\n------------------\n\n- Package bugfix.\n  [terapyon]\n\n\n1.0a1 (unreleased)\n------------------\n\n- Initial release.\n  [terapyon]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "This product is bugfix splitter of Plone for Japanese.",
    "version": "1.0b1",
    "project_urls": {
        "Homepage": "https://pypi.python.org/pypi/c2.patch.jasplitter"
    },
    "split_keywords": [
        "python",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85642bd28e415772e0e7d2d49a2b20067cae274969f768b060aa2595cedc4b3d",
                "md5": "676c2e6e10bf41dbe922649246ae29ef",
                "sha256": "50fc39066c73d891f0a7a32307b6b10a3a5075ac85a1340b85d71a8ff2675ca6"
            },
            "downloads": -1,
            "filename": "c2.patch.jasplitter-1.0b1.tar.gz",
            "has_sig": false,
            "md5_digest": "676c2e6e10bf41dbe922649246ae29ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14233,
            "upload_time": "2024-02-06T02:52:29",
            "upload_time_iso_8601": "2024-02-06T02:52:29.875710Z",
            "url": "https://files.pythonhosted.org/packages/85/64/2bd28e415772e0e7d2d49a2b20067cae274969f768b060aa2595cedc4b3d/c2.patch.jasplitter-1.0b1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-06 02:52:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "c2.patch.jasplitter"
}
        
Elapsed time: 0.71592s