PyCantus: A Python library designed to enhance accessibility of Gregorian chants for both coders and non-coders.
Project description
PyCantus
PyCantus is envisioned as a Python API to the Cantus family of databases that makes it easy to use this data for computational processing. Primarily we intend this to be used for research in digital chant scholarship, but of course it can be used to build chant-centric apps, new websites, extract data for comparative studies across different repertoires, study liturgy, etc.
The CantusCorpus v1.0 dataset, containing data from the Cantus Index, can be used with the PyCantus library easily.
Finally, Django template of web API providing easier creation of YAML filtration setups called Filter for PyCantus was implemented while also being deployed at https://filterforpycantus.owx.cz.
Data model
At the heart of the library is the Cantus Database and Cantus Index data model. The two elementary objects in this model are a Chant, and a Source.
- A
Chantis one instance of a chant in a source. Typically it has a text, a melody (which is not necessarily transcribed), and a Cantus ID assigned, and it should link to a source in which it is found. In principle it uses fields from the API defined by Cantus Index; the exact data model is documented in the module. - A
Sourceis a physical manuscript or print that contains Gregorian chant. Primarily, this will be a liturgical book such as an antiphonary, gradual, or other types of books. Fragments are also sources. Provenance (geographical and institutional) and century of origin metadata are carried by source records.
There are two further important classes in the data model: Melody, and Corpus.
- A
Melodycontains the chant's melody at various levels of representation. - A
Corpuscontains a dataset composed of sources and chants (that may have melodies). Filtering is done onCorpusobjects.
Here we have full UML schema of the data model:
.
User documentation
We realize that two types of users come together at a library of this type – a group of programmers who are getting into Gregorian chant, and then (hopefully) a group of chant experts who are getting into its computer processing. Therefore, be warned that, quite inevitably, when examining the user documentation, each group will encounter things that are obvious to them, but that is fine, as these parts are there precisely for "the others."
Introduction for Computer Science people
In the documentation (docs\source folder) we attempted to compile some basic overview information about Gregorian chant (intro_to chant.md), that is a 'nice to have' before getting into work with the material. It should also serve as a cheat sheet for basic terms and concepts.
(Rendered 'easy to read' version can be reached from docs\build\html\index.html entry point when opened in any web browser.)
Tutorials
For an introduction to using PyCantus, run the tutorials\01_intro_to_pycantus.ipynb Jupyter notebook.
For more advanced and specific tasks there are four other tutorials in the tutorials folder, one describing some basics about the data (especially how to work with melodies) for Gregorian chant beginners (02_intro_to_chant_data.ipynb), two working with repertoire (03_repertoire_traditions.ipynb and 04_unseen_species.ipynb) and one showing research on melodies (05_melody_classification.ipynb).
They would show you more possibilities in using PyCantus and hopefully also possibilities in Gregorian chant research in general.
All these tutorials expect basic Python knowledge, if you feel weak about your Python programming skills, please, go through some of the many online tutorials available for Python..
Development documentation
Development documentation can be found in docs\source folder under development_docs.md.
Standard generated docstrings documentation can be found from docs\build\html\index.html entry point when opened in any web browser.
Installing PyCantus library locally
-
Clone the repository:
git clone https://github.com/dact-chant/PyCantus -
Go to the root directory of the project (the one where
pyproject.tomlis) -
Run the following command:
pip install . -
Import the pycantus library and verify it works:
from pycantus import hello_pycantus hello_pycantus()
About project
PyCantus is being developed under the Digital Analysis of Chant Transmission (DACT). This project, funded by the Social Sciences and Humanities Research Council of Canada, aims to advance the study of chant dissemination using computational tools.
Explore more about the project, its goals and contacts on our homepage.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycantus-1.1.0.tar.gz.
File metadata
- Download URL: pycantus-1.1.0.tar.gz
- Upload date:
- Size: 10.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fefd12b317dad25f75de8b9400d1bd55c108f32805e2c4af53f7101e3aabd5fe
|
|
| MD5 |
8dcb414434d340b25a1c16665782cc00
|
|
| BLAKE2b-256 |
d7139a77e8029587cb1f840dd5cf9e7f9390c67498a2fcad71f6db187fddb0aa
|
File details
Details for the file pycantus-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pycantus-1.1.0-py3-none-any.whl
- Upload date:
- Size: 37.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9802a65198e2821677c9a6516e6bc6523ad945261b5f2d86eb6141d29861ab1a
|
|
| MD5 |
53090504f8fb08e6f78e1fd443b487e6
|
|
| BLAKE2b-256 |
203eaa651781c103e903919eea52d03b254bfb53dbc89c3dbc46b8945399d706
|