diff options
author | polwex <polwex@sortug.com> | 2025-05-21 15:28:03 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-05-21 15:28:03 +0700 |
commit | 9192e6c7747fd2d3f6a6c5c07d886a0982b53f11 (patch) | |
tree | c94a60a26732b697fa6734bff0fe898d690d2fd4 /src/actions/lang.ts | |
parent | e839a5f61f0faa21ca8b4bd5767f7575d5e576ee (diff) |
good tandem good tandem of ideas and implementation
Diffstat (limited to 'src/actions/lang.ts')
-rw-r--r-- | src/actions/lang.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/actions/lang.ts b/src/actions/lang.ts index fc798da..b38b542 100644 --- a/src/actions/lang.ts +++ b/src/actions/lang.ts @@ -2,6 +2,7 @@ import { AsyncRes } from "@/lib/types"; import { NLP } from "sortug-ai"; import ServerWord from "@/zoom/ServerWord"; +import { analyzeTHWord, segmentateThai } from "@/pages/api/nlp"; // import db from "../lib/db"; export async function wordAction( @@ -12,6 +13,12 @@ export async function wordAction( return ServerWord({ word: text, lang }); } +export async function thaiAnalysis(text: string) { + const res = await segmentateThai(text); + const res2 = await analyzeTHWord(text); + console.log({ res, res2 }); +} + // export async function ocrAction(file: File): AsyncRes<string[]> { // const res = await NLP.ocr(file); // return res; |