Metadata-Version: 2.5
Name: lexitrace
Version: 0.1.0
Summary: Turkish-aware text helpers of the LexiTrace project: casing with dotted and dotless i, circumflex folding, apostrophe normalising and search keys.
Author: Batuhan Duras
License-Expression: MIT
License-File: LICENSE
Keywords: casing,nlp,normalization,text,turkish
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: Turkish
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# lexitrace

Turkish-aware text helpers of the LexiTrace project: casing with dotted and dotless i, circumflex folding, apostrophe normalising and search keys.

Plain lower-casing is wrong for Turkish. `I` is the capital of `ı`, and `İ` is the capital of `i`, so `ISPARTA` shall become `ısparta`, not `isparta`. Older texts also write `â`, `î` and `û`, and they print the apostrophe in six shapes. These helpers apply the rules that the LexiTrace project uses when it counts and searches words.

## Install

```bash
pip install lexitrace
```

## Use

```python
from lexitrace import tr_lower, tr_upper, fold_circumflex, normalize_apostrophes, search_key

tr_lower("ISPARTA İZMİR")            # "ısparta izmir"
tr_upper("ırmak izmir")              # "IRMAK İZMİR"
fold_circumflex("hükûmet kâtip")     # "hükumet katip"
normalize_apostrophes("Hatay’ın")    # "Hatay'ın"
search_key("  MİLLÎ   Eğitim’in ")   # "milli eğitimin"
```

No dependencies. Python 3.9 or newer.

## About

LexiTrace is a study of word replacement in Turkish parliamentary records from 1928 to 2024, by Batuhan Duras. This package holds its text helpers. More of the project may follow under this name.

Written with the help of Claude Code (Anthropic).

## License

MIT.
