Skip to main content

CAS2IOB

CAS2IOB is a converter of UIMA CAS XMI files using in the INCEpTION annotation platform into IOB TSV files. In contrast to the internal convertor in INCEpTION, it handles the nested NER tags, NEL tags and components, and saves them into multiple columns of a TSV-file:

TOKEN  NE-COARSE   NE-FINE NE-FINE-COMP    NE-NESTED   NEL-WikidataQID

It reads the UIMA CAS XMI files using dkpro-cassis library.

Installation

pip install cas2iob

Using as a library

Import cas2iob:

import cas2iob

Convert ./input.xmi with ./TypeSystem.xml into ./output.tsv:

cas2iob.file('./input.xmi', 'output.tsv')

Convert all files in ./input folder with ./TypeSystem.xml into ./output folder:

cas2iob.folder('./input', './output')

If ./TypeSystem.xml is located in a different folder, add it to the commands above as the third argument.

If you don't want to include column names in a TSV-file, add the forth argument metadata=False.

Using in CLI

% cas2iob --help
                                                                                
 Usage: cas2iob [OPTIONS] INPUT_PATH OUTPUT_PATH [TYPESYSTEM_XML] [METADATA]    
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    input_path          PATH              [default: None] [required]        │
│ *    output_path         PATH              [default: None] [required]        │
│      typesystem_xml      [TYPESYSTEM_XML]  [default: ./TypeSystem.xml]       │
│      metadata            [METADATA]        [default: True]                   │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.      │
│ --show-completion             Show completion for the current shell, to copy │
│                               it or customize the installation.              │
│ --help                        Show this message and exit.                    │
╰──────────────────────────────────────────────────────────────────────────────╯

Metadata

Release files for cas2iob 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cas2iob 0.1.0
File Size Uploaded
cas2iob-0.1.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cas2iob 0.1.0
File Interpreter ABI Platform
cas2iob-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / cas2iob-0.1.0.tar.gz

Download URL cas2iob-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e612775fa0ecc2f1e0bfc46621bf241a2e61142175a963d76e4a8170a217f4ff
BLAKE2b-256 checksum
How to use checksums
60c1cebcda20a6aaefb95f1299339c4022247b7fa60b6ce999c7c83f1f840491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.6

Release files / cas2iob-0.1.0-py3-none-any.whl

Download URL cas2iob-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
047e8af515c4476051bd5b2e01aae0a637b47d196406d6547057d87575c47f53
BLAKE2b-256 checksum
How to use checksums
a2e2dc63ca0a91590c76c4cc1502bfdacfd808f88fadcaa82de2f8de5ec555a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page