A CTS server for the Persian Digital Library (PDL) project.
This project was inspired by CDLI Text Services for the Cuneiform Digital Library Collective.
# create virtual environment
python3 -m venv venv
source venv/bin/activate # in fish: source venv/bin/activate.fish
# install `capitains-nautilus` from submodule in `./Nautilus`
python -m pip install -e Nautilus/ # this also installs all needed dependencies from `requirements.txt`
Currently, we are using a submodule in ./Nautilus
for a local version of capitains-nautilus
, see Capitains/Nautilus#95.
I created the file working_requirements.txt
using python -m pip freeze > working_requirements.txt
to show which exact version combination is working.
source venv/bin/activate # in fish: source venv/bin/activate.fish
python app.py
Now we can run queries against the CTS server to explore the corpus.
Query all capabilities: GetCapabilities
curl "http://localhost:8000/cts?request=GetCapabilities"
Query a passage from a certain URN: GetPassage
curl "http://localhost:8000/cts?request=GetPassage&urn=urn:cts:perslit:forooghi.divan"
curl "http://localhost:8000/cts?request=GetPassage&urn=urn:cts:perslit:attar.mokhtarname"
Query Valid Reff
curl "http://localhost:8000/cts?request=GetValidReff&urn=urn:cts:perslit:forooghi.divan"
curl "http://localhost:8000/cts?request=GetValidReff&urn=urn:cts:perslit:attar.mokhtarname"
Other Queries
GetFirstUrn
:curl "http://localhost:8000/cts?request=GetFirstUrn&urn=urn:cts:perslit:attar.mokhtarname"
GetLabel
:curl "http://localhost:8000/cts?request=GetLabel&urn=urn:cts:perslit:attar.mokhtarname"
GetPrevNextUrn
andGetPassagePlus
are currently not supported, see #1.
- Set up a Nemo UI, see docs.
- Expand PDL dataset with all data from Ganjoor, see PersDigUMD/PDL#2 and PersDigUMD/PDL#3.