Malayalam morphology analyser
Project description
This is python interface for the Malayalam morphology analyser - mlmorph.
Installation
Python 3 is required. Using with venv is recommended
$ pip install mlmorph
Usage
Morphological analysis example
from mlmorph import Analyser analyser = Analyser() analyser.analyse("കേരളത്തിന്റെ")
Gives
[('കേരളം<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
from mlmorph import Generator generator = Generator() generator.generate("കേരളം<np><genitive>")
Gives
(('കേരളത്തിന്റെ', 0.0),)
Command line interface
$ 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:
$ python -m mlmorph -a നിറങ്ങൾ നിറങ്ങൾ നിറം<n><pl>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mlmorph-1.4.0.tar.gz
(5.6 MB
view details)
File details
Details for the file mlmorph-1.4.0.tar.gz
.
File metadata
- Download URL: mlmorph-1.4.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 672dd3c66af61d9ff4ed3ff238ad979e91ac83d78cb73c54adf07761948ecda6 |
|
MD5 | cead3a5f640df2ffb8060be8950541b8 |
|
BLAKE2b-256 | cfbaa9fdc04a028c69c9c364ac6045e2d23adeb48212801bf3103a2d1e600204 |