Skip to content

karans4/citesource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

citesource

Highlight any sentence on any webpage, get instant academic sources.

Chrome extension that extracts claims from selected text, searches academic APIs in parallel, and shows a context card with ranked sources, counter-arguments, and confidence scoring. Like macOS dictionary lookup, but for facts.

How it works

  1. Select text on any page
  2. Extension extracts citable claims (heuristic NLP, no LLM needed)
  3. Searches Semantic Scholar, CrossRef, and Google Books in parallel
  4. Scores sources by citation impact, venue prestige, recency, open access
  5. Shows a context card near your selection with ranked results

Install

  1. Open chrome://extensions in Chrome/Chromium
  2. Enable "Developer mode"
  3. Click "Load unpacked" → select the extension/ folder

Architecture

citesource/
├── core/                    # Shared JS modules (extension + future web app)
│   ├── types.js             # Source, Claim, ContextCard constructors
│   ├── scoring.js           # 6-component quality score
│   ├── dedup.js             # DOI/title deduplication
│   ├── claim-extractor.js   # Heuristic claim extraction
│   └── source-search.js     # S2, CrossRef, Google Books
├── extension/               # Chrome extension (MV3)
│   ├── manifest.json
│   ├── background.js        # Service worker (orchestration, all logic inlined)
│   ├── content.js           # Text selection detection + card injection
│   ├── card/                # Context card UI (iframe)
│   ├── popup/               # Extension popup (on/off toggle)
│   └── icons/
├── citesource.py            # CLI tool (Python, original v1)
└── web.py                   # Web UI (Python, original v1)

The extension's background.js is self-contained (inlines all core logic) because Chrome MV3 service workers can't import from outside the extension directory. The core/ modules are the canonical source, shared with the future web app.

Scoring

Sources are ranked by a composite quality score:

  • Citation impact — log2-scaled, capped at 50pts
  • Influential citations — weighted 8x, capped at 40pts
  • Venue prestige — Nature/Science/NEJM tier (+25), PLOS/IEEE tier (+15)
  • Recency — last 2 years (+10), classics with 500+ cites (+15)
  • Open access — +5pts
  • Source type — books (+12), papers (+10), articles (+6)

Roadmap

  • compromise.js for better NLP (NER, noun phrase extraction)
  • WebLLM for optional high-quality claim extraction
  • Google search scraping (extension CORS bypass)
  • Gov data APIs (FRED, WHO, CDC)
  • Web app with Claude backend, auth, billing

About

Highlight any sentence, get instant academic sources. Chrome extension.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors