Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A simple lemmatizer based on Unitex word lists

Project description

This is a simple module for lemmatization based on the Unitex inflected word list. As such, it needs a Unitex vocabulary file in order to work properly.

So far, I’ve only worked with Portuguese, with the DELAF_PB file provided by NILC.

Installing

You can either clone the repository and install with

$ python setup.py install

or install through pip

$ pip install unitexlemmatizer

Usage

In order to use the Unitex Lemmatizer, you need to tell it where the word list is:

>>> import unitexlemmatizer as ul
>>> ul.load_unitex_dictionary('/path/to/delaf.dic')

Then, you can call the get_lemma function passing the inflected word and its part of speech tag (from the Universal Dependencies tagset).

>>> ul.get_lemma('corpora', 'noun')
'corpus'

Project details


Release history Release notifications

This version
History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
unitexlemmatizer-1.0.0-py2.7.egg (5.1 kB) Copy SHA256 hash SHA256 Egg 2.7 Jan 19, 2017
unitexlemmatizer-1.0.0-py2.py3-none-any.whl (4.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Jan 19, 2017
unitexlemmatizer-1.0.0.tar.gz (3.0 kB) Copy SHA256 hash SHA256 Source None Jan 19, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page