semvec/pypi-packages huggingface dataset:
cwsplit 0.4.1
Compund word splitter for enchant supported languages
License: MIT
Keywords: compound word splitter language english german

cwsplit
=======

|build status|

Compound Word Splitter (cwsplit) for any language supported by
`enchant <https://www.abisource.com/projects/enchant/>`__.

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

Make sure you have enchant dictionary installed.

You can check the list of installed packages by running:

.. code:: python

    import enchant
    print(enchant.list_languages())

Check the `pyenchant <https://github.com/rfk/pyenchant>`__ and
`enchant <https://www.abisource.com/projects/enchant/>`__ links for more
info.

Usage
-----

Import module:

.. code:: python

    from cwsplit import split

For German (Default)

.. code:: python

    split('Rindfleisch')
    # ['rind', 'fleisch']

For English:

.. code:: python

    split('blackboard', 'en_en')
    # ['black', 'board']

or

.. code:: python

    from cwsplit import load_dict
    load_dict('en_en')
    split('blackboard')
    # ['black', 'board']

Sometimes the word is misspelled or just doesn’t exist. By deafult the
word will be split in characters until the longer word shows up.

Positive effect of this behaviour is the connecting letters like ‘s’ in
*überwachungsaufgaben* will be isolated.

On the other hand, let’s imagine we have a non-existing word
*gibberishfleisch*, this will be decompounded into words *gib*, *b*,
*e*, *r*, *i*, *s*, *h* and *fleisch*.

.. code:: python

    split('gibberishfleisch', language='de_de')
    # ['gib', 'b', 'e', 'r', 'i', 's', 'h', 'fleisch']

This does not look good at all. This is why you can select the sortest
word size, so all shorter consecutive words will be concatenated. For
example, let’s define the shortest ward as 4 characters long:

.. code:: python

    split('gibberishfleisch', language='de_de', min_word_size=4)
    # ['gibberish', 'fleisch']

Now we get two words *gibberish* and *fleisch*, which is something you
would expect.

This will not affect the correct words that have a connecting ‘s’.

For example:

.. code:: python

    split('übertragungsgesetz', min_word_size=4)
    # ['übertragung','s', 'gesetz']

remains correct.

Algorithm
---------

This is a very simple recursive algorithm that looks up for the longest
word inside of the provided word, by checking if it exists in the
`enchant <https://www.abisource.com/projects/enchant/>`__ dictionary.
The output is always returned as a list of strings. If no shorter words
are found, the input word will be return as a single element list.

Developers
----------

Upload script uses `pandoc <https://pandoc.org/installing.html>`__ to
convert README.md to README in *rst* fromat, needed in order to create
the package. Make sure you have it installed if you plan to use the
script.

.. |build status| image:: http://img.shields.io/travis/username/repo/master.svg?style=flat
   :target: https://travis-ci.com/fatkaratekid/cwsplit
topos 0.0.6
Mesh generation with a blend of python and maths
License: MIT
Requires Python: >=3.0

Topos
=====

.. list-table::
    :stub-columns: 1

    * - docs
      - |docs|
    * - code
      - |travis| |coveralls|
    * - pypi
      - |version| |supported-versions|

.. |travis| image:: https://travis-ci.org/alcarney/topos.svg?branch=dev
    :target: https://travis-ci.org/alcarney/topos

.. |coveralls| image:: https://coveralls.io/repos/github/alcarney/topos/badge.svg?branch=dev
    :target: https://coveralls.io/github/alcarney/topos?branch=dev

.. |docs| image:: https://readthedocs.org/projects/topos/badge/?version=latest
    :target: http://topos.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. |version| image:: https://img.shields.io/pypi/v/topos.svg
    :alt: PyPI Package latest release
    :target: https://pypi.python.org/pypi/topos

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/topos.svg
    :alt: Supported versions
    :target: https://pypi.python.org/pypi/topos

Creating 3D meshes with a blend of python and maths

**DISCLAIMER**: It is very early stages for this package and features may be
added/broken/removed without warning while the core concepts are hashed out.

README under construction...

Developing
----------

**IMPORTANT**: The following commands all need to be run from the root of this
project

Topos uses `pipenv`_ to manage dependencies and virtual environments. The first
step is to create a virtual environemnt

.. code-block:: sh

    $ pipenv --three

Then with your virtual environment created install all the dependencies

.. code-block:: sh

    $ pipenv install --dev

Finally to work within the virtual environment you have created run

.. code-block:: sh

    $ pipenv shell


.. _pipenv: https://docs.pipenv.org/