文件名称:PyMarkovTextGenerator:用于生成随机文本字符串的Python脚本
文件大小:10KB
文件格式:ZIP
更新时间:2024-06-05 00:43:26
Python
这是一个基于Markov链的简单且可能效率很低的伪随机文本生成器。 它为您创建并存储链,但是对于测试以外的任何实际用途,您应该重新实现演示功能。 例子: from markov import * #Create an instance of MarkovGenerator binded to shelve file mg = MarkovGenerator ( 'path_to_shelve_file' ) #Create chain, pass name and markov chain order (see theory behind markov chains) mg . add_chain ( "test" , 2 ) #List chains in this shelve file mg . chains #Build chain from source, pass pat
【文件预览】:
PyMarkovTextGenerator-master
----MANIFEST.in(26B)
----markov.py(6KB)
----LICENSE(18KB)
----.gitignore(6B)
----README.md(734B)