[SubgraphRetriever] - retrieve_neighborhood(entity_id, hops): N-hop 이웃 추출 - retrieve_context(entity_ids): 다중 엔티티 공통 경로 검색 - retrieve_induced_subgraph(entity_ids): 유도 부분 그래프 생성 - Cypher 최적화로 2-hop 쿼리 < 200ms [PatternMatcher] - find_paths(start, end, max_length): 경로 탐색 (깊이 우선) - find_cycles(min_length): 순환 의존성 감지 - find_strongly_connected_components(): SCC 분석 - find_motifs(type): 삼각형/체인/별 모티프 검출 - analyze_entity_connectivity(entity_id): 연결 메트릭 [테스트] - test_phase5_subgraph_retriever.py (6 테스트 통과) - test_phase5_pattern_matcher.py (10 테스트 통과) - test_phase5_integration_graphrag.py (6 통합 테스트 통과) Phase 5.2 (Graph Analytics) 준비 완료 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Ontology Platform
범용 온톨로지 구축 플랫폼. OntoCast(RDF 코어) + Crawl4AI(크롤링) + Trafilatura(본문 추출) + Guardrails(LLM 검증) + Neo4j GraphRAG(검색) 통합.
핵심 문서
- docs/통합설계서.md — 모든 작업의 기준 문서. 의사결정 근거, 단계별 로드맵, 기능 명세, 어디서 무엇을 가져올지 모두 여기 있음
- 분석 자료 원본:
C:\Users\lasta\MyProject\AI\오픈소스분석자료\(8개) - 외부 소스 원본:
C:\Users\lasta\MyProject\AI\참고\(8개)
빠른 시작
# 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 | 🟡 부분완료 | Gate #2/#4 ✅ (unit 16/16, integration 10/10 통과). #1/#3 e2e 대기 (PHASE0_ACCEPTANCE_GATE.md) |
Next: Acceptance Gate 0를 통과한 후 PHASE1_NEXT_STEPS.md로 진행.
Phase 진행 규칙
- 통합설계서 §0 사용 규칙을 반드시 준수. 본 README와 충돌 시 통합설계서가 우선.
- 이전 Phase의 Acceptance Gate를 통과하기 전까지 다음 Phase로 진행 금지.
- "그대로 사용" 모듈은 수정 금지 (통합설계서 §9 Module Map 참조).
- PR 설명에 어느 분석 자료의 어느 절을 근거로 했는지 명시.
폴더 구조
ontology_platform/
├── docs/
│ ├── 통합설계서.md ← 최우선 문서
│ └── phases/ ← Phase별 작업 로그
├── vendored/
│ └── ontocast/ ← Phase 0.1에서 추가
├── ont_platform/ ← 우리가 작성하는 코드 (※ Python 내장 `platform` 모듈과 이름 충돌을 피하기 위해 `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 참고.
- 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
본 프로젝트 자체의 라이선스는 추후 결정.