This project provides a simple way to make typing Chechen words containing the Cyrillic letter “ӏ” (Palochka) easier on iOS and macOS devices, where this character is not available on the standard Russian keyboard.
The Chechen letter "ӏ" (U+04CF) is essential for writing in the Chechen language, but it's absent from the standard iOS/macOS Russian keyboard layout. This makes it cumbersome to type words containing this letter, requiring users to copy-paste the character or switch to a custom keyboard layout.
This script automates the creation of a text replacement list to solve this problem. It works by:
- Processing a Wordlist: It reads a list of real Chechen words from a
corpora_wordlist.tsvfile, sourced from the Chechen Corpora. - Generating Shortcuts: It creates simplified versions of words containing "ӏ" by replacing the letter with the number "1". For example,
хӏуммаbecomesх1умма. - Exporting a
.plistFile: It exports these shortcuts and their corresponding full phrases into areplacements.plistfile. This file can be directly imported into the Text Replacement settings on macOS.
Once imported on a Mac, these text replacements automatically sync via iCloud to any iPhone or iPad signed in to the same Apple ID, making the shortcuts available across all your devices.
- Python 3
- pandas library (
pip install pandas)
-
Get the Wordlist (Optional): If you want to generate replacements from the Chechen Corpora, download the
corpora_wordlist.tsvfile from their website and place it in the root directory of this project. -
Add Custom Replacements (Optional): You can add your own custom replacements by creating a file named
override.csvin the root directory. This is useful for adding words not found in the corpora or for defining custom shortcuts.The file must have two columns:
ShortcutandPhrase.Example
override.csv:Shortcut,Phrase дог1а,догӏаNote: Replacements in this file will take priority. If a shortcut exists in both the generated list and
override.csv, the version fromoverride.csvwill be used. -
Run the Script: Open your terminal, navigate to the project directory, and run the following command:
python3 generate_replacements.py
-
Find the
.plistFile: The script will create areleasefolder containing thereplacements.plistfile. -
Import to macOS:
- Open System Settings on your Mac.
- Go to Keyboard.
- Click on Text Replacements... under the Text Input section.
- Drag and drop the generated
replacements.plistfile directly into the text replacements window.
Your new text replacements will now be active on your Mac and will sync to your iOS devices shortly.