此代码有问题。出于某种原因,每当我使用测试客户端时,都会收到此消息。
import stdio
import sys
from markov_model import MarkovModel
def main():
k = int(sys.argv[1])
T = int(sys.argv[2])
# text from standard input initialized to variable
text = sys.stdin.read()
# slices text and initializes it to kgram
kgram = text[:k]
model = markov_model(text, k)
# model is used to generate random length of text
stdio.writeln(model.gen(kgram, T))
if __name__ == '__main__':
main()
text_generator.py 5 50