diff options
Diffstat (limited to 'src/actions/lang.ts')
-rw-r--r-- | src/actions/lang.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/actions/lang.ts b/src/actions/lang.ts index 5242c7a..fc798da 100644 --- a/src/actions/lang.ts +++ b/src/actions/lang.ts @@ -1,15 +1,16 @@ "use server"; import { AsyncRes } from "@/lib/types"; import { NLP } from "sortug-ai"; +import ServerWord from "@/zoom/ServerWord"; // import db from "../lib/db"; -// export async function textAction( -// text: string, -// lang: string, -// ): AsyncRes<NLP.Spacy.SpacyRes> { -// const res = await NLP.Spacy.run(text, lang); -// return res; -// } +export async function wordAction( + text: string, + lang: string, +): Promise<React.ReactNode> { + console.log(""); + return ServerWord({ word: text, lang }); +} // export async function ocrAction(file: File): AsyncRes<string[]> { // const res = await NLP.ocr(file); |