-
Notifications
You must be signed in to change notification settings - Fork 58
Miniproject5 #54
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
base: master
Are you sure you want to change the base?
Miniproject5 #54
Conversation
matthewruehle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.