From cb1b56f5a0eddbf77446f415f2beda57c8305f85 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 23 Nov 2025 01:12:53 +0700 Subject: wut --- packages/lang/test.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/lang/test.ts (limited to 'packages/lang/test.ts') diff --git a/packages/lang/test.ts b/packages/lang/test.ts new file mode 100644 index 0000000..d1763ca --- /dev/null +++ b/packages/lang/test.ts @@ -0,0 +1,24 @@ +import { franc, francAll } from "franc-all"; +import { getScriptPredictor } from "./src"; + +const a = "My name is John."; +const a2 = "My name is John"; +const b = "ของไทย"; +const b2 = "ของไทย"; +const c = "こんにちは"; +const c2 = "こんにちは"; +// +// This isn't working must be using some browser APIs to do the work I guess +const fa = franc("My name is John."); +const fa2 = francAll("My name is John"); +const fb = franc("ของไทย"); +const fb2 = francAll("ของไทย"); +const fc = franc("こんにちは"); +const fc2 = franc("こんにちは"); + +console.log({ fa, fa2, fb, fb2, fc, fc2 }); + +const Predictor = getScriptPredictor(); +const ua = Predictor(a); + +console.dir({ ua }, { depth: null }); -- cgit v1.2.3