Skip to main content

Download NLP4BIA benchmarks and load datasets in their format

Project description

NLP4BIA Library

This repository provides a Python library for loading, processing, and utilizing biomedical datasets curated by the NLP4BIA research group at the Barcelona Supercomputing Center (BSC). The datasets are specifically designed for natural language processing (NLP) tasks in the biomedical domain.


Available Dataset Loaders

The library currently supports the following dataset loaders, which are part of public benchmarks:

1. Distemist

  • Description: A dataset for disease mentions recognition and normalization in Spanish medical texts.
  • Zenodo Repository: Distemist Zenodo

2. Meddoplace

  • Description: A dataset for place name recognition in Spanish medical texts.
  • Zenodo Repository: Meddoplace Zenodo

3. Medprocner

  • Description: A dataset for procedure name recognition in Spanish medical texts.
  • Zenodo Repository: Medprocner Zenodo

4. Symptemist

  • Description: A dataset for symptom mentions recognition in Spanish medical texts.
  • Zenodo Repository: Symptemist Zenodo

Installation

pip install nlp4bia

Quick Start Guide

Example Usage

Here's how to use one of the dataset loaders, such as DistemistLoader:

from nlp4bia.datasets.benchmark.distemist import DistemistLoader

# Initialize loader
distemist_loader = DistemistLoader(lang="es", download_if_missing=True)

# Load and preprocess data
dis_df = distemist_loader.df
print(dis_df.head())

Dataset folders are automatically downloaded and extracted to the ~/.nlp4bia directory.

Column Descriptions

Dataset Columns

  • filenameid: Unique identifier combining filename and offset information.
  • mention_class: The class of the mention (e.g., disease, symptom, etc.).
  • span: Text span corresponding to the mention.
  • code: The normalized code for the mention (usually to SNOMED CT).
  • sem_rel: Semantic relationships associated with the mention.
  • is_abbreviation: Indicates if the mention is an abbreviation.
  • is_composite: Indicates if the mention is a composite term.
  • needs_context: Indicates if the mention requires additional context.
  • extension_esp: Additional information specific to Spanish texts.

Gazetteer Columns

  • code: Normalized code for the term.
  • language: Language of the term.
  • term: The term itself.
  • semantic_tag: Semantic tag associated with the term.
  • mainterm: Indicates if the term is a primary term.

Contributing

Contributions to expand the dataset loaders or improve existing functionality are welcome! Please open an issue or submit a pull request.


License

This project is licensed under the MIT License. See the LICENSE file for details.


References

If you use this library or its datasets in your research, please cite the corresponding Zenodo repositories or related publications.


Instructions for Maintainers

  1. Update the version in nlp4bia/__init__.py and in pyproject.toml.
  2. Remove the dist folder (rm -rf dist).
  3. Build the package (python -m build).
  4. Check the package (twine check dist/*).
  5. Upload the package (twine upload dist/*).
  6. Install the package (pip install nlp4bia).

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

nlp4bia-2.1.7.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

nlp4bia-2.1.7-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file nlp4bia-2.1.7.tar.gz.

File metadata

  • Download URL: nlp4bia-2.1.7.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for nlp4bia-2.1.7.tar.gz
Algorithm Hash digest
SHA256 865d14d7183a1428c96aaeae116006db15ea467f1f34b99b71e74369241ffaae
MD5 d1becb3c6f2aa8309036f41039d0cc70
BLAKE2b-256 6f5e797c38a0e07042a54af71e0edbc0ae531ca8d7d1cce28fc59b2583b8437c

See more details on using hashes here.

File details

Details for the file nlp4bia-2.1.7-py3-none-any.whl.

File metadata

  • Download URL: nlp4bia-2.1.7-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for nlp4bia-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 517ac8cb273485bd9e64bdb2d17a8d2d741e87e7067ca4a5df095905dc54a757
MD5 7659a120a98fd426c25b643b388ebf3e
BLAKE2b-256 dfebcc3f6697421935e3e8c7546331161b1b73a645b493e44ec1b82a3f575a31

See more details on using hashes here.

Supported by

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