使用Zipf定律估算字典大小 [英] Estimate Dictionary size using Zipf’s Law

查看:82
本文介绍了使用Zipf定律估算字典大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Zipfs定律来计算集合的字典大小(唯一词数)?

How would one go about Calculating the Dictionary Size(no.of unique words) of a collection using Zipfs Law?

推荐答案

您将必须标记您的收藏集,例如空格和标点符号.然后,将所有令牌存储在哈希中并计数.然后,您要做的就是使用Gnuplot这样的工具来绘制计数分布.

You will have to tokenize your collection, e.g. by white-space and punctuation. Then you store all the tokens in a hash and count. What you do is then plot the distribution of the counts using a tool like Gnuplot.

这篇关于使用Zipf定律估算字典大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆