Skip to content

Emergency CCMU

Matcher for explicit mentions of the French CCMU emergency score.

Examples

import edsnlp

nlp = edsnlp.blank("eds")
nlp.add_pipe("eds.emergency_ccmu")

Parameters

PARAMETER DESCRIPTION
nlp

The pipeline object

TYPE: PipelineProtocol

name

The name of the component

TYPE: Optional[str] DEFAULT: None

regex

A list of regexes to identify the score

TYPE: List[str] DEFAULT: regex

attr

Whether to match on the text ('TEXT') or on the normalized text ('NORM')

TYPE: str DEFAULT: 'NORM'

value_extract

Regex with capturing group to get the score value

TYPE: str DEFAULT: value_extract

score_normalization

Function that takes the "raw" value extracted from the value_extract regex and should return:

  • None if no score could be extracted
  • The desired score value otherwise

TYPE: Union[str, Callable[[Union[str, None]], Any]] DEFAULT: score_normalization_str

window

Number of token to include after the score's mention to find the score's value

TYPE: int DEFAULT: 20

ignore_excluded

Whether to ignore excluded spans when matching

TYPE: bool DEFAULT: False

ignore_space_tokens

Whether to ignore space tokens when matching

TYPE: bool DEFAULT: False

flags

Regex flags to use when matching

TYPE: Union[RegexFlag, int] DEFAULT: 0

label

Label name to use for the Span object and the extension

TYPE: str DEFAULT: 'emergency_ccmu'

span_setter

How to set matches on the doc

TYPE: SpanSetterArg DEFAULT: {'ents': True, 'emergency_ccmu': True}

RETURNS DESCRIPTION
SimpleScoreMatcher