Thank you for your interest in improving Lipi!
- Create a new file in
src/lipi/mappings/(e.g.devlys.py). - Define a dict mapping legacy font characters to Unicode Devanagari:
# src/lipi/mappings/devlys.py
"""DevLys -> Unicode Devanagari mapping table."""
DEVLYS_TO_UNICODE: dict[str, str] = {
"v": "\u0905", # अ
# ... more entries
}- Import and register it in
src/lipi/mappings/__init__.py:
from lipi.mappings.devlys import DEVLYS_TO_UNICODE
FONT_MAPPINGS["devlys"] = DEVLYS_TO_UNICODE- Add detection fingerprints in
src/lipi/preprocessor.pyif needed. - Write tests in
tests/test_mappings.py.
git clone https://github.com/aparsoft/lipi.git
cd lipi
pip install -e ".[dev]"
pytestInstall from PyPI:
pip install lipi-aparsoft
Python import:from lipi import HindiPreprocessor(import name islipi, notlipi-aparsoft)
- Keep PRs focused on a single change.
- Add tests for any new functionality.
- Run
pytestand ensure all tests pass before submitting. - Follow the existing code style (line length 100, Black formatting).
Please include:
- Python version
- A sample PDF or text that demonstrates the issue
- Expected vs actual output
- Context-aware KrutiDev parser (higher conversion accuracy)
- DevLys / Shusha font support
- Test fixtures (sample PDFs with known encoding)
- CI/CD workflow