Skip to content

Document extending scispaCy with additional ontologies with PyOBO#542

Merged
dakinggg merged 5 commits intoallenai:mainfrom
cthoyt:extend-linking-utils
Sep 17, 2025
Merged

Document extending scispaCy with additional ontologies with PyOBO#542
dakinggg merged 5 commits intoallenai:mainfrom
cthoyt:extend-linking-utils

Conversation

@cthoyt
Copy link
Copy Markdown
Contributor

@cthoyt cthoyt commented Aug 2, 2025

Following these improvements in scispaCy:

This PR adds documentation on to the README to showcase how arbitrary ontologies and databases can be loaded for use as a scispaCy entity linker via PyOBO. It does this by:

  1. Adding an end-to-end example for annotating genes using HGNC
  2. Adds a link to more example usage in the PyOBO docs at https://pyobo.readthedocs.io/en/latest/scispacy.html

This also closes #331. hgnc can be replaced with to to use the Plant Trait Ontology, however I wasn't able to construct a convincing use case, so that can be left to the issue submitter.

@cthoyt cthoyt changed the title Refactor and extend linking_utils for loading arbitrary ontologies via PyOBO Refactor and extend linking_utils.py for loading arbitrary ontologies via PyOBO Aug 2, 2025
@cthoyt
Copy link
Copy Markdown
Contributor Author

cthoyt commented Aug 2, 2025

@dakinggg @DeNeutoy hi both, I think you will find this PR interesting. Happy to give some more context in what I'm interested in doing or hop on a call sometime to explain. Cheers!

@cthoyt cthoyt force-pushed the extend-linking-utils branch 3 times, most recently from 1291dc9 to ccd3214 Compare August 3, 2025 07:40
@cthoyt cthoyt marked this pull request as draft August 17, 2025 20:07
@cthoyt cthoyt changed the title Refactor and extend linking_utils.py for loading arbitrary ontologies via PyOBO Construct knowledge base via PyOBO and/or Wikidata Aug 18, 2025
@cthoyt cthoyt changed the title Construct knowledge base via PyOBO and/or Wikidata Construct KnowledgeBase via PyOBO and/or Wikidata Aug 18, 2025
@cthoyt cthoyt changed the title Construct KnowledgeBase via PyOBO and/or Wikidata [WIP] Construct KnowledgeBase via PyOBO and/or Wikidata Aug 20, 2025
@cthoyt cthoyt changed the title [WIP] Construct KnowledgeBase via PyOBO and/or Wikidata Construct a KnowledgeBase from an arbitrary biomedical ontology using PyOBO Aug 29, 2025
@cthoyt cthoyt marked this pull request as ready for review August 29, 2025 14:06
@cthoyt
Copy link
Copy Markdown
Contributor Author

cthoyt commented Aug 29, 2025

@dakinggg thank you for being patient so far with all of my other PRs - now, this one is a lot smaller and more manageable. I updated the example in the PR description to be possible to run with uv run to demonstrate it working from scratch

Copy link
Copy Markdown
Contributor

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I left a few comments, but generally I'm a little bit hesitant to accept this PR because its taking a dependency on a new (to scispacy), not super well established library (as far as i can tell from github stars and pypi downloads, feel free to correct me). I maintain scispacy in my spare time and am not really adding major new features. That being said, pyobo seems quite useful and I'm not certain one way or the other.

What do you think about keeping a helper function (scispacy_linker_from_pyobo or similar) within pyobo for now? Your previous PRs have made the scispacy code much easier to extend, such that the helper can be easily kept in pyobo itself. I'd be happy to accept a PR adding a link to pyobo in the readme somewhere in that case.

@cthoyt
Copy link
Copy Markdown
Contributor Author

cthoyt commented Sep 11, 2025

@dakinggg I totally appreciate the situation you're in. I'm happy to maintain this on the PyOBO side, then help write documentation both from PyOBO and SciSpacy sides to help users who want to use the external tooling in combination

@dakinggg
Copy link
Copy Markdown
Contributor

Thanks for understanding, and thanks for your contributions to OSS :)

@cthoyt cthoyt force-pushed the extend-linking-utils branch 2 times, most recently from b442949 to d39f33b Compare September 14, 2025 08:50
@cthoyt cthoyt force-pushed the extend-linking-utils branch from d39f33b to af0fa01 Compare September 14, 2025 08:51
@cthoyt cthoyt changed the title Construct a KnowledgeBase from an arbitrary biomedical ontology using PyOBO Document extending scispaCy with additional ontologies with PyOBO Sep 14, 2025
@cthoyt
Copy link
Copy Markdown
Contributor Author

cthoyt commented Sep 14, 2025

hi @dakinggg. I made a new release of PyOBO based on the code originally in this PR, then reorganized this PR to just be a documentation improvement in the README that gives a short demo and links to further PyOBO docs. I also updated the description and title of the PR to reflect this.

@dakinggg dakinggg merged commit 6c594ef into allenai:main Sep 17, 2025
11 checks passed
@cthoyt cthoyt deleted the extend-linking-utils branch September 20, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entity-linking for other ontologies

2 participants