Skip to content

edsnlp.pipelines.ner.scores.tnm.patterns

prefix_pattern = '(?P<prefix>[cpPyraum]p?)' module-attribute

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

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

metastasis_pattern = '(\\s*\\/?\\s*([cpPyraum]p?)?\\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