Skip to main content

turkish-linguistic-features

CI DOI

Extracts 208 quantitative linguistic features from Turkish text and 181 from English. Every feature has its formula written out; 197 of the Turkish features and 170 of the English ones cite a source in the literature, and the rest are plain definitions (such as the dash's share of punctuation marks). The verification report shows which ones have been checked against a number their source published. Documentation: https://efeziya1.github.io/turkish-linguistic-features/

Status: early development (0.x). Changes: CHANGELOG.

import turkish_linguistic_features as tlf

oz = tlf.analyze("Renksiz yeşil fikirler öfkeyle uyur.", lang="tr")
oz["word_len_mean"]   # 6.2
oz["atesman"]         # 89.355  (Ateşman 1997 readability)

Documentation

→ Full documentation — tutorial, how-to guides, feature reference and limitations, in Turkish and English.

Türkçe tr/
English en/
Feature reference reference/features/
Verification report TR · EN

Install

pip install turkish-linguistic-features

Language data

pip install sets up the Python dependencies but not the language data. Install the data for the language(s) you use, once:

# Turkish — 156 MB. The model is by turkish-nlp-suite and is not in spaCy's
# registry, so install the wheel directly:
pip install https://huggingface.co/turkish-nlp-suite/tr_core_news_md/resolve/main/tr_core_news_md-1.0-py3-none-any.whl

# English — the spaCy model (12 MB) and the CMU Pronouncing Dictionary for
# syllable counts (1 MB):
python -m spacy download en_core_web_sm
python -m nltk.downloader cmudict

# Optional — for the two wordfreq_* features:
pip install 'wordfreq>=3.0'

If something is missing, analyze() stops with an error that shows the command to run.

Verified with spaCy 3.8.16, en_core_web_sm 3.8.0 and tr_core_news_md 1.0. The Turkish wheel says 1.0 in its filename but 3.4.2 in its metadata, and loading it prints a W094 warning; both are harmless (details).

The whole API

Eleven public names:

tlf.analyze(text, lang="tr")                     # 208 features (TR) / 181 (EN)
tlf.analyze(text, groups=["readability"])        # one group only
tlf.analyze_corpus("corpus/")                    # one row per file
tlf.analyze_corpus("corpus/", segment_size=1000) # or split into chunks
tlf.save_csv(rows, "features.csv")               # write them out
tlf.segment_text(text, segment_size=1000, lang="tr")  # split a single text
tlf.analyze(text, custom_ngrams=[["ADJ", "NOUN"]])  # count your own phrases
tlf.ngram_matches(text, ["ADJ", "NOUN"])         # ...and see what they matched
tlf.describe_feature("mtld")                     # what a key measures, and its source
tlf.FeatureParams(mattr_window=100)              # metric constants

# tlf.LinguisticFeaturesError  tlf.ModelNotFoundError
# tlf.MissingDependencyWarning  tlf.ParagraphStructureWarning

Full signatures: Public API.

Development

pip install -r requirements.txt
pytest                          # pytest -m "" also runs the slow test
ruff check .
python scripts/generate_verification_report.py  # regenerate the verification reports
python scripts/generate_feature_reference.py    # regenerate the feature reference

License

MIT — see LICENSE.

Metadata

Release files for turkish-linguistic-features 0.2.0

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

Source distribution (sdist)

Source distribution for turkish-linguistic-features 0.2.0
File Size Uploaded Provenance Actions
turkish_linguistic_features-0.2.0.tar.gz 321.7 kB With provenance Details for turkish_linguistic_features-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for turkish-linguistic-features 0.2.0
File Interpreter ABI Platform Actions
turkish_linguistic_features-0.2.0-py3-none-any.whl Python 3 none any Details for turkish_linguistic_features-0.2.0-py3-none-any.whl

Total release size: 448.1 kB

Release files / turkish_linguistic_features-0.2.0.tar.gz

Download URL turkish_linguistic_features-0.2.0.tar.gz
Size 321.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d7e8de7d56cab44574c577f46844663ad98e18ae589046b198e8f7b50023c687
BLAKE2b-256 checksum
How to use checksums
a8e02de14ce887e2d28f50029a3f9ba3e93f7f129a42518419af628e6202d1b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / turkish_linguistic_features-0.2.0-py3-none-any.whl

Download URL turkish_linguistic_features-0.2.0-py3-none-any.whl
Size 126.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
568910786bd95c8dda2385918c89801aa21812cafdbb7c73c86838786eb106c0
BLAKE2b-256 checksum
How to use checksums
39bc8456fba3cdea34abdfcbfdbc8343c823feeedc543f1daa6ba1f35eb1b54c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for turkish-linguistic-features 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for turkish_linguistic_features-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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