-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can i use this to generate first order markov chain number #33
Comments
Try this: chain = markovify.Chain([ x ], state_size=1)
print(list(chain.gen())) |
I don't know which file I should have to copy and where to add above mentioned lines. |
I don't understand the question. Could you elaborate? |
This two lines only give output with given x in python, or I have copy paste above two lines in any file of this markovify project. |
Ah, I see. Here's a full script that should work, using the import markovify
x = [5, 6, 1, 6, 4, 1, 2, 4, 6, 6, 1, 6, 6, 3, 5, 1, 3, 6, 5, 6, 4, 1, 6, 6, 5, 5, 5, 3, 4, 2]
chain = markovify.Chain([ x ], state_size=1)
print(list(chain.gen())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to generate first order markov chain by giving randomly generated number sequence x=[5 6 1 6 4 1 2 4 6 6 1 6 6 3 5 1 3 6 5 6 4 1 6 6 5 5 5 3 4 2] as input. how to do this.
The text was updated successfully, but these errors were encountered: