From 56a893734cd623c81efa79bbec44180b4747525a Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Tue, 7 Nov 2023 22:13:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=8D=E4=BD=8E=E8=AF=8D=E4=BA=91?= =?UTF-8?q?=E9=98=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/wordcloud/tokenizer.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/wordcloud/tokenizer.js b/utils/wordcloud/tokenizer.js index 5f8e7beb..8593e11e 100644 --- a/utils/wordcloud/tokenizer.js +++ b/utils/wordcloud/tokenizer.js @@ -95,15 +95,15 @@ export class Tokenizer { .join('').trim() ) .map(c => { - let length = c.length - let threshold = 10 - if (length < 100 && length > 50) { - threshold = 6 - } else if (length <= 50 && length > 25) { - threshold = 3 - } else if (length <= 25) { - threshold = 2 - } + // let length = c.length + let threshold = 2 + // if (length < 100 && length > 50) { + // threshold = 6 + // } else if (length <= 50 && length > 25) { + // threshold = 3 + // } else if (length <= 25) { + // threshold = 2 + // } return nodejieba.extract(c, threshold) }) .reduce((acc, curr) => acc.concat(curr), [])