ZimanKitGitHub

Using ZimanKit.
Tools, library, and API.

How the workspace works, what the text rules change, and how to use the library in your own project.

Writing workspace

The workspace supports Sorani in Arabic-based writing and Kurmanji in Latin writing. Type or import a TXT, Markdown, or Word document. Spelling checks, word analysis, and file processing run on your device.

  • Spelling: review unrecognized words, choose a suggestion, replace one or all occurrences, ignore words for this document session, or save them in a personal dictionary. Use Review words to see underlines in context. An unrecognized word is not necessarily incorrect.
  • Cleanup: review selected KLPT letter rules, optional writing conventions, number conversion, and spacing changes. Apply one or all changes. Undo and redo cover the last 40 text states.
  • Word explorer: inspect possible dictionary forms, roots, and word types from Kurdish Hunspell. Readings are alternatives, not a sentence-level meaning prediction.
  • Text insights: export vocabulary counts and approximate sentences. KLPT common-word lists can filter frequent words. Grouping uses dictionary forms only when analysis gives one distinct form.
  • Files: import up to 100,000 characters per document, export text or a new Word document, or clean up to 20 files and download a ZIP with reports. Word import retains text and paragraphs, not original layout, images, or tables.
  • Local storage: up to 20 drafts and 5,000 personal words per variety are saved in this browser. There is no account sync. Export backups before clearing browser data.

Dictionary files load from this site. Your document is not uploaded. Spelling checks cover the selected script, so Arabic quotations in Sorani and English passages in Kurmanji may be flagged. Links, email addresses, and backtick code are skipped. No grammar correction, translation, or independently measured accuracy claim is provided.

Sources, licenses, and limitations. The separate text tools and existing API below retain their original limits and behavior; the API does not expose the new browser spelling engine.

Standalone text tools

  1. Choose Sorani, Kurmanji, or Unicode only. The script detector does not choose a language for you.
  2. Paste text or import a UTF-8 .txt file. Choose Normalize, Clean, or experimental Transliterate.
  3. Review the result, change report, and processing notes. Copy the result, download text, or export the full JSON report.

The playground runs entirely in your browser. Text is not submitted to the API, stored in cookies, or sent to analytics. The optional public API is a separate way to use the same engine.

Open the playground

Language profiles for the text tools

The library and text tools first apply Unicode NFC. It composes equivalent sequences, such as a letter plus a combining accent. These tools preserve case and diacritics and do not correct spelling. Use the workspace for spelling suggestions.

ProfileNormalizationPreserved
Soraniك → ک and ي → ی, when the variant option is enabled.Distinct Kurdish letters, vowels, diacritics, digits, and original spelling.
KurmanjiNFC, including decomposed ç, ê, î, ş, and û.Capitalization and diacritics. Turkish ı is not silently changed to i.
Unicode onlyNFC only; no Kurdish character replacement.Arabic quotations and mixed-language spellings.

Sorani replacements apply to every matching character in the selected passage, including Arabic quotations. Use Unicode only for those passages. Similar-looking characters such as ه / ە, ر / ڕ, and ل / ڵ remain distinct.

Legacy font encodings and Arabic presentation forms are not converted by the library. Presentation forms are flagged. Script detection reports Arabic, Latin, mixed, or unknown based on letters; it does not establish whether text is Kurdish.

Cleaning options

Clean applies NFC and the selected formatting options. It does not also apply Sorani variant replacements; use Normalize first if you want both.

OptionDefaultBehavior
Repeated spacesOnCollapse ordinary spaces and tabs. Preserve newlines and non-breaking spaces.
Line endingsOnConvert CRLF and CR to LF. Keep paragraphs and blank lines.
Trim line edgesOffRemove ordinary spaces and tabs at the beginning and end of each line.
Punctuation spacingOffRemove ordinary spaces before , ، ; ؛ ! ? ؟. Does not infer missing spaces or rewrite punctuation.
Elongation marksOffRemove tatweel (ـ).
Formatting controlsOffRemove U+200B, U+200E–200F, U+202A–202E, U+2060, U+2066–2069, and U+FEFF. Review direction and word boundaries afterwards.

Joiners (ZWJ), non-joiners (ZWNJ), combining marks, emoji sequences, and non-breaking spaces are preserved. Cleaning code or formatted documents may alter indentation; disable repeated spaces and trim options for those inputs.

Experimental transliteration

Transliteration changes the script, not the language. Sorani does not become Kurmanji. This feature produces a draft for review, not guaranteed pronunciation or translation.

ZimanKit uses a documented extended Hawar-style Latin mapping: ç, ş, j, x, ê, î, û, plus ł for ڵ, ř for ڕ, ḥ for ح, ẍ for غ, and ʿ for ع. This is an explicit project convention, not a claim of a universal Kurdish romanization standard.

Arabic → Latin: an annotated draft

The letters و and ی may represent multiple sounds. Single occurrences become {w/u} and {y/î}, rather than a guessed reading. Double وو becomes û. Initial ئ is removed only before a recognized written vowel. Unwritten short i (bizroke) is not reconstructed.

کوردی → k{w/u}rd{y/î}
ئاسۆ → aso
ڕێگا → řêga

Latin → Arabic: a lossy draft

Uses Sorani-style Arabic spelling for either selected variety. Initial written vowels receive a carrier; capitalization is lost, short i is omitted, w/u merge as و, and y/î merge as ی. Round trips are not guaranteed. Names, foreign words, URLs, and dialect-specific conventions need manual review. Unknown characters are retained and flagged.

No dictionary, AI model, or paid service is used. There is no independently measured linguistic accuracy score for this release.

Counts with defined meanings

  • Words: runs of Unicode letters or numbers, including combining marks. Internal apostrophes and joining controls remain part of a word. Hyphens and punctuation split words; decimals contribute two numeric runs.
  • Characters: grapheme clusters via Intl.Segmenter, including whitespace. A joined emoji can be one character but several code points. Unicode segmentation depends on the runtime’s Unicode version.
  • Sentences: approximate segments containing letters/numbers separated by . ! ? ؟ ۔ or …. Decimal points are excluded. Abbreviations, URLs, and unusual punctuation may inflate counts.
  • Changes: the sum of changed spans across pipeline rules. This is not an edit distance. The JSON report includes up to four before/after examples per rule.

Counts describe the result. Empty input has zero words, characters, sentences, and lines. Source and output remain available in the JSON report.

One engine. Your project.

The TypeScript library has no framework or service dependency. Build it from the repository, pack it, and install the local archive in your own app. v0.1 is available from GitHub; it has not been published to npm.

git clone https://github.com/zanaamed/zimankit.git
cd zimankit
npm ci
npm run build:core
npm pack --workspace zimankit
# In your other project:
npm install /path/to/zimankit/zimankit-0.1.0.tgz
import { processText, detectScript, getStatistics } from 'zimankit';

const result = processText('كوردی', {
  language: 'sorani',
  operation: 'normalize',
});
console.log(result.text); // کوردی
console.log(result.changes);
console.log(detectScript('Silav!').kind); // latin

processText(text, options) defaults to Unicode-only normalization. It returns the original, processed text, profile, script information, statistics, changes, warnings, experimental flag, and engine version. Invalid options throw TypeError; oversized text throws RangeError. Input must be well-formed Unicode and at most 20,000 UTF-16 code units.

A small REST API

Same-origin endpoint: POST /api/v1/process. Set Content-Type: application/json. The API defaults to Unicode-only normalization, supports CORS, and does not store request text in application code. Your text is sent to the server when you call this endpoint; the playground never calls it.

fetch('/api/v1/process', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    text: 'كوردی',
    options: { language: 'sorani', operation: 'normalize' },
  }),
}).then(response => response.json());

Supported options: language, operation, direction, kurdishVariants, collapseSpaces, normalizeLineEndings, trimLines, punctuationSpacing, removeTatweel, and removeControls. Flags are booleans. Transliterating requires a language and explicit arabic-to-latin or latin-to-arabic direction.

API limits: 2,000 UTF-16 code units per text and 100,000 bytes per JSON body. The smaller API limit helps bound free-plan CPU use; the playground and local library accept 20,000. Responses: 200 success, 400 invalid JSON/options, 405 wrong method, 413 oversized input, 415 wrong media type. Errors use { "error": "message" }. GET /api/v1/health returns status, version, and text limit. API availability is subject to the host’s free-plan quotas.

For local API testing, build the project and run npm run preview. The Next.js development server serves the playground; the API runs in the Cloudflare Worker preview.

Download it. Build it yourself.

Use Node.js 24 (or a supported Node version ≥22) and npm. No API key, account, database, or cloud subscription is needed to run the library and playground locally.

git clone https://github.com/zanaamed/zimankit.git
cd zimankit
npm ci
npm run dev
# Playground: http://127.0.0.1:3000

npm run check
npm run preview
# Playground and API: http://localhost:8787

Next.js exports static files into out/. These can be hosted on any static host; the API requires the included Worker. To deploy both to your own Cloudflare Workers Free account, run npx wrangler login, then npm run deploy. No storage or paid bindings are configured.

Sources and corrections

If a rule changes text incorrectly, open an issue with a short example, the language or tool you used, and the result you expected. A spelling reference or explanation helps. Leave out private document content.

ZimanKit’s code is MIT licensed. KurdishHunspell and KLPT data keep their CC BY-SA 4.0 licenses; the engine and fonts have separate licenses. See the credits page for the full list. The references below cover Unicode normalization and Kurdish transliteration.

Spelling checks are available in the workspace. OCR, translation, and full grammar checking are not included.