oaklib.utilities.lexical.lexical_indexer

Lexical Utilities

Various utilities for working with lexical aspects of ontologies plus mappings

Functions

add_labels_from_uris(oi)

Adds a label based on the CURIE or URI for entities that lack labels

apply_transformation(term, transformation)

Apply an individual transformation on a term

create_lexical_index(oi[, pipelines, ...])

Generates a LexicalIndex keyed by normalized terms

create_mapping(term, r1, r2[, pred, confidence])

Create mappings between a pair of entities.

create_or_load_lexical_index(path, oi, **kwargs)

Creates a lexical index and saves it to the specified path if it does not exist.

inferred_mapping(oi, term, r1, r2[, ruleset])

Create a mapping from a pair of relationships, applying rules to filter or assign confidence

inverse_logit(weight)

Inverse logit

invert_mapping_predicate(pred)

Return the opposite of predicate passed.

lexical_index_to_sssom(oi, lexical_index[, ...])

Transform a lexical index to an SSSOM MappingSetDataFrame by finding all pairs for any given index term.

load_lexical_index(path[, syntax])

Loads from a YAML file

load_mapping_rules(path)

Loads from a YAML file that contains rules for mapping.

precondition_holds(precondition, mapping)

save_lexical_index(lexical_index, path[, syntax])

Saves a YAML using standard mapping of datanodel to YAML

save_mapping_rules(mapping_rules, path)

Saves a YAML using standard mapping of datanodel to YAML