acres.rater package

Package with rating modules. Rating modules are used to filter out candidate expansions provided by expansion strategies.

Submodules

acres.rater.expansion module

Rating submodule for expansion (acronym + full form) checks.

acres.rater.expansion.is_expansion_valid(acro, full)[source]

Check whether an expansion is valid for a given acronym.

Parameters
  • acro (str) –

  • full (str) –

Return type

bool

Returns

acres.rater.full module

Rating submodule for full form checks.

acres.rater.full.is_full_valid(full)[source]

Check whether the full form is valid.

Parameters

full (str) –

Return type

bool

Returns

acres.rater.rater module

Rating main module.

acres.rater.rater.get_acronym_score(acro, full)[source]

Scores acronym/resolution pairs according to a series of well-formedness criteria.

This scoring function should be used only for cleaned and normalized full forms.

For forms that may contain acronym-definition pairs, see get_acronym_definition_pair_score. For forms that should be checked for variants, see get_acronym_score_variants.

TODO Consider again morphosaurus checks.

TODO Full form should not be an acronym itself.

Parameters
  • acro (str) – Acronym to be expanded.

  • full (str) – Long form to be checked whether it qualifies as an acronym expansion.

Return type

float

Returns

score that rates the likelihood that the full form is a valid expansion of the acronym.