diff options
author | polwex <polwex@sortug.com> | 2025-05-15 15:50:51 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-05-15 15:50:51 +0700 |
commit | 05d13b6f166eae5c2de8fe6f6038819b1b6ba1a0 (patch) | |
tree | 795ca33a3319d11bd9daa0366d4d15f31eabf024 /src/actions/lang.ts | |
parent | 92139f14a92a535f123ad49a60498138dd2ec6cf (diff) |
m
Diffstat (limited to 'src/actions/lang.ts')
-rw-r--r-- | src/actions/lang.ts | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/actions/lang.ts b/src/actions/lang.ts index d54a220..5242c7a 100644 --- a/src/actions/lang.ts +++ b/src/actions/lang.ts @@ -1,12 +1,17 @@ "use server"; import { AsyncRes } from "@/lib/types"; -import db from "../lib/db"; +import { NLP } from "sortug-ai"; +// import db from "../lib/db"; -export async function spacy(text: string, lang: string): AsyncRes<any> { - const res = await call(formData, true); - console.log("reg res", res); - if ("error" in res) return { error: "Something went wrong" }; - else { - return { success: true }; - } -} +// 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 ocrAction(file: File): AsyncRes<string[]> { +// const res = await NLP.ocr(file); +// return res; +// } |