Skip to content

G8 Score[source]

The eds.g8 component extracts mentions of the g8 score.

Parameters

PARAMETER DESCRIPTION
nlp

The pipeline object

TYPE: PipelineProtocol

name

Name of the component

TYPE: Optional[str] DEFAULT: 'g8_score'

patterns

A list of regexes to identify the score

TYPE: List[str] DEFAULT: default_patterns

attr

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

TYPE: str DEFAULT: 'NORM'

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 else

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

label

Label name to use for the Span object and the extension

TYPE: str DEFAULT: 'g8_score'

span_setter

How to set matches on the doc

TYPE: SpanSetterArg DEFAULT: {'ents': True, 'g8': True, 'g8_score': True}

domain

The frailty domain the score is related to

TYPE: str

severity_assigner

Function that takes the score value and assigns the corresponding severity for the domain.

TYPE: Callable[[Span], Any] DEFAULT: g8_severity_assigner

RETURNS DESCRIPTION
SimpleScoreMatcher