Cebuano Stemmer based on Krovetz Algorithm
Note: Only prefixes, suffixes, infixes, and reduplication is covered
pip install cebstemmer
or- inside the folder run
python setup.py install
cebdict>=2.1
- stem_word(word='', as_object=False)
-
Accepts a Cebuano word and returns the morphemes of the word
-
Default Output: List of morphemes
[root, prefix, infix, suffix]
-
OPTION: as_object - When true, Word object is returned.
``` class Word: def __init__(self, text=None): self.orig_text = text self.text = text.lower() if text is not None else text self.prefix = None self.infix = None self.suffix = None self.root = text.lower() if text is not None else text self.is_entry = False ```
-
from cebstemmer import stemmer
stemmer.stem_word('buangon')
Output:
['buangon', None, None, on]
word = stemmer.stem_word('buangon', as_object=True)
print(word.root)
print(word.suffix)
Output:
buang
on
- Krovetz, R. (1993). Viewing morphology as an inference process (pp. 191–202). ACM Press. https://doi.org/10.1145/160688.160718