bibform / web-src /index.html
sasakiy84's picture
ブラウザで動くBibformをv2のONNXモデルに更新
29b6f8a verified
Raw History Blame Contribute Delete
2.8 kB
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; worker-src 'self' blob:; connect-src 'self'; object-src 'none'; base-uri 'self'">
<title>Bibform</title>
<link rel="stylesheet" href="style.css">
<script type="module" src="app.js"></script>
</head>
<body>
<main>
<header>
<div>
<h1>Bibform</h1>
<p>引用文をBibLaTeXに変換します。引用文の処理はブラウザ内で完結します。</p>
</div>
<div id="model-control" hidden>
<label for="model">モデル</label>
<select id="model">
<option value="standard">Bibform</option>
<option value="lite">Bibform Lite</option>
</select>
</div>
</header>
<div class="columns">
<section aria-labelledby="source-label">
<form>
<label id="source-label" for="source">引用文</label>
<textarea id="source" required rows="10" spellcheck="false"></textarea>
<select id="example" aria-label="入力例" disabled>
<option value="" disabled selected>入力例を選ぶ</option>
</select>
<div class="actions">
<button id="submit" type="submit" class="primary">解析する</button>
<p id="status" role="status"></p>
</div>
</form>
<section id="choices" hidden aria-label="資料種別">
<div id="candidates" aria-label="上位候補"></div>
<label for="type">資料種別</label>
<select id="type"><option value="">種別を選ぶ</option></select>
</section>
</section>
<section aria-labelledby="output-label">
<label id="output-label" for="output">BibLaTeX</label>
<textarea id="output" readonly rows="10" spellcheck="false"></textarea>
<div class="actions">
<button id="download" type="button" disabled>.bib をダウンロード</button>
</div>
</section>
</div>
<section id="annotation-result" aria-labelledby="annotation-heading" hidden>
<h2 id="annotation-heading">抽出結果</h2>
<p id="annotated-source" dir="auto"></p>
<div class="actions">
<button id="copy-annotation" type="button">XMLでコピー</button>
<p id="copy-status" role="status"></p>
</div>
<div id="copy-fallback" hidden>
<textarea id="copy-text" aria-label="コピー用のXML" rows="4" readonly></textarea>
</div>
</section>
</main>
</body>
</html>