From a3f24ea79b14394b24c4b60a010651eb29eeb872 Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 29 May 2025 12:10:22 +0700 Subject: glorious new db --- src/actions/lang.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/actions/lang.ts') diff --git a/src/actions/lang.ts b/src/actions/lang.ts index b38b542..e68fbfe 100644 --- a/src/actions/lang.ts +++ b/src/actions/lang.ts @@ -2,7 +2,8 @@ import { AsyncRes } from "@/lib/types"; import { NLP } from "sortug-ai"; import ServerWord from "@/zoom/ServerWord"; -import { analyzeTHWord, segmentateThai } from "@/pages/api/nlp"; +import { analyzeTHWord, segmentateThai } from "@/lib/calls/nlp"; +import SyllableModal from "@/components/Flashcard/SyllableModal"; // import db from "../lib/db"; export async function wordAction( @@ -12,6 +13,13 @@ export async function wordAction( console.log(""); return ServerWord({ word: text, lang }); } +export async function syllableAction( + text: string, + lang: string, +): Promise { + console.log(""); + return SyllableModal({ text, lang }); +} export async function thaiAnalysis(text: string) { const res = await segmentateThai(text); -- cgit v1.2.3