Skip to content

Installation

Prerequisites

  • Python: Version 3.10 or newer.

Install with pip

The recommended way to install grapheme-kit is from PyPI:

pip install grapheme-kit

This installs the Python library and both the grapheme-kit and gkit command-line executables.

Install from Source

To contribute to grapheme-kit or work with the latest source code, clone the repository and sync its dependencies with uv:

git clone https://github.com/vmenan/grapheme-kit.git
cd grapheme-kit
uv sync

Verify Installation

Open a Python shell and try importing the library:

from grapheme_kit import Graphemizer

g = Graphemizer("வணக்கம்")
print(g.graphemes)
# Output: ['வ', 'ண', 'க்', 'க', 'ம்']

If you see the output above without any errors, the installation was successful.

Verify the CLI

You can also verify that the command-line interface was successfully installed and is available in your environment:

gkit --help

Or using the long alias:

grapheme-kit --help

Both commands should print the help text detailing the available subcommands and options.

Dependencies

Whether you install with pip or run uv sync, the following core dependencies are automatically installed:

  • grapheme (≥0.6.0): Used as the base Unicode grapheme cluster foundation.
  • textdistance (≥4.6.3): Used to compute Levenshtein and Hamming distances.
  • sacrebleu (≥2.6.0): The base library extended for GraphemeCHRF.