:py:mod:`medcat.preprocessing.cleaners` ======================================= .. py:module:: medcat.preprocessing.cleaners .. autoapi-nested-parse:: Text cleaners of various levels, from removing only garbage to pretty much everything that is not a word. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.preprocessing.cleaners.prepare_name medcat.preprocessing.cleaners.basic_clean medcat.preprocessing.cleaners.clean_text medcat.preprocessing.cleaners.clean_drugs_uk medcat.preprocessing.cleaners.clean_name medcat.preprocessing.cleaners.clean_umls medcat.preprocessing.cleaners.clean_def medcat.preprocessing.cleaners.clean_snt medcat.preprocessing.cleaners.clean_snomed_name Attributes ~~~~~~~~~~ .. autoapisummary:: medcat.preprocessing.cleaners.BR_U4 medcat.preprocessing.cleaners.CB medcat.preprocessing.cleaners.CB_D medcat.preprocessing.cleaners.BR medcat.preprocessing.cleaners.PH_RM medcat.preprocessing.cleaners.SKIP_CHARS .. py:function:: prepare_name(raw_name, nlp, names, config) Generates different forms of a name. Will edit the provided `names` dictionary and add information generated from the `name`. :param raw_name: Thre raw name to prepare. :type raw_name: str :param nlp: Spacy nlp model. :type nlp: Language :param names: Dictionary of existing names for this concept in this row of a CSV. The new generated name versions and other required information will be added here. :type names: Dict :param config: Global config for medcat. :type config: Config :Returns: **names** (*Dict*) -- The new dictionary of prepared names. .. py:function:: basic_clean(text) Remove almost everything from text :param text: Text to be cleaned. :type text: str :Returns: **str** -- The cleaned text. .. py:function:: clean_text(text) Remove almost everything from text :param text: Text to be cleaned. :type text: str :Returns: **str** -- The cleaned text. .. py:data:: BR_U4 .. py:data:: CB .. py:data:: CB_D .. py:data:: BR .. py:data:: PH_RM .. py:data:: SKIP_CHARS .. py:function:: clean_drugs_uk(text, stopwords = None, umls = False) .. py:function:: clean_name(text, stopwords = None, umls = False) .. py:function:: clean_umls(text, stopwords = None) .. py:function:: clean_def(text) .. py:function:: clean_snt(text) .. py:function:: clean_snomed_name(text)