Downloads · 30 days
1
3% of all-time downloads
regel-corpus/biosyn-sapbert-regel-bto
biosyn-sapbert-regel-bto is a machine learning model from regel-corpus. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for flair.
Biomedical Entity Mention Linking for TISSUES (Brenda Tissue Ontology):
Downloads · 30 days
1
3% of all-time downloads
All-time downloads
29
Public
Repo size
496 MB
Likes
0
Public
Click a slice to open those files.
.bin496 MB · 100%
From the Hugging Face model README
Biomedical Entity Mention Linking for TISSUES (Brenda Tissue Ontology):
Requires:
pip install flair or pip install git+https://github.com/flairNLP/flair.git)from flair.data import Sentence
from flair.models import Classifier, EntityMentionLinker
from flair.tokenization import SciSpacyTokenizer
sentence = Sentence(
"TNF-like factor that is both produced by osteoblasts, mesenchymal cells, ",
"and activated T cells and required for osteoclast maturation and survival."
use_tokenizer=SciSpacyTokenizer()
)
# load hunflair to detect the entity mentions we want to link.
tagger = Classifier.load("regel-corpus/hunflair2-regel-tissue")
tagger.predict(sentence)
# load the linker and dictionary
linker = EntityMentionLinker.load("regel-corpus/biosyn-sapbert-regel-bto")
linker.predict(sentence)
# print the results for each entity mention:
for span in sentence.get_spans(tagger.label_type):
for link in span.get_labels(linker.label_type):
print(f"{span.text} -> {link.value}")