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 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:

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.0.tar.gz (27.3 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.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: potnia-0.4.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for potnia-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c19e7ee4c344f7461cb8a2cf71966a8cffc0978022da81081f73e0ea2c0426e3
MD5 041630a236d84ba5f1cfa900d4a397e7
BLAKE2b-256 9339911995018bac2a7ddcb093706350cf628100f8c812e13eea5fed050c40c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: potnia-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for potnia-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e656d3e94d7f7caf68af8c84ee5d65478d88396ccdf5e3884122d2e8feb0d06f
MD5 09ad2490a44f7ffcc7bce31b3812ee97
BLAKE2b-256 8648e385a3ff5a0b7d7136aaeefcf8c400950da9f5c40d6a9238be13aa6047a7

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