Skip to main content
https://img.shields.io/pypi/v/zeyrek.svg Documentation Status build

Zeyrek is a partial port of Zemberek library to Python for lemmatizing and analyzing Turkish language words. It is in alpha stage, and the API will probably change.

Basic Usage

To use Zeyrek, first create an instance of MorphAnalyzer class:

>>> import zeyrek
>>> analyzer = zeyrek.MorphAnalyzer()

Then, you can call its analyze method on words or texts to get all possible analyses:

>>> print(analyzer.analyze('benim'))
Parse(word='benim', lemma='ben', pos='Noun', morphemes=['Noun', 'A3sg', 'P1sg'], formatted='[ben:Noun] ben:Noun+A3sg+im:P1sg')
Parse(word='benim', lemma='ben', pos='Pron', morphemes=['Pron', 'A1sg', 'Gen'], formatted='[ben:Pron,Pers] ben:Pron+A1sg+im:Gen')
Parse(word='benim', lemma='ben', pos='Verb', morphemes=['Noun', 'A3sg', 'Zero', 'Verb', 'Pres', 'A1sg'], formatted='[ben:Noun] ben:Noun+A3sg|Zero→Verb+Pres+im:A1sg')
Parse(word='benim', lemma='ben', pos='Verb', morphemes=['Pron', 'A1sg', 'Zero', 'Verb', 'Pres', 'A1sg'], formatted='[ben:Pron,Pers] ben:Pron+A1sg|Zero→Verb+Pres+im:A1sg')

If you only need the base form of words, or lemmas, you can call lemmatize. It returns a list of tuples, with word itself and a list of possible lemmas:

>>> print(analyzer.lemmatize('benim'))
[('benim', ['ben'])]

Credits

This package is a Python port of part of the Zemberek package by Ahmet A. Akın

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Metadata

Release files for zeyrek 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeyrek 0.1.3
File Size Uploaded
zeyrek-0.1.3.tar.gz 929.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zeyrek 0.1.3
File Interpreter ABI Platform
zeyrek-0.1.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 1.9 MB

Release files / zeyrek-0.1.3.tar.gz

Download URL zeyrek-0.1.3.tar.gz
Size 929.5 kB
Tags Source
SHA-256 checksum
How to use checksums
428054015258a48a61fdf759ef51be1ccb0437c65584ab3113de29366222a130
BLAKE2b-256 checksum
How to use checksums
04f203238387bb70c2efbc88843032c91af3e278d317d2b120376bc02d1aff04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release files / zeyrek-0.1.3-py2.py3-none-any.whl

Download URL zeyrek-0.1.3-py2.py3-none-any.whl
Size 931.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
23649bb49322a52d1e94959029b047fa4037bc540762819feb1096aa976b25b5
BLAKE2b-256 checksum
How to use checksums
7f5b76970fab035d2e2649ba06af037c394b9690d0e07a8faf53817ccccb3951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page