medkit.core.collection#

Classes#

Collection

Collection of documents of any modality (text, audio).

Module Contents#

class medkit.core.collection.Collection(*, text_docs: list[medkit.core.text.TextDocument] | None = None, audio_docs: list[medkit.core.audio.AudioDocument] | None = None)#

Collection of documents of any modality (text, audio).

This class allows to group together a set of documents representing a common unit (for instance a patient), even if they don’t belong to the same modality.

This class is still a work-in-progress. In the future it should be possible to attach additional information to a Collection.

Parameters:
text_docslist of TextDocument, optional

List of text documents.

audio_docs: list of TextDocument, optional

List of audio documents.

text_docs#
audio_docs#
property all_docs: list[medkit.core.document.Document]#

Return all documents belonging to the collection.

to_dict() dict[str, Any]#