diff options
author | polwex <polwex@sortug.com> | 2025-05-29 12:10:22 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-05-29 12:10:22 +0700 |
commit | a3f24ea79b14394b24c4b60a010651eb29eeb872 (patch) | |
tree | cb1c4937084116f66a59727ee752afd974714c8e /src/actions/lang.ts | |
parent | 7abf2227438362ad30820ee236405ec1b57a40b6 (diff) |
glorious new db
Diffstat (limited to 'src/actions/lang.ts')
-rw-r--r-- | src/actions/lang.ts | 10 |
1 files changed, 9 insertions, 1 deletions
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<React.ReactNode> { + console.log(""); + return SyllableModal({ text, lang }); +} export async function thaiAnalysis(text: string) { const res = await segmentateThai(text); |