mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: 乱七八糟的的统计词云
This commit is contained in:
parent
7f773dcfc4
commit
3cfbe9eae7
7 changed files with 188 additions and 4 deletions
11
utils/wordcloud/wordcloud.js
Normal file
11
utils/wordcloud/wordcloud.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Tokenizer } from './tokenizer.js'
|
||||
import { render } from '../common.js'
|
||||
|
||||
export async function makeWordcloud (e, groupId) {
|
||||
let tokenizer = new Tokenizer()
|
||||
let topK = await tokenizer.getTodayKeywordTopK(groupId, 100)
|
||||
let list = JSON.stringify(topK)
|
||||
// let list = topK
|
||||
console.log(list)
|
||||
await render(e, 'chatgpt-plugin', 'wordcloud/index', { list })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue