Python-IE document and annotation types as well as document processing utilities
Project description
pie-documents
Annotation-, document- and metric implementations as well as utilities for Python-IE.
Available annotation types: see here.
Available document types: see here.
Available metrics:
- F1Metric
- ConfusionMatrix
- SpanLengthCollector
- RelationArgumentDistanceCollector
- SpanCoverageCollector
- SQuADF1
Document processing utilities:
- MultiSpanMerger
- SpansViaRelationMerger
- RegexPartitioner
- RelationArgumentSorter
- SentenceSplitter
- TextSpanTrimmer
- tokenization utils, e.g.,
text_based_document_to_token_basedandtoken_based_document_to_text_based
Setup
pip install pie-documents
To install the latest version from GitHub:
pip install git+https://git@github.com/ArneBinder/pie-documents.git
Development
Setup
- This project is build with Poetry. See here for installation instructions.
- Get the code and switch into the project directory:
git clone https://github.com/ArneBinder/pie-documents cd pie-documents
- Create a virtual environment and install the dependencies (including development dependencies):
poetry install --with dev
Finally, to run any of the below commands, you need to activate the virtual environment:
poetry shell
Note: You can also run commands in the virtual environment without activating it first: poetry run <command>.
Code Formatting, Linting and Static Type Checking
pre-commit run -a
Testing
run all tests with coverage:
pytest --cov --cov-report term-missing
Releasing
- Create the release branch:
git switch --create release main - Increase the version:
poetry version <PATCH|MINOR|MAJOR>, e.g.poetry version patchfor a patch release. If the release contains new features, or breaking changes, bump the minor version (this project has no main release yet). If the release contains only bugfixes, bump the patch version. See Semantic Versioning for more information. - Commit the changes:
git commit --message="release <NEW VERSION>" pyproject.toml, e.g.git commit --message="release 0.13.0" pyproject.toml - Push the changes to GitHub:
git push origin release - Create a PR for that
releasebranch on GitHub. - Wait until checks passed successfully.
- Merge the PR into the main branch. This triggers the GitHub Action that creates all relevant release artefacts and also uploads them to PyPI.
- Cleanup: Delete the
releasebranch. This is important, because otherwise the next release will fail.
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
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 pie_documents-0.1.0.tar.gz.
File metadata
- Download URL: pie_documents-0.1.0.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b041dd7ca36ee246213e585a7ae10ae4bc6fc7aadc39bb049badc21b259457
|
|
| MD5 |
7679e700f301e977c3cb05c80c498479
|
|
| BLAKE2b-256 |
b6771701ba17f1ae07995d072e8b409517385922e091cea0334c3081e314e626
|
File details
Details for the file pie_documents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pie_documents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4802b8f4e58c8a97c26566818ee42597ec180ba49098453813891db5640ee20a
|
|
| MD5 |
2edd7d4de7ead78e4bd6edb15aef691e
|
|
| BLAKE2b-256 |
e97758ff5d96605c7ce629fed383b45c1c0172c2ef4562779fdd439ee632ef9d
|