Skip to main content

MIMIC III Corpus Parsing

Project description

MIMIC III Corpus Parsing

PyPI Python 3.9 Python 3.10 Build Status

A utility library for parsing the MIMIC-III corpus. This uses spaCy and extends the zensols.mednlp to parse the MIMIC-III medical note dataset, which include:

  • Re-groups pseudo tokens as a single token.
  • Modifies the spaCy tokenizer to deal with pseudo tokens--specifically not break on syntax used in the pseudo tokens.

Documentation

See the full documentation. The API reference is also available.

Obtaining

The easiest way to install the command line program is via the pip installer:

pip3 install --use-deprecated=legacy-resolver zensols.mimic

Binaries are also available on pypi.

Installation

  1. Install the package: pip3 install zensols.mimic
  2. Install the database (either PostgreSQL or SQLite).

PostgreSQL

For PostgreSQL, load MIMIC-III by following the PostgreSQL instructions or consider the PostgreSQL Docker image. The Python PostgreSQL client package is also needed, which can be installed with pip3 install zensols.dbpg.

SQLite Configuration

A SQLite can also be used, but it is slower an not as well tested. However, it is faster to set up and could also be useful when a database is not available. I have also created a repository to create the SQLite database file using the SQLite instructions and repository.

The following additional configuration in the --config file is also necessary:

[import]
sections = list: mimic_sqlite_res_imp

[mimic_sqlite_res_imp]
type = import
config_file = resource(zensols.mednlp): resources/sqlite.conf

[mimic_sqlite_conn_manager]
db_file = path: <some directory>/mimic3.sqlite3

Changelog

An extensive changelog is available here.

License

MIT License

Copyright (c) 2022 - 2023 Paul Landes

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

zensols.mimic-1.4.3-py3-none-any.whl (44.7 kB view hashes)

Uploaded Python 3

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