GildaMatcher
- class GildaMatcher(grounder: gilda.Grounder, *, reference_cls: type[R] | None = None)[source]
-
A matcher that uses gilda as a backend.
Initialize a grounder wrapping a
gilda.Grounder.Methods Summary
default()Get the default/builtin grounder.
from_literal_mappings(literal_mappings, *[, ...])Initialize a grounder wrapping a
gilda.Grounder.get_matches(text[, context, organisms, ...])Get matches in the SSSLM format using
gilda.Grounder.ground().Return if this matcher has lookups indexed in it.
Methods Documentation
- classmethod from_literal_mappings(literal_mappings: Iterable[LiteralMapping[R]], *, prefix_priority: list[str] | None = None, grounder_cls: type[gilda.Grounder] | None = None, filter_duplicates: bool = True, on_error: GildaErrorPolicy = 'ignore') Self[source]
Initialize a grounder wrapping a
gilda.Grounder.- Parameters:
literal_mappings – The literal mappings to populate the grounder
prefix_priority – The priority list of prefixes to break ties. Maps to
namespace_priorityingilda.Grounder.__init__()grounder_cls – A custom subclass of
gilda.Grounder, if given.filter_duplicates – Should duplicates be filtered using
gilda.term.filter_out_duplicates()? Defaults to true.on_error – The policy for what to do on error converting to Gilda