8000 GitHub - GarthTB/WordFreqCounter: 盲分词的中文语料词频统计器
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

GarthTB/WordFreqCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

中文盲分词词频统计器

2025-05-10 Rust版 已出炉!更快!更小!此版本不再维护。

在我的个人电脑上,约10亿字的中文互联网语料,统计2字词,不加标点符号,大约1分15秒出结果。

语料文件须为UTF-8编码。默认中文范围为4e00-9fff(16进制)。

环境依赖

统计原理:

每次进行两轮统计。假设要统计n字词:

  • 第一轮:统计所有相邻的n个汉字组合出现的次数。
  • 第二轮:每(2n-1)个相邻的字为一个滑动窗口,每个窗口中有n个词,滑动步长为n。根据第一轮统计的结果,统计窗口中词频最高的那一个词(最可能是词)。

更新日志

v0.5.1 - 20250127

  • 优化:不使用StringBuilder,直接切片字符串

v0.5.0 - 20241203

  • 优化:升级为.NET 9框架

v0.4.0 - 20240831

  • 优化:经过跑分测试,改用性能最好的StringBuilder
  • 优化:去除不必要的逻辑,去除命令行传参

v0.3.2 - 20240824

  • 修复:一处类型错误
  • 优化:精简代码
  • 优化:整理项目结构

v0.3.0 - 20240619

  • 并行计算,大幅提升性能

v0.2.2 - 20240617

  • 提升性能,漏洞修复

v0.1.0 - 20240617

  • 发布!

About

盲分词的中文语料词频统计器

Topics

Resources

License

Stars

Watchers

Forks

Languages

0