remove the nodejs-jieba

This commit is contained in:
PrinOrange
2024-01-06 12:01:04 +08:00
parent 623c0f3b0b
commit 8db176fae9
3 changed files with 18 additions and 794 deletions

View File

@@ -1,14 +1,13 @@
import minisearch from "minisearch";
import { cutForSearch } from "nodejs-jieba";
// import { cutForSearch } from "nodejs-jieba";
import { getPostFileContent, sortedPosts } from "./post-process";
// TODO: The jieba tokenizer seems not be supported by vercel platform
// that causes the module loading error.
// So here is the remain task for seeking better Chinese tokenizer.
function tokenizer(str: string) {
return cutForSearch(str, true);
}
// that causes the module loading error.
// So here is the remain task for seeking better Chinese tokenizer.
// function tokenizer(str: string) {
// return cutForSearch(str, true);
// }
function makeSearchIndex() {
let miniSearch = new minisearch({

798
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -53,7 +53,6 @@
"next-seo": "^6.4.0",
"next-share": "^0.27.0",
"next-themes": "^0.2.1",
"nodejs-jieba": "^0.1.2",
"postcss": "8.4.31",
"prism": "^1.0.0",
"prismjs": "^1.29.0",