Skip to content

Get the most similar sentence in QQ chat history by Word2Vec

License

Notifications You must be signed in to change notification settings

peterli110/AutoRepeater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoRepeater

从QQ群的聊天记录中根据关键词选出相似度最高的一句话,通过Word2Vec实现

Usage

预处理

导出txt格式的群聊记录,并拼接成一个文件放在./dataset/raw.txt中 然后执行python word2vector/read_data.py 可以得到筛选过后的聊天记录文件target.txt

训练

python word2vector/word2vector.py 模型会保存在model文件夹中

使用

运行python app.py即可

测试

用postman给localhost:7777/message发送一个post请求 form为以下几个参数:

  • msg:需要预测的句子
  • group: 群号
  • qq:qq号

About

Get the most similar sentence in QQ chat history by Word2Vec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages