Chrome Extension

LCSH Chrome Extension

Get Library of Congress Subject Heading recommendations directly in your browser. Powered by Google Gemini with real-time LOC validation and MARC record generation.

Key Features

Gemini-Powered AI

Uses Google Gemini 2.5 Flash with multimodal capabilities to analyze both text and images for comprehensive subject analysis.

LOC Validation

Automatically scrapes id.loc.gov in background tabs to validate every AI suggestion against the official LCSH database.

📊

Similarity Scoring

Levenshtein distance algorithm calculates match quality from 0–100%. Color-coded indicators (green/amber/red) show quality at a glance.

📋

MARC Record Generation

Second-pass Gemini inference generates accurate MARC field 650 records with proper indicators and subfields for high-scoring terms.

🖼️

Image Upload

Upload PNG and JPEG images of book covers, title pages, or other materials. Images are processed by Gemini and never stored on any server.

💾

History & Export

Save complete cataloging sessions to local storage. Export as CSV with all metadata including MARC records and similarity scores.

How It Works

The extension follows a 5-step wizard workflow.

1

Enter Bibliographic Information

Input the title, author, abstract, table of contents, and notes. Optionally upload images of book covers or title pages (PNG/JPEG).

2

Generate Initial Suggestions

The Gemini API analyzes your content (text + images) and proposes LCSH terms with a subject analysis narrative and special considerations.

3

Review Scraped Results

The extension validates each suggestion against id.loc.gov by opening background tabs. Best LOC matches are identified with similarity scores.

4

Final Recommendations

Terms are sorted by similarity score (highest first). Each includes a MARC record, direct LOC link, and AI justification. Only terms above 30% similarity are shown.

5

Save & Export

Browse and manage past sessions. Export recommendations as CSV with all metadata. Copy individual or all MARC records to clipboard.

Installation

Chrome Web Store

The easiest way to install — one click from the Chrome Web Store:

Add to Chrome

Development Mode

For developers who want to build from source:

  1. Clone the repository and cd into it
  2. Install dependencies: npm install
  3. Build the extension: npm run build
  4. Open Chrome and navigate to chrome://extensions/
  5. Enable "Developer mode" in the top right corner
  6. Click "Load unpacked" and select the dist directory

Usage

  1. Click on the extension icon in your Chrome toolbar
  2. Enter your Gemini API key (get one from Google AI Studio)
  3. Click "Launch LCSH Tool" to open the main application
  4. Enter bibliographic information about the work you want to catalog
  5. Optionally upload images (PNG and JPEG)
  6. Follow the step-by-step process to generate and validate LCSH recommendations
  7. Review similarity scores to evaluate recommendation quality
  8. View MARC records for high-scoring terms (above 30% similarity)
  9. Export or copy the final recommendations for your cataloging system

Image Upload

Similarity Scoring

  • Each suggested term is compared to LOC results using Levenshtein distance
  • Scores range from 0% (no match) to 100% (exact match)
  • Visual indicators: green for excellent, amber for moderate, red for poor
  • An overall validation score is calculated for the entire set of recommendations
  • Only terms above 30% similarity appear in final recommendations
  • Results are sorted by similarity score in descending order

Best LOC Match

The extension uses the best matches from the Library of Congress database as final recommendations:

Technologies

ReactMaterial UIChrome Extension APIGemini 2.5 Flash APIReact MarkdownWebpack