# Claw Semantic Sim

Semantic Similarity Index for disease research literature using PubMedBERT embeddings

- Repository: https://github.com/ClawBio/ClawBio (1172 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ClawBio/ClawBio --skill claw-semantic-sim -g -a claude-code -y`
Codex: `npx skills add ClawBio/ClawBio --skill claw-semantic-sim -g -a codex -y`
Cursor: `npx skills add ClawBio/ClawBio --skill claw-semantic-sim -g -a cursor -y`
Gemini CLI: `npx skills add ClawBio/ClawBio --skill claw-semantic-sim -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add ClawBio/ClawBio`

## Description

Semantic Similarity Index for disease research literature using PubMedBERT embeddings

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 🦖 Semantic Similarity Index

Measure how isolated or connected disease research is across the global biomedical literature, using PubMedBERT embeddings on PubMed abstracts spanning 175 GBD diseases.

## What it does

1. Takes a disease list (GBD taxonomy) as input
2. Retrieves PubMed abstracts (2000-2025) for each disease with quality filtering
3. Generates 768-dimensional PubMedBERT embeddings for every abstract
4. Computes four semantic equity metrics per disease:
   - **Semantic Isolation Index (SII)**: average cosine distance to k-nearest disease neighbours; higher = more isolated, less connected research
   - **Knowledge Transfer Potential (KTP)**: cross-disease centroid similarity; higher = more potential for research spillover
   - **Research Clustering Coefficient (RCC)**: within-disease embedding variance; higher = more diverse research approaches
   - **Temporal Semantic Drift**: cosine distance between yearly centroids; measures how research focus evolves
5. Generates publication-quality multi-panel figures:
   - **Panel A**: Semantic isolation by disease category (boxplot)
   - **Panel B**: Top 20 most semantically isolated diseases (bar chart, NTD/Global South colour-coded)
   - **Panel C**: Semantic isolation vs research volume (scatter with regression)
   - **Panel D**: NTD vs non-NTD significance test (Welch's t-test, Cohen's d)
6. Produces a markdown report with all metrics, rankings, and reproducibility bundle

## Why this exists

If you ask ChatGPT to "measure research neglect for diseases," it will:
- Not know which embedding model to use for biomedical text
- Hallucinate metrics that sound plausible but have no methodological grounding
- Skip quality filtering (year coverage, abstract coverage, minimum papers)
- Not handle MPS acceleration or checkpointed batch processing
- Produce a single scatter plot with no disease classification

The rest: https://github.com/ClawBio/ClawBio/blob/HEAD/skills/claw-semantic-sim/SKILL.md
