Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pyobo/struct/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ def get_id_synonyms_mapping(self, *, use_tqdm: bool = False) -> Mapping[str, lis
"""Get a mapping from identifiers to a list of sorted synonym strings."""
return multidict(self.iterate_synonym_rows(use_tqdm=use_tqdm))

def get_grounder(self) -> ssslm.Grounder:
def get_grounder(self) -> ssslm.Grounder[Reference]:
"""Get a grounder from this ontology.

:returns: An object that can be used for named entity recognition and named
Expand Down Expand Up @@ -2099,7 +2099,7 @@ def get_grounder(self) -> ssslm.Grounder:
"""
return ssslm.make_grounder(self.get_literal_mappings())

def get_literal_mappings(self) -> Iterable[ssslm.LiteralMapping]:
def get_literal_mappings(self) -> Iterable[ssslm.LiteralMapping[Reference]]:
"""Get literal mappings in a standard data model."""
stanzas: Iterable[Stanza] = itt.chain(self, self.typedefs or [])
yield from itt.chain.from_iterable(
Expand Down
Loading