This commit is contained in:
LASTA_DEV01\lasta
2026-05-13 19:57:34 +09:00
parent 2e9204243d
commit 9e88f4c7ad
4310 changed files with 48538 additions and 905279 deletions

View File

@@ -0,0 +1,90 @@
# Ontology Platform
범용 온톨로지 구축 플랫폼. OntoCast(RDF 코어) + Crawl4AI(크롤링) + Trafilatura(본문 추출) + Guardrails(LLM 검증) + Neo4j GraphRAG(검색) 통합.
## 핵심 문서
- [docs/통합설계서.md](docs/통합설계서.md) — **모든 작업의 기준 문서**. 의사결정 근거, 단계별 로드맵, 기능 명세, 어디서 무엇을 가져올지 모두 여기 있음
- 분석 자료 원본: `C:\Users\lasta\MyProject\AI\오픈소스분석자료\` (8개)
- 외부 소스 원본: `C:\Users\lasta\MyProject\AI\참고\` (8개)
## 빠른 시작
```powershell
# Python 3.12+ 필요
python --version
# 가상환경 (uv 권장)
uv venv
.venv\Scripts\activate
# 의존성 설치 (Phase별로 점진적 활성화)
uv pip install -e ".[dev]"
# Docker 의존 서비스 기동 (Phase별 점진적)
docker compose up -d fuseki postgres redis # Phase 0~3
# docker compose up -d neo4j minio # Phase 4+
```
## 현재 진행 Phase
**Phase 0 — Base 안정화** (코드 작성 완료, 실 환경 검증 대기)
| 단계 | 상태 | 설명 |
|---|---|---|
| 0.1 | ✅ 완료 | OntoCast vendored copy + LICENSE/NOTICE 처리 |
| 0.2 | ✅ 완료 | `select_ontology.py` None 인덱스 버그 수정 + 회귀 테스트 4개 |
| 0.3 | ✅ 완료 | `convert_document.py` 다중 파일 처리 확장 + 회귀 테스트 7개 |
| 0.4 | ✅ 완료 | Robyn → FastAPI 재작성 (`/health`, `/info`, `/process`, `/flush`) |
| 0.5 | ✅ 완료 | Pydantic Settings 정리 (filesystem 모드 강제) + 테스트 5개 |
| 0.6 | ✅ 완료 | 통합 테스트(10개) + E2E 테스트(marker 분리) 작성 |
| 0.7 | ⚠️ 대기 | Acceptance Gate 0 — 실 환경에서 `pytest` 실행 필요 ([PHASE0_ACCEPTANCE_GATE.md](docs/phases/PHASE0_ACCEPTANCE_GATE.md)) |
**Next**: Acceptance Gate 0를 통과한 후 [PHASE1_NEXT_STEPS.md](docs/phases/PHASE1_NEXT_STEPS.md)로 진행.
## Phase 진행 규칙
1. **통합설계서 §0 사용 규칙을 반드시 준수.** 본 README와 충돌 시 통합설계서가 우선.
2. **이전 Phase의 Acceptance Gate를 통과하기 전까지 다음 Phase로 진행 금지.**
3. **"그대로 사용" 모듈은 수정 금지** (통합설계서 §9 Module Map 참조).
4. PR 설명에 어느 분석 자료의 어느 절을 근거로 했는지 명시.
## 폴더 구조
```
ontology_platform/
├── docs/
│ ├── 통합설계서.md ← 최우선 문서
│ └── phases/ ← Phase별 작업 로그
├── vendored/
│ └── ontocast/ ← Phase 0.1에서 추가
├── platform/ ← 우리가 작성하는 코드
│ ├── api/ ← Phase 0.4 (FastAPI)
│ ├── core/
│ │ ├── extractors/ ← Phase 1 (Trafilatura)
│ │ ├── crawler/ ← Phase 2 (Crawl4AI)
│ │ ├── validation/ ← Phase 3 (Guardrails)
│ │ └── projection/ ← Phase 4 (Neo4j GraphRAG)
│ ├── workflow/ ← Phase 5 (LangGraph 노드)
│ ├── models/ ← Pydantic 모델
│ ├── storage/ ← Fuseki/Neo4j/Postgres 클라이언트
│ └── config.py
├── tests/{unit,integration,e2e}/
├── scripts/ ← DB 마이그레이션, 초기화
├── pyproject.toml
├── docker-compose.yml ← Phase 0.4 작업 시 생성
├── .env.example
└── NOTICE ← Third-party license 고지
```
## 라이선스
본 프로젝트는 다음 Apache 2.0 라이선스 컴포넌트를 통합한다. 자세한 내용은 [NOTICE](NOTICE) 참고.
- OntoCast (Apache 2.0) — vendored
- Crawl4AI (Apache 2.0) — pip dependency
- Trafilatura (Apache 2.0) — pip dependency
- Guardrails (Apache 2.0) — pip dependency
- Neo4j GraphRAG (Apache 2.0) — pip dependency
본 프로젝트 자체의 라이선스는 추후 결정.