Data Module (PsychiatryNLPKit.data)

Data containers for organizing clinical text and managing pre-computed linguistic features.

The TextData class is the central data structure — it holds named sections of text, lazy-loads NLP models on first access, and caches all computed features (POS tags, embeddings, constituency parses) so multiple analyses share the same computation.

Core Classes

PsychiatryNLPKit.data.Section(text[, name])

A named text segment within a larger document.

PsychiatryNLPKit.data.TextData(sections[, ...])

Main text data container with lazy-computed linguistic properties.

PsychiatryNLPKit.data.ImageData(path[, name])

Container for an image with optional metadata.

Utilities

PsychiatryNLPKit.data.split_paragraph_into_sentences(...)

Split a paragraph into sentences using a regex.