Skip to main content

Conversions between labelbuddy json and other formats.

Project description

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_dir is a directory containing .txt files that have been imported into Inception, ie the contents of the documents.
  • path/to/wtsv_dir is a directory containing the .wtsv WebAnno files exported from Inception, whose names must match those of the .txt files 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.jsonl contains documents & annotations in labelbuddy format.
  • /path/to/wtsv_dir is a directory containing .wtsv WebAnno 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labelutils-0.0.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

labelutils-0.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file labelutils-0.0.1.tar.gz.

File metadata

  • Download URL: labelutils-0.0.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for labelutils-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ba5c5c37a86c32bc3500f4dcc71daca4cff5aabf1976bb10b1aa650b5df9065
MD5 91a9a3515d47b3d3bb4a524ff5ccaa20
BLAKE2b-256 9e7fd51be5667d1a130ba16ea7f3d5c06269fc3b0442a338a862a47fd0b3f02b

See more details on using hashes here.

File details

Details for the file labelutils-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: labelutils-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for labelutils-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fadd15743a0d69f789f9c27b1f728c9930f6b78452d8f29b8e9a4fc26b5e1885
MD5 55ceb53b63787b9bf7a8a8e9fdbcb88f
BLAKE2b-256 3dc06c97b7847c81ab03c6a895a890a4a7297dee84872ad38058af30732f0bb4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page