semvec/pypi-packages huggingface dataset:
zeyrek 0.1.4a0
Python morphological analyzer and lemmatizer for Turkish
License: MIT
Requires Python: >=3.9

# Zeyrek: Morphological Analyzer and Lemmatizer

![PyPI - Version](https://img.shields.io/pypi/v/zeyrek)

Zeyrek is a partial port of the [Zemberek library](https://github.com/ahmetaa/zemberek-nlp) to Python for lemmatizing
and analyzing Turkish language words. It is in alpha stage, and the API
will probably change.


* Free software: MIT license
* Documentation: https://zeyrek.readthedocs.io.


## Basic Usage

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

```shell
import zeyrek
analyzer = zeyrek.MorphAnalyzer()
```

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

```shell
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::

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


## Credits

This package is a Python port of part of the [Zemberek](https://github.com/ahmetaa/zemberek-nlp) package by [Ahmet A. Akın](https://github.com/ahmetaa)


This package was created with
[Cookiecutter](https://github.com/audreyr/cookiecutter) and the
[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)
project template.
osversionchecker 0.10
Checks what os is running
License: MIT
Keywords: os


# Checks what os is running

### Tested against Windows 10/Android/Linux / Python 3.11 / Anaconda

### pip install osversionchecker

### The main focus is differentiating classic Linux / Android


``` py
    Determines the operating system by analyzing various system characteristics
    and assigns points based on detected features. The OS with the highest points
    is considered the active operating system.

    Returns:
        tuple: A dictionary with the points for each operating system and the 
        name of the detected active operating system.

    The function checks the following:
    - If the sys.executable path indicates a Windows system.
    - If the sys.executable path starts with '/data/data/' indicating an Android system.
    - The count of backslashes and slashes in the environment variables string.
    - The presence of certain files or directories that are specific to Windows or Android.
    - The output of certain shell commands that indicate an Android system.
    - The content of the uname command output to check for Linux, Darwin (macOS), or Android.
    - The platform information from the platform module to check for Linux, Darwin (macOS), or Android.
    - The sys.platform value to check for Linux, Darwin (macOS), Windows, or Android.
    - The sys.version string to check for Linux, Darwin (macOS), or Windows.

from osversionchecker import check_os

os_system_points, active_os_system = check_os()
print(active_os_system)
print(os_system_points)


windows
{'windows': 5, 'linux': 0, 'darwin': 0, 'android': 0}


```