The Classical Language Toolkit
Project description
About
Experimental CLTK with new NLP() class.
Installation
$ pip install cltk
Documentation
$ make docs
Development
The following steps will give you a working development environment.
Python setup
Use pyenv to manage Python versions and poetry for package builds.
- Install pyenv:
First time installation; curl https://pyenv.run | bash
To update: pyenv update
- Install supported versions of the Python language through pyenv into a dedicated virtualenv:
$ pyenv install --list | grep 3.8
$ pyenv install 3.8.3 (or whatever is latest)
$ pyenv virtualenv 3.8.3 cltk
$ pyenv local cltk. Open a new window and this should be activated (check with $ python --version).
Install poetry to support packaging: $ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python (https://poetry.eustace.io/docs/)
Install dependencies in poetry.lock: $ poetry install
Install Stanford NLP models: $ poetry run python scripts/download_misc_dependencies.py
Install Graphiz (necessary for building docs): https://graphviz.gitlab.io/download/
Packaging
Validate structure of pyproject.toml: $ poetry check
- Update project version with poetry: $ poetry version prepatch (e.g., 1.0.0 to 1.0.1-alpha.0)
For minor version: $ poetry version preminor (1.0.0 to 1.1.0-alpha.0)
For major version: $ poetry version premajor (1.0.0 to 2.0.0-alpha.0)
Update all dependencies to latest version (optional): $ make updateDependencies
Make package (sdist and wheel): $ make build
- Check typing: $ make typing
View report at .mypy_cache/index.html
- Run linter: $ make lint
View report at pylint/pylint.html
Auto-format code: $ make format
- Build docs: $ make docs
View docs at docs/_build/html/index.html
- Make UML diagrams: $ make uml
View diagrams at docs/classes.png and docs/packages.png
Run the above at each commit with pre-commit: $ poetry run pre-commit install (just once)
Run tests: $ make test
Publish pre-release (permissions required): $ make uploadTest
Install from TestPyPI: $ make installPyPITest
Repeat the above as necessary
- Bump version: $ poetry version patch (e.g., 1.0.1-alpha.0 to 1.0.1)
For minor version: $ poetry version minor (1.0.1-alpha.0 to 1.1.0)
For major version: $ poetry version major (1.0.1-alpha.0 to 2.0.0)
If you need to publish multiple versions of an alpha pre-release, run $ poetry version prerelease (e.g., 1.0.1-alpha.0 to 1.0.1-alpha.1 to 1.0.1-alpha.2)
Publish to PyPI (permissions required): $ make upload
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
File details
Details for the file cltk-1.0.0a4.tar.gz
.
File metadata
- Download URL: cltk-1.0.0a4.tar.gz
- Upload date:
- Size: 315.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b58611d61195a86d58790bb42b86074a883bae8b79e12aace17b7a9f060eb88c |
|
MD5 | 98ee7af967d6b105bfa640897a46c5d3 |
|
BLAKE2b-256 | de92377243c51990e4f8e4555396c8425d7dc4dd725ae8bb5ec918de6fe4ae52 |
File details
Details for the file cltk-1.0.0a4-py3-none-any.whl
.
File metadata
- Download URL: cltk-1.0.0a4-py3-none-any.whl
- Upload date:
- Size: 381.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/19.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720a90bdc51f981b15ab41f2f8e7fe456e06445beedc0f4db7fee6b536dec1d6 |
|
MD5 | 4ed6786f48e48e14c93757a13f074dd6 |
|
BLAKE2b-256 | 8a12ef830798d5b6aed4e9f95f97941be2043df603f8a32e6c707a6834e4a9c4 |