blob: b38b54274611dc6e308e707d432d7982144c1398 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
"use server";
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(
text: string,
lang: string,
): Promise<React.ReactNode> {
console.log("");
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<string[]> {
// const res = await NLP.ocr(file);
// return res;
// }
|