A browser extension that extracts text from South Korean public agency electronic documents and uses an LLM to summarize, extract deadlines, action items, and review approval readiness in one click.

Stars

7

7-day growth

No data

Forks

2

Open issues

0

License

MIT

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It solves a real pain point for public officials who receive dozens of official documents daily, offering instant, actionable summaries with a local-only mode for sensitive documents, and cleverly extracts text from the web-based Hangeul viewer that normally prevents standard DOM scraping.

Who it is for

  • Public officials handling large volumes of official documents (gongmun)
  • Administrative staff in South Korean government agencies and public institutions
  • Developers looking to integrate LLM summarization with legacy document systems using web Hangeul
  • Security-conscious users who need offline AI processing for sensitive documents

Use cases

  • Quickly understanding the core content, required action, and deadline from a newly received official document
  • Pre-approval review of a document to detect incomplete parts, contradictions, or missing items before signing
  • Enabling non-technical staff to get instant bullet-point summaries without leaving the document viewer
  • Automating the logging of document metadata and action items for personal tracking

Strengths

  • Fully local LLM support via Ollama, keeping sensitive documents on-device
  • Real-time streaming of results with SSE, even slow local models feel responsive
  • Multi‑layer text extraction pipeline that handles web Hangeul viewer, iframes, and manual fallback
  • Easy setup with a one‑click PowerShell script for local LLM and automatic model discovery in options

Considerations

  • Currently tailored to South Korean public document systems (e.g., cseoul.go.kr) and web Hangeul; may not work with all document types
  • Local LLM performance depends on VRAM; recommended models require 8 GB+ and may be slow on entry-level hardware
  • Gemini mode sends document content to Google servers, so not suitable for classified or highly sensitive materials

README quick start

전자문서 AI 요약 — Edge 확장

공공기관 전자문서(공문) 열람 화면에서 본문을 추출해 LLM으로 요약·검토하는 브라우저 확장입니다. 클릭 한 번이면 문서 종류 · 조치 필요 여부 · 기한(D-day) · 핵심 내용 · 조치사항 · 주의점이 위젯 패널로 정리됩니다. 하루 수십 건 공문을 접수하는 담당자가 "이 문서로 내가 뭘 언제까지 해야 하는가"를 10초 안에 파악하는 것이 목표입니다.

  • 완전 로컬 동작 지원 — Ollama 연동 시 문서가 PC 밖으로 나가지 않음 (Gemini API도 선택 가능)
  • SSE 스트리밍 — 응답이 생성되는 대로 카드가 실시간으로 채워짐 (느린 로컬 LLM도 체감 대기 최소화)
  • 서울시 전자문서(cseoul.go.kr) 문서관리카드 + 한컴 웹한글 기안기 실측 기반
  • UI는 KRDS(대한민국 정부 디자인시스템) 컬러 토큰 기반

미리보기

아래 그림은 실제 UI를 재현한 기능 소개 목업입니다 (문서 내용은 예시).

📄 원클릭 AI 요약 — 화면 위 오버레이

문서 화면 위에 바로 뜨는 요약 패널. 문서 종류·조치 필요 뱃지, D-day 계산, 라벨링된 핵심 내용, 조치사항 체크리스트, ※ 주의 문구까지 한 화면에 정리됩니다.

🔍 결재 전 AI 검토

같은 패널에서 검토 버튼 하나로 전환. 결재 가능 여부를 4단계로 판정하고 잘된 점·보완점·결재 전 확인사항을 원문 근거로만 짚어줍니다.

⚙ LLM 연결은 설정 한 페이지로

설치된 로컬 모델 자동 조회(/v1/models), 연결 테스트 버튼으로 저장 전에 왕복 확인.

동작 방식

공문 본문은 일반 웹페이지처럼 DOM에 있지 않습니다. 서울시 전자문서의 경우 본문이 한컴 웹한글 뷰어(캔버스 렌더링) 안에 있어서, 4단계 추출 파이프라인으로 접근합니다.

순위방법비고
1사용자가 드래그 선택한 텍스트추출이 이상할 때 수동 폴백
2문서관리카드 DOM(SITE_RULES) + 웹한글 HwpCtrl.GetTextFile API한컴 공식 API — 캔버스 렌더링이어도 본문 추출
3전체 프레임 중 최장 텍스트 프레임범용 사이트 폴백
4붙여넣기 입력창전부 실패 시

2단계의 웹한글 API 프로브는 GetTextFile(콜백/동기 반환 모두 수용)이 실패하면 InitScan → GetText 청크 루프로 폴백하고, executeScript가 못 들어가는 about:blank 프레임은 부모에서 iframe contentWindow를 직접 조회해 커버합니다.

카드 메타([문서관리카드 정보])와 공문 본문([공문 본문])을 병합해 LLM에 전달하고, 구조화된 JSON(서지정보·핵심내용·조치·주의)으로 받아 렌더링합니다. 응답은 SSE 스트리밍으로 받아 미완성 JSON을 부분 파싱해 실시간으로 그리며, 유휴 30초/전체 2분 이중 타임아웃으로 멈춘 스트림을 끝없이 기다리지 않습니다.

설치

  1. 이 레포를 클론(또는 ZIP 다운로드)
  2. Edge에서 edge://extensions개발자 모드 켜기 → 압축을 풀어서 로드 → 레포 폴더 선택 (Chrome도 동일하게 동작합니다)
  3. LLM 연결 — 둘 중 하나:

A. 로컬 LLM (권장 — 문서가 밖으로 안 나감)

powershell -ExecutionPolicy Bypass -File scripts\setup-local-llm.ps1

Ollama 설치 확인(없으면 winget 설치) → 확장 접근 허용(OLLAMA_ORIGINS) → 모델 다운로드 → 검증까지 자동으로 처리합니다. 끝나면 확장 옵션에서 프로바이더를 내부 LLM으로 바꾸고 드롭다운에서 모델만 고르면 됩니다 (Base URL 비워두면 localhost:11434).

B. Gemini API (빠름 — 단, 본문이 Google로 전송됨)

확장 아이콘 우클릭 → 확장 옵션 → aistudio.google.com/apikey에서 발급한 키 입력. 비공개·민감 문서에는 사용하지 마세요.

사용

  • 전자문서 화면 우측의 ✨ 플로팅 버튼 클릭 (드래그로 위치 이동, 위치 기억됨)
  • 또는 아무 데나 우클릭 → "📄 이 문서 AI 요약" / "🔍 이 문서 AI 검토 (결재 전)" — 전자문서가 툴바 없는 팝업창으로 열려도 동작
  • 패널 헤더의 요약 ↔ 검토 버튼으로 모드 전환 —

Description

전자문서 AI 요약 Edge 확장 — 서울시 전자문서 본문 추출 + LLM 요약 위젯 (KRDS UI)

Related repositories

Similar projects matched by category, topics, and programming language.

slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
jamesob
Featured
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI & Machine LearningLarge Language Models
1,660
makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958