Uh oh!
There was an error while loading. Please reload this page.
Miniproject5 - #54
Conversation
matthewruehle
left a comment
There was a problem hiding this comment.
Small but useful changes to documentation and structure, quite in line with the goals of MP5. A few things probably ought to be changed as well, regarding extra/commented-out code, but all in all solid.
| import random | ||
| def dict_creation_one(script, things = dict()): | ||
| '''Create the base dictionary for ONE word; only to be called if there is no dicts1.p already. |
There was a problem hiding this comment.
I appreciate the new header comments and file documentation - the program itself is cleaner and more follow-able as a result.
| if y.lower() == 'y': | ||
| max_seasons = input("How many seasons do you want?: ") | ||
| remake = True | ||
| # print(not my_file.is_file()) #For testing purposes |
There was a problem hiding this comment.
For cleanliness/best practices, removing commented-out code and print-statement-debugging artifacts would be a good idea.
| oneworddict = pickle.load( open( "dict1.p", "rb")) | ||
| twoworddict = pickle.load( open("dict2.p", "rb")) | ||
| allwords = pickle.load( open("allwords.p", "rb")) | ||
| blah2 = markov_chain_two(twoworddict, oneworddict, allwords) #create the markov chain |
There was a problem hiding this comment.
Not digging the variable choice, but the comments do help clarify what the code's doing in this section and all.
I did some edits for miniproject 5!
I also commented everything this time.