Python package to simulate philological evolution
Project description
Titivillus
titivillus
is a Python library and related command-line tools for simulating
stemmatological networks and related data (characters, states, edge length etc.). It
is intended for benchmarking quantitative methods of textual evolution, also providing
dummy tree and networks for their development and debugging.
The library is named after Titivillus, a demon commonly referenced to in Medieval times and said to work on behalf of Belphegor, Lucifer, or Satan to introduce errors into the work of scribes. It can be compared to the twentieth-century folkloric mischievous creature that causes mechanical failures, the gremlin.
How does titivillus
work?
The library offers a number of abstractions suited for the study of textual evolution, in particular without forcing a purely arboreal evolution. Each codex carries a number of independent characterst, each with its own history.
Where applicable, the random generation follows that of another package released by the author for the simulation of phylogenetic data, ngesh.
Installation
In any standard Python environment, titivillus
can be installed with
$ pip install titivillus
The pip
installation will automatically fetch dependencies such as numpy
and
networkx
, if necessary. It is highly recommendend that the library is installed in
its own virtual environment.
How to use
For most usages, the creation of a random stemma can be easily performed from Python with:
import titivillus
stemma = titivillus.random_stemma()
Among the various parameters, it is possible to pass a pseudo-random number generator seed that guarantees reproducibility across different calls.
stemma2 = titivillus.random_stemma(seed="uppsala")
The contents of the stemma can be inspected following the available tests. A graphical
version, using networkx
, can be obtained with:
import matplotlib.pyplot as plt
import networkx as nx
graph = stemma2.as_graph()
nx.draw(graph)
plt.show()
No stand-alone command-line tool has been released yet.
Changelog
Version 0.0.1:
- First public release, aligned with experiments for the Apophthegmata Patrum
Community guidelines
While the author can be contacted directly for support, it is recommended that third parties use GitHub standard features, such as issues and pull requests, to contribute, report problems, or seek support.
Contributing guidelines, including a code of conduct, can be found in the
CONTRIBUTING.md
file.
Author and citation
The library is developed by Tiago Tresoldi (tiago.tresoldi@lingfil.uu.se).
If you use titivillus
, please cite it as:
Tresoldi, Tiago (2021). Titivillus, a tool for simulating random stemmatological networks. Version 0.0.1. Uppsala. Available at: https://github.com/tresoldi/titivillus
In BibTeX:
@misc{Tresoldi2021titivillus,
author = {Tresoldi, Tiago},
title = {Titivillus, a tool for simulating random stemmatological networks},
howpublished = {\url{https://github.com/tresoldi/titivillus}},
address = {Uppsala},
year = {2021},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for titivillus-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79841a73d940f6da78c71321eff735aecd3769afec5a260b022c13125793220c |
|
MD5 | 8942e2c869f915080c9db64c70930b1b |
|
BLAKE2b-256 | c1dae5c881094210a72653b9dd51e68f25e0b83c8e8d9dfd779f924b9739bec4 |