The Classical Language Toolkit (CLTK) is a Python library offering natural language processing (NLP) for pre-modern languages.
Installation
For the CLTK's latest version:
pip install cltk
Optional extras
- GenAI (OpenAI-backed annotation):
pip install "cltk[openai]"
- Stanza (discriminative NLP backends powered by Stanford Stanza):
pip install "cltk[stanza]"
You can combine extras, for example:
pip install "cltk[openai,stanza]"
# or include local LLM support as well
pip install "cltk[openai,stanza,ollama]"
- Local LLMs via Ollama:
Install the optional extra and ensure an Ollama server is running locally:
pip install "cltk[ollama]"
By default, when using backend='ollama', CLTK uses the model llama3.1:8b. To choose a different local model, pass the model parameter to NLP(...), e.g. qwen2.5:14b, gemma2:27b, llama3.1:70b, or any Ollama model string.
Choosing a model
- OpenAI backend (GenAI in the cloud):
from cltk import NLP
# Default model is "gpt-5-mini" when backend='openai'
nlp = NLP('lati1261', backend='openai')
# Choose a specific model
nlp_big = NLP('lati1261', backend='openai', model='gpt-5')
# Requires OPENAI_API_KEY to be set in the environment
# (e.g., via a .env file or shell env var)
- Ollama backend (local LLMs):
from cltk import NLP
# Default model is "llama3.1:8b" when backend='ollama'
nlp_local = NLP('lati1261', backend='ollama')
# Choose a specific local model (any installed/pullable Ollama model)
nlp_qwen = NLP('lati1261', backend='ollama', model='qwen2.5:14b')
# To use the hosted Ollama Cloud, set OLLAMA_CLOUD_API_KEY
# and choose backend='ollama-cloud'. The same model strings apply.
For more information, see Installation docs or, to install from source, Development.
Pre-1.0 software remains available on the branch v0.1.x and docs at https://legacy.cltk.org. Install it with pip install "cltk<1.0".
Documentation
Documentation at https://docs.cltk.org.
Citation
When using the CLTK, please cite the following publication, including the DOI:
Johnson, Kyle P., Patrick J. Burns, John Stewart, Todd Cook, Clément Besnier, and William J. B. Mattingly. "The Classical Language Toolkit: An NLP Framework for Pre-Modern Languages." In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations, pp. 20-29. 2021. 10.18653/v1/2021.acl-demo.3
The complete BibTeX entry:
@inproceedings{johnson-etal-2021-classical,
title = "The {C}lassical {L}anguage {T}oolkit: {A}n {NLP} Framework for Pre-Modern Languages",
author = "Johnson, Kyle P. and
Burns, Patrick J. and
Stewart, John and
Cook, Todd and
Besnier, Cl{\'e}ment and
Mattingly, William J. B.",
booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing: System Demonstrations",
month = aug,
year = "2021",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.acl-demo.3",
doi = "10.18653/v1/2021.acl-demo.3",
pages = "20--29",
abstract = "This paper announces version 1.0 of the Classical Language Toolkit (CLTK), an NLP framework for pre-modern languages. The vast majority of NLP, its algorithms and software, is created with assumptions particular to living languages, thus neglecting certain important characteristics of largely non-spoken historical languages. Further, scholars of pre-modern languages often have different goals than those of living-language researchers. To fill this void, the CLTK adapts ideas from several leading NLP frameworks to create a novel software architecture that satisfies the unique needs of pre-modern languages and their researchers. Its centerpiece is a modular processing pipeline that balances the competing demands of algorithmic diversity with pre-configured defaults. The CLTK currently provides pipelines, including models, for almost 20 languages.",
}
License
Copyright (c) 2014–present Kyle P. Johnson under the MIT License.
Metadata
Release files for cltk 2.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cltk-2.5.1.tar.gz | 470.8 kB | Without provenance | Details for cltk-2.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cltk-2.5.1-py3-none-any.whl | Python 3 | none | any | Details for cltk-2.5.1-py3-none-any.whl |
Total release size: 775.0 kB
Release files / cltk-2.5.1.tar.gz
| Download URL | cltk-2.5.1.tar.gz |
|---|---|
| Size | 470.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbfa5582d2eec5893c26944ded824e87dea6361f06b7db1f69d8071711e0e223
|
|
BLAKE2b-256 checksum How to use checksums |
5298031c51ef23f536b228290096a9a9690454bed597b8af4e81d4384e489db8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cltk-2.5.1-py3-none-any.whl
| Download URL | cltk-2.5.1-py3-none-any.whl |
|---|---|
| Size | 304.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21ca044ee4edc80612487d46260c858a47d4f31c93c60ec967bb74f278ea9481
|
|
BLAKE2b-256 checksum How to use checksums |
a58792b9e44ad86f209adbd4a1cbdeab49847b7ce9bfe98d16e37081ad7c0b62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for cltk 2.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.