labelutils
Python scripts to perform conversions between labelbuddy’s and other annotation tools’ file formats.
Installation
Can be installed from PyPI with
pip install labelutils
But as this is WIP, it might be better at the moment to install from the Git repository to get a more up-to-date version:
pip install "git+https://github.com/jeromedockes/labelutils.git"
Usage
After installing we can use the command labelutils_convert:
inception → labelbuddy format
labelutils_convert --from inception --to labelbuddy --in_txt_dir /path/to/txt_dir --in_wtsv_dir /path/to/wtsv_dir --out_jsonl docs.jsonl
Where:
/path/to/txt_diris a directory containing.txtfiles that have been imported into Inception, ie the contents of the documents.path/to/wtsv_diris a directory containing the.wtsvWebAnno files exported from Inception, whose names must match those of the.txtfiles except for the extension.
labelbuddy → inception format
labelutils_convert --from labelbuddy --to inception --in_jsonl docs.jsonl --in_wtsv_dir /path/to/wtsv_dir --out_inception_dir inception_docs
Where:
docs.jsonlcontains documents & annotations in labelbuddy format./path/to/wtsv_diris a directory containing.wtsvWebAnno files exported from Inception. If it contains any annotations, they are ignored, but this file is still needed to get Inception's tokenization of the documents.- output will be stored in
inception_docs
Metadata
Release files for labelutils 0.0.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 | |
|---|---|---|---|
| labelutils-0.0.1.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labelutils-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / labelutils-0.0.1.tar.gz
| Download URL | labelutils-0.0.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ba5c5c37a86c32bc3500f4dcc71daca4cff5aabf1976bb10b1aa650b5df9065
|
|
BLAKE2b-256 checksum How to use checksums |
9e7fd51be5667d1a130ba16ea7f3d5c06269fc3b0442a338a862a47fd0b3f02b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / labelutils-0.0.1-py3-none-any.whl
| Download URL | labelutils-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fadd15743a0d69f789f9c27b1f728c9930f6b78452d8f29b8e9a4fc26b5e1885
|
|
BLAKE2b-256 checksum How to use checksums |
3dc06c97b7847c81ab03c6a895a890a4a7297dee84872ad38058af30732f0bb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|