282 lines
10 KiB
HTML
282 lines
10 KiB
HTML
<!doctype html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Ontology Crawler Platform</title>
|
|
<link rel="stylesheet" href="/static/styles.css" />
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div>
|
|
<h1>Ontology Crawler</h1>
|
|
<p>Project crawler, ontology mapping, claim review, and recommendation tags</p>
|
|
</div>
|
|
<button id="refreshBtn" class="icon-button" title="Refresh" aria-label="Refresh">R</button>
|
|
</header>
|
|
|
|
<main class="layout">
|
|
<aside class="sidebar">
|
|
<section class="panel">
|
|
<div class="panel-head">
|
|
<h2>Projects</h2>
|
|
</div>
|
|
<div class="field-row">
|
|
<input id="configPath" value="configs/perfume_subscription.yaml" aria-label="Config path" />
|
|
<button id="createProjectBtn" title="Create project">+</button>
|
|
</div>
|
|
<button id="initProjectBtn" class="full">Reset current project data</button>
|
|
<div id="projectList" class="list"></div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<div class="panel-head">
|
|
<h2>Crawl</h2>
|
|
</div>
|
|
<label>
|
|
Source
|
|
<select id="sourceSelect"></select>
|
|
</label>
|
|
<label>
|
|
URL / Seed URL
|
|
<input id="crawlUrl" value="tests/fixtures/sample_perfume.html" />
|
|
</label>
|
|
<label>
|
|
Analyzer
|
|
<select id="extractorProvider">
|
|
<option value="rule_based">Rule-based</option>
|
|
<option value="openai">OpenAI API</option>
|
|
<option value="ollama">Ollama</option>
|
|
<option value="lm_studio" selected>LM Studio</option>
|
|
</select>
|
|
</label>
|
|
<div class="extractor-options" id="extractorOptions">
|
|
<label>
|
|
Model
|
|
<input id="extractorModel" placeholder="local or API model" />
|
|
</label>
|
|
<label>
|
|
Base URL
|
|
<input id="extractorBaseUrl" value="http://localhost:1234/v1" placeholder="optional provider endpoint" />
|
|
</label>
|
|
<button id="testExtractorBtn">Test analyzer</button>
|
|
</div>
|
|
<div class="button-grid">
|
|
<button id="discoverBtn">Discover links</button>
|
|
<button id="crawlBtn" class="primary">Crawl URL</button>
|
|
</div>
|
|
<div class="site-controls">
|
|
<label>
|
|
Max depth
|
|
<input id="siteMaxDepth" type="number" min="0" max="5" value="2" />
|
|
</label>
|
|
<label>
|
|
Max pages
|
|
<input id="siteMaxPages" type="number" min="1" max="500" value="25" />
|
|
</label>
|
|
<label class="check-row">
|
|
<input id="sameDomainOnly" type="checkbox" checked />
|
|
Same domain
|
|
</label>
|
|
</div>
|
|
<button id="siteCrawlBtn" class="primary full">Crawl site from seed</button>
|
|
<button id="stopSiteCrawlBtn" class="full" disabled>Stop current crawl</button>
|
|
<div id="crawlResult" class="mini-log"></div>
|
|
<div id="discoveredLinks" class="discovered-links"></div>
|
|
</section>
|
|
</aside>
|
|
|
|
<section class="workspace">
|
|
<nav class="tabs" aria-label="Admin sections">
|
|
<button class="tab active" data-tab="overview">Overview</button>
|
|
<button class="tab" data-tab="ontology">Ontology</button>
|
|
<button class="tab" data-tab="entities">Entities</button>
|
|
<button class="tab" data-tab="claims">Claims</button>
|
|
<button class="tab" data-tab="debug">Debug</button>
|
|
<button class="tab" data-tab="research">Research</button>
|
|
<button class="tab" data-tab="tags">Tags</button>
|
|
<button class="tab" data-tab="recommend">Recommend</button>
|
|
</nav>
|
|
|
|
<section id="overview" class="tab-panel active">
|
|
<div class="summary-grid">
|
|
<div class="metric">
|
|
<span>Project</span>
|
|
<strong id="metricProject">-</strong>
|
|
</div>
|
|
<div class="metric">
|
|
<span>Domain</span>
|
|
<strong id="metricDomain">-</strong>
|
|
</div>
|
|
<div class="metric">
|
|
<span>Sources</span>
|
|
<strong id="metricSources">0</strong>
|
|
</div>
|
|
<div class="metric">
|
|
<span>Entities</span>
|
|
<strong id="metricEntities">0</strong>
|
|
</div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Sources</h2>
|
|
<div id="sourceTable" class="table"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="ontology" class="tab-panel">
|
|
<div class="toolbar">
|
|
<button id="loadOntologyRegistryBtn">Refresh registry</button>
|
|
</div>
|
|
<div class="split">
|
|
<div class="wide-panel">
|
|
<h2>Configured Entity Types</h2>
|
|
<div id="ontologyEntities" class="chips"></div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Configured Predicates</h2>
|
|
<div id="ontologyPredicates" class="chips"></div>
|
|
</div>
|
|
</div>
|
|
<div class="split">
|
|
<div class="wide-panel">
|
|
<h2>Registry Entity Types</h2>
|
|
<div id="ontologyRegistryEntityTable" class="table"></div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Registry Relation Types</h2>
|
|
<div id="ontologyRegistryRelationTable" class="table"></div>
|
|
</div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Ontology Triples</h2>
|
|
<div id="ontologyTripleTable" class="table"></div>
|
|
</div>
|
|
<div class="split">
|
|
<div class="wide-panel">
|
|
<h2>Schema Proposals</h2>
|
|
<div id="ontologyProposalTable" class="table"></div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Knowledge Gaps</h2>
|
|
<div id="knowledgeGapTable" class="table"></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="entities" class="tab-panel">
|
|
<div class="toolbar wrap">
|
|
<select id="entityTypeFilter"></select>
|
|
<button id="loadEntitiesBtn">Load</button>
|
|
</div>
|
|
<div class="merge-bar">
|
|
<input id="mergeSourceId" placeholder="Entity ID to merge" aria-label="source entity id" />
|
|
<input id="mergeTargetId" placeholder="Entity ID to keep" aria-label="target entity id" />
|
|
<button id="mergeEntitiesBtn">Merge</button>
|
|
</div>
|
|
<div id="entityTable" class="table"></div>
|
|
</section>
|
|
|
|
<section id="claims" class="tab-panel">
|
|
<div class="toolbar">
|
|
<label class="check-row">
|
|
<input id="showCandidateClaims" type="checkbox" />
|
|
Show candidates
|
|
</label>
|
|
<button id="loadClaimsBtn">Refresh claims</button>
|
|
</div>
|
|
<div id="claimTable" class="claim-list"></div>
|
|
</section>
|
|
|
|
<section id="debug" class="tab-panel">
|
|
<div class="toolbar">
|
|
<button id="loadExtractionLogsBtn">Refresh extraction logs</button>
|
|
</div>
|
|
<div id="extractionLogTable" class="claim-list"></div>
|
|
</section>
|
|
|
|
<section id="research" class="tab-panel">
|
|
<div class="wide-panel">
|
|
<h2>Semantic Exploration</h2>
|
|
<div class="recommend-grid">
|
|
<label>
|
|
Goal
|
|
<input id="researchGoal" value="Forment perfume ecosystem exploration" />
|
|
</label>
|
|
<label>
|
|
Seed entity ID
|
|
<input id="researchSeedEntityId" placeholder="optional entity id" />
|
|
</label>
|
|
<label>
|
|
Max steps
|
|
<input id="researchMaxSteps" type="number" min="1" max="50" value="8" />
|
|
</label>
|
|
<label>
|
|
Min relevance
|
|
<input id="researchMinRelevance" type="number" min="0" max="1" step="0.05" value="0.35" />
|
|
</label>
|
|
</div>
|
|
<div class="button-grid">
|
|
<button id="runResearchBtn" class="primary">Run graph research</button>
|
|
<button id="loadResearchBtn">Load sessions</button>
|
|
</div>
|
|
<div id="researchResult" class="mini-log"></div>
|
|
<div id="researchSessions" class="claim-list"></div>
|
|
</div>
|
|
<div class="wide-panel">
|
|
<h2>Graph Query</h2>
|
|
<div class="toolbar wrap">
|
|
<select id="graphQueryKind">
|
|
<option value="trend_summary">Trend summary</option>
|
|
<option value="brand_products">Brand products</option>
|
|
<option value="products_by_tag">Products by tag</option>
|
|
<option value="relation_summary">Relation summary</option>
|
|
<option value="entity_type_summary">Entity type summary</option>
|
|
</select>
|
|
<input id="graphQueryText" placeholder="brand or tag filter" />
|
|
<button id="loadGraphQueryBtn">Run query</button>
|
|
</div>
|
|
<div id="graphQueryTable" class="table"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="tags" class="tab-panel">
|
|
<div class="toolbar">
|
|
<button id="loadTagsBtn">Load tags</button>
|
|
</div>
|
|
<div id="tagTable" class="table"></div>
|
|
</section>
|
|
|
|
<section id="recommend" class="tab-panel">
|
|
<div class="recommend-grid">
|
|
<label>
|
|
Preferred notes
|
|
<input id="preferredNotes" value="Bergamot, Musk" />
|
|
</label>
|
|
<label>
|
|
Avoided notes
|
|
<input id="avoidedNotes" value="" />
|
|
</label>
|
|
<label>
|
|
Preferred moods
|
|
<input id="preferredMoods" value="Fresh" />
|
|
</label>
|
|
<label>
|
|
Season
|
|
<input id="seasonContext" value="Summer" />
|
|
</label>
|
|
<label>
|
|
Occasion
|
|
<input id="occasionContext" value="Daily" />
|
|
</label>
|
|
</div>
|
|
<button id="recommendBtn" class="primary">Test recommendation</button>
|
|
<div id="recommendTable" class="table"></div>
|
|
</section>
|
|
</section>
|
|
</main>
|
|
|
|
<div id="toast" role="status" aria-live="polite"></div>
|
|
<script src="/static/app.js"></script>
|
|
</body>
|
|
</html>
|