ngram-language-model:HMM Ngram 语言模型的实现

时间:2021-06-19 17:33:01
【文件属性】:
文件名称:ngram-language-model:HMM Ngram 语言模型的实现
文件大小:1.11MB
文件格式:ZIP
更新时间:2021-06-19 17:33:01
Python ngram-语言模型 一个 HMM Ngram 语言模型在 Python 中的实现。 目前实现了基本的 NGram 分析,并提供了一个接口来从你最喜欢的语料库中创建采样器。 使用 run_sampling_from_corpus.py 在文本文件中的语料库上创建训练样本。 有关输入参数的更多信息,请键入 run_sampling_from_corpus.py -h 为了获得更多控制,您可以从实用程序模块导入 SentenceSamplerUtility 类,该类为采样器构造机制提供了方便的包装器。 来自古腾堡计划(包含在测试目录中)的 Edgar Allan Poe 作品集训练的三元模型的一些亮点: "And yet all was blackness and vacancy." "Notwithstanding the obscurity which thus oppres
【文件预览】:
ngram-language-model-master
----tokenizer.py(1KB)
----ngram_model.py(5KB)
----partition_tree.py(2KB)
----__init__.py(20B)
----README.md(2KB)
----sampler.py(634B)
----utilities.py(2KB)
----tests()
--------edgar_allan_poe.py(1KB)
--------__init__.py(20B)
--------test_corpus()
--------ngram_model_test.py(4KB)
----run_sampling_from_corpus.py(1KB)

网友评论