From 9192e6c7747fd2d3f6a6c5c07d886a0982b53f11 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 21 May 2025 15:28:03 +0700 Subject: good tandem good tandem of ideas and implementation --- src/actions/lang.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/actions') 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 { // const res = await NLP.ocr(file); // return res; -- cgit v1.2.3