remove the nodejs-jieba
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user