edsnlp.pipes.ner.scores.factory
create_component = registry.factory.register('eds.score', assigns=['doc.ents', 'doc.spans'], deprecated=['score'])(SimpleScoreMatcher)
module-attribute
[source]
Matcher component to extract a numeric score
Parameters
PARAMETER | DESCRIPTION |
---|---|
nlp | The pipeline object TYPE: |
label | The name of the extracted score TYPE: |
regex | A list of regexes to identify the score TYPE: |
attr | Whether to match on the text ('TEXT') or on the normalized text ('NORM') TYPE: |
value_extract | Regex with capturing group to get the score value TYPE: |
score_normalization | Function that takes the "raw" value extracted from the
TYPE: |
window | Number of token to include after the score's mention to find the score's value TYPE: |
ignore_excluded | Whether to ignore excluded spans when matching TYPE: |
ignore_space_tokens | Whether to ignore space tokens when matching TYPE: |
flags | Regex flags to use when matching TYPE: |
score_name | Deprecated, use TYPE: |
label | Label name to use for the TYPE: |
span_setter | How to set matches on the doc TYPE: |