Skip to content

edsnlp.pipelines.ner.scores.tnm.patterns

modifier_pattern = '(?P<modifier>[cpPyraum]p?)' module-attribute

tumour_pattern = 'T\\s?(?P<tumour>([0-4o]|is))?(?P<tumour_specification>[abcdx])?' module-attribute

node_pattern = '\\s*\\/?\\s*N\\s?(?P<node>[0-3o]|x)(?P<node_specification>[abcdx])?' module-attribute

metastasis_pattern = '\\s*\\/?\\s*M\\s?(?P<metastasis>([01o]|x))x?' module-attribute

resection_completeness = '\\s*\\/?\\s*R\\s?(?P<resection_completeness>[012])' module-attribute

version_pattern = '\\(?(?P<version>uicc|accj|tnm|UICC|ACCJ|TNM)\\s+([éeE]ditions|[éeE]d\\.?)?\\s*(?P<version_year>\\d{4}|\\d{2})\\)?' module-attribute

spacer = '(.|\\n){1,5}' module-attribute

tnm_pattern = '\\b' + tnm_pattern + '\\b' module-attribute