🔍

문서 구조화 추출 API 비교 — Azure, Google, AWS 각각 뭘 제공하나

Azure prebuilt-contract 같은 \"문서를 이해하는 API\"가 Google과 AWS에도 있나?

3사 비교: "단순 OCR" vs "문서 이해" 모델

3사 모두 두 종류의 API를 제공한다:

단순 OCR:   이미지 → 텍스트 (구조화 없음)
문서 이해:  이미지 → 필드별 JSON (구조화 추출)

제공사 단순 OCR 문서 이해
Azure prebuilt-read prebuilt-receipt, prebuilt-contract 등 15+
Google Cloud Vision API Document AI Processors
AWS Textract DetectDocumentText Textract AnalyzeDocument, AnalyzeExpense, AnalyzeLending

Azure Document Intelligence — 전용 모델 최다

15개 이상의 문서 타입별 전용 모델:

모델 추출 필드 일본어
prebuilt-receipt 가게명, 날짜, 품목, 금액
prebuilt-invoice 공급자, 청구일, 세금, 품목
prebuilt-contract 당사자, 관할권, 계약 ID ❌ 영어만
prebuilt-idDocument 이름, 생년월일, 문서번호
prebuilt-creditCard 카드번호, 만료일
prebuilt-bankStatement 계좌번호, 거래 내역 ❌ 영어만
prebuilt-tax.us.w2 고용주, 급여, 세금 ❌ 영어만
... 총 15개+

커스텀 모델: Azure Portal에서 5장만 라벨링하면 내 양식 전용 모델 훈련 가능.

# 모델명만 바꾸면 다른 구조화 결과
client.begin_analyze_document("prebuilt-receipt", body=f)    # 영수증
client.begin_analyze_document("prebuilt-contract", body=f)   # 계약서
client.begin_analyze_document("my-custom-model", body=f)     # 내 양식

Google Document AI — 커스텀 프로세서 강함

전용 프로세서 (Processor):

프로세서 추출 필드 일본어
Invoice Parser 공급자, 날짜, 금액, 품목
Expense Parser 영수증, 경비 품목
Identity Document Parser 여권, 면허증
Contract Parser 당사자, 조항 ❌ 영어만
W-2 / 1099 Parser 미국 세금 양식 ❌ 영어만
Lending Document Parser 대출 문서 ❌ 영어만

강점: Custom Document Extractor

Google은 커스텀 프로세서 훈련이 강하다. 웹 UI에서 라벨링하고, foundation model 기반으로 적은 데이터로도 높은 정확도.

from google.cloud import documentai

client = documentai.DocumentProcessorServiceClient()
result = client.process_document(request={
    "name": "projects/my-project/locations/us/processors/invoice-processor-id",
    "raw_document": {"content": file_bytes, "mime_type": "application/pdf"}
})

for entity in result.document.entities:
    print(f"{entity.type_}: {entity.mention_text}")
# → supplier_name: スターバックス
# → total_amount: ¥550

AWS Textract — 표 추출 특화

전용 API:

API 용도 일본어
AnalyzeDocument (TABLES) 표 구조 추출
AnalyzeDocument (FORMS) 키-값 쌍 추출
AnalyzeExpense 영수증/인보이스
AnalyzeLending 대출/모기지 문서 ❌ 영어만
AnalyzeID 신분증

Azure/Google처럼 "계약서 전용"은 없다. 대신 표 추출이 3사 중 가장 강하다.

import boto3

client = boto3.client("textract")

# 표 추출
response = client.analyze_document(
    Document={"Bytes": file_bytes},
    FeatureTypes=["TABLES", "FORMS"]
)

# 영수증 구조화
response = client.analyze_expense(
    Document={"Bytes": file_bytes}
)
for doc in response["ExpenseDocuments"]:
    for field in doc["SummaryFields"]:
        print(f"{field['Type']['Text']}: {field['ValueDetection']['Text']}")
# → VENDOR_NAME: スターバックス
# → TOTAL: ¥550

3사 종합 비교

항목 Azure Google AWS
전용 모델 수 15+ (최다) ~10 ~5
계약서 전용 ✅ prebuilt-contract ✅ Contract Parser ❌ 없음
영수증 전용 ✅ prebuilt-receipt ✅ Expense Parser ✅ AnalyzeExpense
신분증 전용 ✅ prebuilt-idDocument ✅ ID Parser ✅ AnalyzeID
표 추출 ✅ prebuilt-layout (최강)
커스텀 모델 ✅ (5장~) (최강, foundation model) △ (제한적)
일본어 계약서 ❌ (prebuilt-contract) ❌ (Contract Parser) ❌ (없음)
일본어 영수증
가격 (구조화, 1K) ~$10 ~$10~30 ~$15
무료 티어 500p/월 1,000p/월 1,000p/3개월

일본어 계약서라면?

3사 모두 일본어 "계약서 전용" 모델은 없다. 영수증과 신분증은 일본어 지원이 있지만, 계약서 구조화는 영어만.

현실적인 선택지:

방법 1: prebuilt-layout/read ($1.50/1K) → LLM으로 구조화 ($$$)
        → 현재 tokium이 쓰는 방식. 유연하지만 LLM 비용 발생

방법 2: Azure 커스텀 모델 → 5장 라벨링으로 내 양식 훈련 ($10/1K)
        → 반복되는 양식이면 효율적. LLM 불필요

방법 3: Google Custom Document Extractor → foundation model 기반 ($$$)
        → 적은 데이터로 높은 정확도. 근데 비쌈

방법 4: PaddleOCR/Sarashina2.2 (셀프호스팅) → LLM으로 구조화
        → OCR 비용 $0. 기밀 문서 OK. GPU 필요

선택 가이드

상황 추천
영어 계약서 Azure prebuilt-contract (바로 구조화)
일본어 계약서 + LLM OK Azure prebuilt-layout + LLM
일본어 계약서 + LLM 비용 줄이고 싶음 Azure 커스텀 모델 (5장 라벨링)
영수증/인보이스 (다국어) Azure prebuilt-receipt 또는 AWS AnalyzeExpense
커스텀 양식 (적은 데이터) Google Custom Document Extractor
표 추출이 핵심 AWS Textract (표 최강)
기밀 문서 (외부 전송 불가) PaddleOCR + LLM (셀프호스팅)

핵심 개념

1

Azure — 전용 모델 15개로 최다. prebuilt-contract 등. 커스텀 모델도 5장부터

2

Google Document AI — 커스텀 프로세서가 강점. Foundation model 기반 적은 데이터로 고정밀

3

AWS Textract — 표 추출 3사 중 최강. 계약서 전용은 없음

4

일본어 계약서 전용 모델은 3사 모두 없다 — prebuilt-layout + LLM이 현실적

사용 사례

API 선정 — 자기 문서 타입에 맞는 전용 모델이 있는지 3사 비교 비용 최적화 — 단순 OCR($1.50) vs 구조화($10) vs LLM 조합의 총비용 비교 일본어 계약서 파이프라인 — 전용 모델이 없는 상황에서의 최적 아키텍처 설계