Klitikizer
Eliminating the abuse of the nominative case in Greek, one greeting at a time.
Install / Use
/learn @cosmix/KlitikizerREADME
Klitikizer
Klitikizer is a very simple class for PHP 7.1+ that returns the vocative case for Greek names, both first and surnames. Its aim is to eliminate the unsightly phenomenon you may have experienced when interacting with Greek e-shops, startups and other organisations that make use of PHP and just stick to the nominative case when addressing their partners, customers, users etc.
Requirements
You need Aspell with the Greek dictionary already installed in your system. Consult the Aspell documentation for more information about how to do this, depending on your Operating System. The included Dockerfile can help identify dependencies, on linux hosts.
Klitikizer requires PHP 7.1+. You also need the intl and pspell extensions (this is because the class makes use of the Normalizer to quickly replace accented characters with the non-accented/decomposed versions thereof and Pspell provides an interface to Aspell) Other than that, you should be able to make use of it as is.
Usage
See examples. In short:
$klit = new Klitikizer();
$res = $klit->getKlitikiForName('Κώστας', true);
The first parameter of getKlitikiForName is the (preferrably Greek) name you wish to convert and the second is a boolean specifying whether it's a first or last name. The function is safe for use with non-Greek names, including Unicode strings of course.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
