pyBioMedLink for Bio-Medical Term Linking.
Project description
pyBioMedLink
pyBioMedLink is an open-source python library for bio-medical term linking.
Usage
from pybiomedlink.linker import BM25Linker
corpus = [
"Hello there good man!",
"It is quite windy in London",
"How is the weather today?"
]
query = "windy London"
bm25_linker = BM25Linker(corpus)
top_k = 2
predictions = bm25_linker.predict(query, top_k)
print(f"Predictions for query '{query}': {predictions}")
# ['It is quite windy in London', 'How is the weather today?']
pred_score_results = bm25_linker.predict_with_scores(query, top_k)
print(f"Predictions with scores for query '{query}': {pred_score_results}")
# {'labels': ['It is quite windy in London', 'How is the weather today?', 'Hello there good man!'], 'scores': [0.9372947225064051, 0.0, 0.0]}
Supported Models
Zero-shot models:
- BM25Linker: A BM25-based linker
- LevenshteinLinker: A Levenshtein distance-based linker
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybiomedlink-0.1.0.tar.gz
(10.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybiomedlink-0.1.0.tar.gz.
File metadata
- Download URL: pybiomedlink-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb2bc27e17fb5b72603ec46b15532dabb2667fd36cb0981715de89ec5068b67b
|
|
| MD5 |
c69d9b5fed60e8cd6f895054fe895f2c
|
|
| BLAKE2b-256 |
2d9f3eafb96c3a20e957d193d51a72d1909381357a11e799a38b82a0994dfe9c
|
File details
Details for the file pybiomedlink-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pybiomedlink-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ad8ac66f8de7399881b085bcd0bf17179c0593700f3cce26efc09da0a84631
|
|
| MD5 |
322db82d8e9cc9f58b441ede42ca54bb
|
|
| BLAKE2b-256 |
e617223e370d59169f603e55d87ac22251cd09721bacaf928fb3c1840d8163a7
|