Skip to main content

Potnia is an open-source Python library designed to convert Romanized transliterations of ancient texts into Unicode representations of ther respective native scripts..

Project description

https://raw.githubusercontent.com/AncientNLP/potnia/main/docs/_static/img/PotniaLogo.png

pypi badge testing badge coverage badge docs badge git3moji badge black badge JOSS badge

Potnia is an open-source Python library designed to convert Romanized transliterations of ancient texts into Unicode representations of ther respective native scripts.

Currently, the scripts supported by Potnia are:

  • Linear A

  • Linear B

  • Hittite cuneiform

  • Arabic

Functionality for Luwian hieroglyphs, Sumero-Akkadian cuneiform, Lydian and Etruscan is in development.

Contributions are welcome! Please see the CONTRIBUTING.rst file for more information.

Installation

To install Potnia, run the following command:

pip install potnia

To install the latest version from the repository, you can use this command:

pip install git+https://github.com/AncientNLP/potnia.git

You can also install Potnia by cloning the repository and installing using poetry. This will install all the dependencies required for Potnia from the with the version numbers pinned in the poetry.lock file. Make sure that poetry is installed on your system. If not, see the instructions. Then follow these steps:

git clone https://github.com/AncientNLP/potnia.git
cd potnia
poetry install

You can test that Potnia is working by running pytest.

Usage

To convert transliterated Linear B to Linear B Unicode, use the following code:

>>> from potnia import linear_b
>>> linear_b("a-ri-to-jo")
'𐀀𐀪𐀵𐀍'

If you wish to regularize the text to remove additional annotations present in the LiBER and DĀMOS transliteration, use the following code:

>>> linear_b("e-ke-qe ]-o-na-to , ke-ke-me-na⌞ ⌟ko-to-na GRA qs ] vac.", regularize=True)
'𐀁𐀐𐀤 %𐀃𐀙𐀵 𐀐𐀐𐀕𐀙 𐀒𐀵𐀙 𐂎 %'

Note that uncertain/missing signs or sections of text are presently being replaced with a wildcard ‘%’ character.

To tokenize transliterated Linear B texts without converting it to Unicode, use the following code:

>>> linear_b.tokenize_transliteration("]wa VIR 1 MUL 2 'ko-wa 1' ko-wo 1")
[']', 'wa', ' ', 'VIR', ' ', '1', ' ', 'MUL', ' ', '2', ' ', "'", 'ko', 'wa', ' ', '1', "'", ' ', 'ko', 'wo', ' ', '1']

Command Line Interface (CLI)

Potnia also provides a command line interface (CLI).

To convert transliterated Linear B to Unicode, use the following command:

potnia linear-b "a-ri-to-jo"

To regularize the text, use the following command:

potnia linear-b "e-ke-qe ]-o-na-to , ke-ke-me-na⌞ ⌟ko-to-na GRA qs ] vac." --regularize

To see the full set of commands available in the CLI, use the following command:

potnia --help

Graphical User Interface (GUI)

https://raw.githubusercontent.com/AncientNLP/potnia/main/docs/_static/img/potnia-gui.png

Potnia also provides a graphical user interface (GUI). To start it, run:

potnia gui

This will show a link in the terminal that you can click on to open the GUI in your browser.

Credits

Potnia is developed by:

To cite Potnia, use this reference:

Tour, Emily, Kabir Manandhar Shrestha, and Robert Turnbull. ‘Potnia: A Python Library for the Conversion of Transliterated Ancient Texts to Unicode.’ Journal of Open Source Software 10, no. 108 (2025): 7725. doi:10.21105/joss.07725

You can also use the following BibTeX entries:

@article{potnia,
    author       = {Emily Tour and Kabir Manandhar Shrestha and Robert Turnbull},
    title        = {{Potnia: A Python library for the conversion of transliterated ancient texts to Unicode}},
    year         = {2025},
    journal      = {Journal of Open Source Software},
    publisher    = {The Open Journal},
    volume       = {10},
    number       = {108},
    pages        = {7725},
    doi          = {10.21105/joss.07725},
    url          = {https://doi.org/10.21105/joss.07725}
}

@misc{potnia_release,
    author       = {Emily Tour and Kabir Manandhar Shrestha and Robert Turnbull},
    title        = {{Potnia: A Python library for the conversion of transliterated ancient texts to Unicode}},
    year         = {2025},
    url          = {https://doi.org/10.26188/28721354.v1},
    note         = {Version 0.4.0, Apache License 2.0},
    doi          = {10.26188/28721354.v1}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

potnia-0.4.1.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

potnia-0.4.1-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file potnia-0.4.1.tar.gz.

File metadata

  • Download URL: potnia-0.4.1.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for potnia-0.4.1.tar.gz
Algorithm Hash digest
SHA256 9ce95d52aa3cdda8125b13d073f75709b9a8391b2b5c3684061d2083b8bb8d63
MD5 a8cecd77e65c6bc72c8aa4da95109966
BLAKE2b-256 11ecea42e8abdf2bce36126e3acc9370595059de2dfd8fcf97d1739501701f61

See more details on using hashes here.

File details

Details for the file potnia-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: potnia-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for potnia-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb802e8ec28e7c2dbd3a756ac5d7baf0f2dc49b2203ae6f213226d0c7ca38f8
MD5 660a40719944be2bb2b4c497fb4847ce
BLAKE2b-256 4e6b6b11ec3c383014dae917bf6df95a23e11a2b5760933031df6cb1bbb58440

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page