How to use deduce - 2 common examples

To help you get started, we’ve selected a few deduce examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vmenger / deduce / deduce / deduce.py View on Github external
text = text.replace("<", "(")
    text = text.replace(">", ")")

    # Deidentify names
    if names:

		# First, based on the rules and lookup lists
        text = annotate_names(text, patient_first_names, patient_initials,
                              patient_surname, patient_given_name)

		# Then, based on the context
        text = annotate_names_context(text)

		# Flatten possible nested tags
        if flatten:
            text = flatten_text(text)

    # Institutions
    if institutions:
        text = annotate_institution(text)


    # Geographical locations
    if locations:
        text = annotate_residence(text)
        text = annotate_address(text)
        text = annotate_postalcode(text)

    # Phone numbers
    if phone_numbers:
        text = annotate_phonenumber(text)
github vmenger / deduce / deduce / deduce.py View on Github external
if names:

		# First, based on the rules and lookup lists
        text = annotate_names(text, patient_first_names, patient_initials,
                              patient_surname, patient_given_name)

		# Then, based on the context
        try:
            text = annotate_names_context(text)
        except RecursionError:
            text += ' (RecursionError)'
            pass

		# Flatten possible nested tags
        if flatten:
            text = flatten_text(text)

    # Institutions
    if institutions:
        text = annotate_institution(text)


    # Geographical locations
    if locations:
        text = annotate_residence(text)
        text = annotate_address(text)
        text = annotate_postalcode(text)

    # Phone numbers
    if phone_numbers:
        text = annotate_phonenumber(text)

deduce

Deduce: de-identification method for Dutch medical text

GPL-3.0
Latest version published 4 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages