def testDocFreqOneDoc(self):
texts = [['human', 'interface', 'computer']]
d = HashDictionary(texts, myhash=zlib.adler32)
expected = {10608: 1, 12466: 1, 31002: 1}
self.assertEqual(d.dfs, expected)
test_corpora_hashdictionary.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录