get_predictions

get_predictions(prefix: str, target_prefixes: str | Iterable[str], *, relation: str | None | NamableReference = None, identifiers_are_names: bool = False, method: Literal['ner', 'grounding', 'embedding'] | None = None, cutoff: float | None = None, batch_size: int | None = None, custom_filter_function: Callable[[SemanticMapping], bool] | None = None, progress: bool = True, filter_mutual_mappings: bool = False, mapping_tool: str | MappingTool | None = None, force: bool = False, cache: bool = True, force_process: bool = False, all_by_all: bool = False) list[SemanticMapping][source]

Add lexical matching-based predictions to the Biomappings predictions.tsv file.

Parameters:
  • prefix – The source prefix

  • target_prefixes – The target prefix or prefixes

  • mapping_tool – The name of the mapping tool. Defaults to :data:``

  • relation – The relationship. Defaults to skos:exactMatch.

  • identifiers_are_names – The source prefix’s identifiers should be considered as names

  • method – The lexical predication method to use

  • cutoff – an optional minimum prediction confidence cutoff

  • batch_size – The batch size for embeddings

  • custom_filter_function – A custom function that decides if semantic mappings should be kept, applied after all other logic.

  • progress – Should progress be shown?

  • filter_mutual_mappings – Should mappings between entities in the given namespaces be filtered out?

  • force – Should the ontologies be re-downloaded/processed?

  • force_process – Should the ontologies be re-processed? Subsumed by force

  • cache – Should the results of processing the resources be cached?

  • all_by_all – Enable all-by-all prediction mode, which doesn’t just check between the given prefix and target_prefixes (1-n) but does all against all

Returns:

A list of predicted semantic mappings