Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybiomedlink-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page