Skip to main content

Taxonomic Entity Augmentation (TEA)

TEA provides taxonomic entity augmentation for biological texts. It supports species-name substitution, strain-name scrambling, sentence windowing, token-budget handling, and token-level label materialisation from curated data.

Installation

python -m pip install taxonomic-entity-augmentation

Augmentation example

from bio_tea import TEA


class WhitespaceTokenizer:
    def tokenize(self, text, **kwargs):
        return text.split()


tea = TEA(WhitespaceTokenizer(), rseed=42)

print(tea.switch("Escherichia coli was measured in culture."))
print(tea.scramble("The strain ATCC 25922 was included.", ["ATCC 25922"], force_diff=True))

Dataset utility commands

The package includes command-line utilities for generated TEA example sets:

bio-tea-inspect --help
bio-tea-sample --help
bio-tea-validate --help
bio-tea-stats --help
bio-tea-qa --help
bio-tea-manifest-compare --help

Utilities that operate on curated TEA source data require TEA_curated_data. Download v1.1 and point TEA to the extracted directory:

wget https://github.com/tznurmin/TEA_curated_data/archive/refs/tags/v1.1.tar.gz -qO - | tar -xz
mv TEA_curated_data-1.1 TEA_curated_data
export TEA_CURATED_ROOT="$PWD/TEA_curated_data"

TEA_CURATED_DATA is also accepted. TEA_curated_data is external to TEA and separately licensed.

Licence

Download files

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

Source Distribution

taxonomic_entity_augmentation-1.0.3.tar.gz (210.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taxonomic_entity_augmentation-1.0.3-py3-none-any.whl (232.6 kB view details)

Uploaded Python 3

File details

Details for the file taxonomic_entity_augmentation-1.0.3.tar.gz.

File metadata

File hashes

Hashes for taxonomic_entity_augmentation-1.0.3.tar.gz
Algorithm Hash digest
SHA256 89f2e505be48961f5aff34fc2945233828884579dd22d5819024aa8a0ca6b308
MD5 37d91e4eda0a9fe87f8610619ca4a693
BLAKE2b-256 f5b867a3b3e9656e895a00df38f5c5677f39ba1298e78e291a1a98aeb47ae116

See more details on using hashes here.

Provenance

The following attestation bundles were made for taxonomic_entity_augmentation-1.0.3.tar.gz:

Publisher: publish-pypi.yaml on tznurmin/bio-tea

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taxonomic_entity_augmentation-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for taxonomic_entity_augmentation-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6665bb1a2045745172a3293c346917065bac6ac01a5097b91a9fbdf2955071c
MD5 58ce383782e5a31807dcb31da18b47eb
BLAKE2b-256 689aead36b5f2dcfcc8d5e5f8bd414eed3bc28f68088a9ed5a47e1abc3c12d6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for taxonomic_entity_augmentation-1.0.3-py3-none-any.whl:

Publisher: publish-pypi.yaml on tznurmin/bio-tea

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 files

1.0.2

2 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