MoDeST: a Morphological Decomposition & Segmentation Trove.
Project description
MoDeST: a Morphological Decomposition & Segmentation Trove
The point of MoDeST is two-fold:
- Provide a general object-oriented Python interface to access morphological decompositions and segmentations;
- Host morphological datasets generated by smaller research groups that would otherwise have a hard time being found.
Morphological decomposition is the task of recognising which building blocks a word was originally constructed from. These building blocks are its morphemes.
As an example, the Dutch derivation isometrisch ("isometric") can be decomposed into the morphemes iso, meter and isch.
Morphological segmentation is the task of isolating the substrings of a word that correspond to its morphemes. These substrings are called morphs.
In the above example, the segmentation would be iso/metr/ic.
pip install modest[all]
Languages and Datasets
The supported languages are simply under modest.languages, so the list will not be reproduced here.
The list of datasets roughly coincides with the downloaders under modest.datasets. Currently, the package supports:
- CELEX
- MorphyNet
- MorphoChallenge2010
- CompoundPiece
Example
Yes, it really is this easy, with full type checking and autocompletion by your IDE:
from modest.languages.english import English_Celex, English_MorphoChallenge2010, English_MorphyNet_Inflections
for item in English_Celex().generate():
print(item.word, "should be segmented as", item.segment(), "which derives from", item.decompose())
Repo layout
Currently, the repo looks as follows:
data/ ---> Datasets hosted specifically by MoDeST on GitHub. Will NOT be downloaded when you install the package.
src/modest/ ---> All source code for the Python package that will be installed in your interpreter.
languages/ ---> Per-language definitions of the dataset classes users will interact with.
datasets/ ---> Support code for pulling in remote data, and reading raw examples from the resulting files.
formats/ ---> Support code for turning raw examples into objects. Mainly used for parsing tags, whose format is independent of how they are stored (TSV, XML, JSON, ...).
interfaces/ ---> Declarations of the interfaces users will interact with.
transformations/ ---> Operations performed on datasets.
Currently, every language has its own file under languages/. The assumption is that the datasets pertaining to one language
are sufficiently encapsulated that this will not clutter the imports from such a file. There are two arguments in favour of
going from languages/{language}.py to instead languages/{language}/{dataset}.py:
- Autocompletion for the last
.of theimportsuggests exactly the list of available datasets for that language; - You do not have to have all the packages installed required to download/build all the datasets for a language if you only need one. (However, realistically, since MoDeST is for final datasets rather than making datasets, the code for pulling them should not be that complicated.)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modest_bauwenst-2026.3.1.tar.gz.
File metadata
- Download URL: modest_bauwenst-2026.3.1.tar.gz
- Upload date:
- Size: 41.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e49fa3e8894d52d60ce3b34357facac9aeecadfa6baf9165b1b25ad305970be8
|
|
| MD5 |
0e12924390f1ca1dcf5b711847f40e7e
|
|
| BLAKE2b-256 |
c0216b87fba1f83a9adf185791a311669c84aa1349ad5b21a0e6caee2c5820b9
|
File details
Details for the file modest_bauwenst-2026.3.1-py3-none-any.whl.
File metadata
- Download URL: modest_bauwenst-2026.3.1-py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633d57f8900ef5eac4e27f4ac7362dbb6978f0d90d4b9db4f061a88d0d4c3d96
|
|
| MD5 |
cda4e0e766636e2018f09dd23df59195
|
|
| BLAKE2b-256 |
8150b26faa9aa7928534f020480675180827deb341d6bb0ff1916ed50c04c4f3
|