From bc23a0e8fd1ca99c6b4621a7196c5c0e103ccf55 Mon Sep 17 00:00:00 2001 From: Bent Date: Tue, 25 Jun 2024 17:17:08 +0200 Subject: [PATCH] added proper demo for js bindings --- bindings/wasm/package-demo/index.html | 42 +++++++++-- bindings/wasm/package-demo/public/logo.png | Bin 0 -> 40067 bytes bindings/wasm/package-demo/src/index.ts | 69 +++++++++++++++++ bindings/wasm/package-demo/src/main.ts | 27 ------- bindings/wasm/package-demo/src/style.css | 82 +++++++++++++++++++-- bindings/wasm/package-demo/src/worker.ts | 50 +++++++++++++ bindings/wasm/package/src/kiwi-builder.ts | 8 ++ 7 files changed, 235 insertions(+), 43 deletions(-) create mode 100644 bindings/wasm/package-demo/public/logo.png create mode 100644 bindings/wasm/package-demo/src/index.ts delete mode 100644 bindings/wasm/package-demo/src/main.ts create mode 100644 bindings/wasm/package-demo/src/worker.ts diff --git a/bindings/wasm/package-demo/index.html b/bindings/wasm/package-demo/index.html index 15e87867..3bfa88cf 100644 --- a/bindings/wasm/package-demo/index.html +++ b/bindings/wasm/package-demo/index.html @@ -3,17 +3,43 @@ - Vite + TS + + Kiwi Demo + + + + + + + + + -

KiwiBuilder/Kiwi Test Page

+
+ +
Loading...
+
-

Usage

-

Open the browser console to interact with KiwiBuilder

-

The default model files are available as modelFiles

-

To get started with a Kiwi instance use the following:

-

kiwi = await builder.build({ modelFiles })

+ - + + + + + + + + + + diff --git a/bindings/wasm/package-demo/public/logo.png b/bindings/wasm/package-demo/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5ece141134c14cb6e3f9493c0c2c6644a3e50c94 GIT binary patch literal 40067 zcmXt9cQ~8x*Qbb0?1&lEE>W>JF>CKqYR{@st6H1bYExTmYOB3xt2JWQo>jA|wQ9c6 z@9+J?BMQLj)6BB?5FfcHPRaM}+7#LW@7#I(@@c`&g>|{z7(7!NW z=_<=(&VS|&ME`;Brt zq9e~&&hLKStkSU{EI|m%Cd#|N>BIJePD-Y+Umf?q-))YkYn|A=10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&Z)!$3_PUd=XS2F90ZKGel{LFfkl?BgJHTA z){0*|pF^H|2M0~RY=u9v1hNW0P17K=v6XdMzOvllbH82+wp?3ttf7~@n0}$vh zA?egO8ek*DS4gA`59oW0v17h6HQMFC^WpNy#65_ms-8&G7wNkaQ+O2oLAKySF7=M@ zuKy=o-`T*&+%XvH{+Xq=0pQ`;u(NAVAgx1_WlsZ$r?S#E*Rug7pedimJWuLvnvwuD zAA9c8t{g*9j#SV+dv8pPAyLXROH`6{=$n)&4kvQ*>reLoTr%vdx6Vd zTG66M?jh2ulz|3zZOpP~d?oZsejn@?dbE(uD=rcbB7TE?;a9W&jVn3-f1luA9wH!4 zqBD53qvpc$z|Hg75)kfc%?<1#Xc#`kDNw$|c!ytE`ruaj@5fnP^$n%<%eg-xj)3s_ z*WUzmCn!^k;n#pN$9P{dW!ngGc4zN?)&&_Efj9)Rfrn%Lf7UGicPt2LF|!ViZH0M$ zaN9Y!t)zFzx2hR`xV8Xj&&AAIt9HIz(E``VG5bIc`|A`zvJ?N$+M?iz6XKOMM%(^@ kqib&cjb;nP+2S2Tq}LOLEP`$@>~@=;w>(#k_4wm|0Q?{a@Bjb+ literal 0 HcmV?d00001 diff --git a/bindings/wasm/package-demo/src/index.ts b/bindings/wasm/package-demo/src/index.ts new file mode 100644 index 00000000..35c0757e --- /dev/null +++ b/bindings/wasm/package-demo/src/index.ts @@ -0,0 +1,69 @@ +import { WorkerRequest, WorkerResponse } from './worker.js'; +import { TokenInfo } from 'kiwi-nlp'; + +const elVersion = document.getElementById('version')!; +const elInput = document.getElementById('input') as HTMLInputElement; +const elResultTable = document.getElementById('result') as HTMLTableElement; + +const worker = new Worker( + new URL('./worker.ts', import.meta.url), + { type: 'module' } +); + +worker.onmessage = (event) => { + const response: WorkerResponse = event.data; + + switch (response.type) { + case 'inited': + inited(response.version); + break; + case 'analyzed': + analyzed(response.result, response.text); + break; + default: + console.error('Unknown worker message'); + break; + } +}; + +function sendWorkerRequest(request: WorkerRequest) { + worker.postMessage(request); +} + +sendWorkerRequest({ type: 'init' }); + +function inited(version: string) { + elVersion.innerText = 'v' + version; + + elInput.hidden = false; + elInput.addEventListener('input', analyze); + analyze(); +} + +function analyze() { + const text = elInput.value; + worker.postMessage({ type: 'analyze', text }); +} + +function analyzed(tokenInfos: TokenInfo[], text: string) { + while (elResultTable.rows.length > 1) { + elResultTable.deleteRow(1); + } + + for (const tokenInfo of tokenInfos) { + const surface = text.substring( + tokenInfo.position, + tokenInfo.position + tokenInfo.length + ); + + const row = elResultTable.insertRow(); + row.insertCell().innerText = tokenInfo.position.toString(); + row.insertCell().innerText = tokenInfo.length.toString(); + row.insertCell().innerText = surface; + row.insertCell().innerText = tokenInfo.str; + row.insertCell().innerText = tokenInfo.tag; + row.insertCell().innerText = tokenInfo.score.toString(); + } + + elResultTable.hidden = tokenInfos.length === 0; +} diff --git a/bindings/wasm/package-demo/src/main.ts b/bindings/wasm/package-demo/src/main.ts deleted file mode 100644 index 3ffc6ae5..00000000 --- a/bindings/wasm/package-demo/src/main.ts +++ /dev/null @@ -1,27 +0,0 @@ -import './style.css'; - -import * as lib from 'kiwi-nlp'; -import { KiwiBuilder } from 'kiwi-nlp'; - -import kiwiWasmPath from 'kiwi-nlp/dist/kiwi-wasm.wasm?url'; - -import { modelFiles } from './modelFiles'; - -function setGlobal(key: string, value: any) { - // @ts-ignore - globalThis[key] = value; -} - -setGlobal('lib', lib); -for (const [key, value] of Object.entries(lib)) { - setGlobal(key, value); -} - -async function init() { - const builder = await KiwiBuilder.create(kiwiWasmPath); - setGlobal('builder', builder); - -} - -setGlobal('modelFiles', modelFiles); -init(); diff --git a/bindings/wasm/package-demo/src/style.css b/bindings/wasm/package-demo/src/style.css index 793bd15f..eae743e3 100644 --- a/bindings/wasm/package-demo/src/style.css +++ b/bindings/wasm/package-demo/src/style.css @@ -1,11 +1,77 @@ -:root { - background-color: #ffffff; - color: #000000; +* { + box-sizing: border-box; } -@media (prefers-color-scheme: dark) { - :root { - color: #efefef; - background-color: #101418; - } +html { + display: flex; + justify-content: center; +} + +body { + width: min(100%, 800px); + padding: 1rem; + + background-color: #ffffff; + color: #000000; + + font-family: "Noto Sans KR", sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; + + display: flex; + flex-direction: column; + gap: 1rem; + +} + +.title-wrap { + display: flex; + flex-direction: row; + gap: 1rem; + align-items: center; + justify-content: space-between; +} + +.logo { + width: 15rem; +} + +#input { + width: 100%; + padding: 0.5rem; + font-size: 1rem; + + appearance: none; + border: 1px solid #ccc; + border-radius: 0.25rem; +} + +#input:focus { + outline: 2px solid #0078d4; +} + +#result { + width: 100%; + border-collapse: collapse; + border-style: hidden; + border-radius: 0.25rem; + box-shadow: 0 0 0 1px #ccc; + padding: 0; +} + +#result tr:not(:first-child) { + border-top: 1px solid #ccc; +} + +#result td, +#result th { + padding: 0.5rem; + border: none; +} + +#result th { + text-align: left; + font-weight: 400; + background-color: #f0f0f0; } diff --git a/bindings/wasm/package-demo/src/worker.ts b/bindings/wasm/package-demo/src/worker.ts new file mode 100644 index 00000000..5ce70ab5 --- /dev/null +++ b/bindings/wasm/package-demo/src/worker.ts @@ -0,0 +1,50 @@ +import { KiwiBuilder, Kiwi, TokenInfo } from 'kiwi-nlp'; +import kiwiWasmPath from 'kiwi-nlp/dist/kiwi-wasm.wasm?url'; +import { modelFiles } from './modelFiles'; + +let kiwiBuilder: KiwiBuilder | null = null; +let kiwi: Kiwi | null = null; +let version: string | null = null; + +export type WorkerRequest = + | { type: 'init' } + | { type: 'analyze'; text: string }; +export type WorkerResponse = + | { type: 'inited'; version: string } + | { type: 'analyzed'; result: TokenInfo[]; text: string }; + +function sendResponse(response: WorkerResponse) { + self.postMessage(response); +} + +async function init() { + kiwiBuilder = await KiwiBuilder.create(kiwiWasmPath); + version = kiwiBuilder.version(); + kiwi = await kiwiBuilder.build({ modelFiles }); + + sendResponse({ type: 'inited', version }); +} + +function analyze(text: string) { + if (!kiwi) { + throw new Error('Kiwi is not initialized'); + } + + const result = kiwi.tokenize(text); + sendResponse({ type: 'analyzed', result, text }); +} + +self.onmessage = (event) => { + const request: WorkerRequest = event.data; + + switch (request.type) { + case 'init': + init(); + break; + case 'analyze': + analyze(request.text); + break; + default: + throw new Error('Unknown request type'); + } +}; diff --git a/bindings/wasm/package/src/kiwi-builder.ts b/bindings/wasm/package/src/kiwi-builder.ts index 68f3364e..9d86af85 100644 --- a/bindings/wasm/package/src/kiwi-builder.ts +++ b/bindings/wasm/package/src/kiwi-builder.ts @@ -120,4 +120,12 @@ export class KiwiBuilder { }, }) as Kiwi; } + + /** + * Get the version of the Kiwi wasm module. + * @returns The version of the Kiwi wasm module. + */ + version(): string { + return this.api.cmd({ method: 'version', args: [] }) as string; + } }