medkit.io._common
=================

.. py:module:: medkit.io._common


Attributes
----------

.. autoapisummary::

   medkit.io._common.logger


Functions
---------

.. autoapisummary::

   medkit.io._common.get_anns_by_type


Module Contents
---------------

.. py:data:: logger

.. py:function:: get_anns_by_type(medkit_doc: medkit.core.text.TextDocument, anns_labels: list[str] | None = None) -> dict[str, medkit.core.text.TextAnnotation]

   
   Filter annotations by labels and return a dictionary by type of annotation.


   :Parameters:

       **medkit_doc** : TextDocument
           Text document with annotations

       **anns_labels** : list of str, optional
           Labels to filter annotations.
           If not provided, all annotations will be in the dictionary



   :Returns:

       Dict[str, TextAnnotation]
           Annotations by type: 'entities', 'relations', and 'segments'.











   ..
       !! processed by numpydoc !!

