mlmorph


Namemlmorph JSON
Version 1.3.8 PyPI version JSON
download
home_pageNone
SummaryMalayalam morphology analyser
upload_time2024-04-12 10:42:46
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords malayalam morphology fst analyser generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Python Interface for Malayalam morphology analyser
==================================================
.. image:: https://img.shields.io/pypi/v/mlmorph.svg
    :target: https://pypi.python.org/pypi/mlmorph
    :alt: PyPI Version

This is python interface for the `Malayalam morphology analyser - mlmorph`_.

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

Python 3 is required. Using with `venv`_ is recommended

  .. code-block:: console

    $ pip install mlmorph

Usage
-----

Morphological analysis example
-----------------------------------

  .. code-block:: python

    from mlmorph import Analyser
    analyser = Analyser()
    analyser.analyse("കേരളത്തിന്റെ")


Gives

  .. code-block:: python

    [('കേരളം<np><genitive>', 179)]


The second item in this result is the weight. Sometimes a single word can have multiple analysis. The analysis with less weight is the preferred analysis.

Morphological generator example
--------------------------------

  .. code-block:: python

    from mlmorph import Generator
    generator = Generator()
    generator.generate("കേരളം<np><genitive>")


Gives

  .. code-block:: python

    (('കേരളത്തിന്റെ', 0.0),)


Command line interface
--------------------------

  .. code-block:: console

    $ python -m mlmorph --help
    usage: __main__.py [-h] [-i INFILE] [-a] [-g] [-v]

    optional arguments:
      -h, --help            show this help message and exit
      -i INFILE, --input INFILE
                            source of analysis data
      -a, --analyse         Analyse the input file strings
      -g, --generate        Generate the input file strings
      -v, --verbose         print verbosely while processing


Accepts strings from stdin too. For example:

  .. code-block:: console

    $ python -m mlmorph -a
    നിറങ്ങൾ
    നിറങ്ങൾ   നിറം<n><pl>

.. _`Malayalam morphology analyser - mlmorph`: https://gitlab.com/smc/mlmorph
.. _`venv`: https://docs.python.org/3/library/venv.html

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mlmorph",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Malayalam, morphology, FST, analyser, generator",
    "author": null,
    "author_email": "Santhosh Thottingal <santhosh.thottingal@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6f/7f/d04a17165d191f95381d739c1a5d855abece666cb0701640553bd0671c01/mlmorph-1.3.8.tar.gz",
    "platform": null,
    "description": "Python Interface for Malayalam morphology analyser\n==================================================\n.. image:: https://img.shields.io/pypi/v/mlmorph.svg\n    :target: https://pypi.python.org/pypi/mlmorph\n    :alt: PyPI Version\n\nThis is python interface for the `Malayalam morphology analyser - mlmorph`_.\n\nInstallation\n------------\n\nPython 3 is required. Using with `venv`_ is recommended\n\n  .. code-block:: console\n\n    $ pip install mlmorph\n\nUsage\n-----\n\nMorphological analysis example\n-----------------------------------\n\n  .. code-block:: python\n\n    from mlmorph import Analyser\n    analyser = Analyser()\n    analyser.analyse(\"\u0d15\u0d47\u0d30\u0d33\u0d24\u0d4d\u0d24\u0d3f\u0d28\u0d4d\u0d31\u0d46\")\n\n\nGives\n\n  .. code-block:: python\n\n    [('\u0d15\u0d47\u0d30\u0d33\u0d02<np><genitive>', 179)]\n\n\nThe second item in this result is the weight. Sometimes a single word can have multiple analysis. The analysis with less weight is the preferred analysis.\n\nMorphological generator example\n--------------------------------\n\n  .. code-block:: python\n\n    from mlmorph import Generator\n    generator = Generator()\n    generator.generate(\"\u0d15\u0d47\u0d30\u0d33\u0d02<np><genitive>\")\n\n\nGives\n\n  .. code-block:: python\n\n    (('\u0d15\u0d47\u0d30\u0d33\u0d24\u0d4d\u0d24\u0d3f\u0d28\u0d4d\u0d31\u0d46', 0.0),)\n\n\nCommand line interface\n--------------------------\n\n  .. code-block:: console\n\n    $ python -m mlmorph --help\n    usage: __main__.py [-h] [-i INFILE] [-a] [-g] [-v]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -i INFILE, --input INFILE\n                            source of analysis data\n      -a, --analyse         Analyse the input file strings\n      -g, --generate        Generate the input file strings\n      -v, --verbose         print verbosely while processing\n\n\nAccepts strings from stdin too. For example:\n\n  .. code-block:: console\n\n    $ python -m mlmorph -a\n    \u0d28\u0d3f\u0d31\u0d19\u0d4d\u0d19\u0d7e\n    \u0d28\u0d3f\u0d31\u0d19\u0d4d\u0d19\u0d7e   \u0d28\u0d3f\u0d31\u0d02<n><pl>\n\n.. _`Malayalam morphology analyser - mlmorph`: https://gitlab.com/smc/mlmorph\n.. _`venv`: https://docs.python.org/3/library/venv.html\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Malayalam morphology analyser",
    "version": "1.3.8",
    "project_urls": null,
    "split_keywords": [
        "malayalam",
        " morphology",
        " fst",
        " analyser",
        " generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f7fd04a17165d191f95381d739c1a5d855abece666cb0701640553bd0671c01",
                "md5": "7055d52bc021824d79a0f69921d84ca5",
                "sha256": "75b64aefdef23202949d3a0c7aabe3c47b8ccc82962cdc98d1019b861e2641ae"
            },
            "downloads": -1,
            "filename": "mlmorph-1.3.8.tar.gz",
            "has_sig": false,
            "md5_digest": "7055d52bc021824d79a0f69921d84ca5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5600309,
            "upload_time": "2024-04-12T10:42:46",
            "upload_time_iso_8601": "2024-04-12T10:42:46.943468Z",
            "url": "https://files.pythonhosted.org/packages/6f/7f/d04a17165d191f95381d739c1a5d855abece666cb0701640553bd0671c01/mlmorph-1.3.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-12 10:42:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mlmorph"
}
        
Elapsed time: 0.22912s