Registry / ai-ml / morfessor

morfessor

JSON →
library2.0.6pypypi✓ verified 83d ago

Morfessor is a tool for unsupervised morphological segmentation of words, often used in NLP and computational linguistics. It supports both morfessor-baseline and morfessor-cat (a cascade model). Current version 2.0.6, with infrequent releases.

pip install morfessor
INSTALL
IMPORT
SIG · MORFESSOR
M
morfessor
ai-mlpythonv2.0.6
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MorfessorEvaluation
from morfessor import MorfessorEvaluation
from morfessor import Morfessor
BaselineModel
from morfessor import BaselineModel
MorfessorIO
from morfessor import MorfessorIO

Basic segmentation using the default Morfessor model.

from morfessor import Morfessor # Initialize and segment a word model = Morfessor() result = model.segment('unhappiness') print(result) # ['un', 'happiness']
morfessor --version
Debug
Known issues
breakingPython 3.6+ required starting from version 2.0.0. Python 2 is no longer supported.
fix
Upgrade Python to 3.6 or later. Use pip install 'morfessor<2.0.0' if legacy Python is needed.
affects: >=2.0.0
breakingThe API changed significantly in version 2.0.0: the main class is now `Morfessor` instead of `MorfessorBaseline`. Old code using `MorfessorBaseline` will break.
fix
Replace `MorfessorBaseline` with `Morfessor` in imports and instantiation.
affects: >=2.0.0
gotchaPretrained models are not included. The `Morfessor` class must be trained on data before segmenting. Using without training will produce trivial splits.
fix
Train the model using `model.load_data('corpus.txt')` or `model.train_batch()` before calling `segment()`.
affects: all
Upgrade
Version history
2.0.6latest on PyPI · released Jul 31, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
morfessor — pip install morfessor · libregistry