-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update to v2.0, added punctuation support, added AllowedUsers
, WhisperCooldown
, EnableGenerateCommand
, MinSentenceWordAmount
and SentenceSeparator
#17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cleans up the args of the method
Merging wonderful changes from @justinrusso, with some updates. I'll create new PR's for each of the described updates.
I love the use of TypedDict to further improve third party type checking, but support for the commonly used Python 3.6 and 3.7 has priority.
Update the Settings class to include an automatic update
* Sometimes still send whispers, even if disabled in settings (in case of updating settings etc.) * Rename check_if_streamer to check_if_permission
Git will attempt to push it, even if it's in .gitignore, because the default file is already on git. So, it's probably best to remove it from git, so people don't accidentally push their authentications.
Also improved efficiency of get_start in Database.py
- Punctuation (commas, dots, apostrophes, etc.) are now split as a separate word. - Update the database accordingly. Create a ..._backup.db file with the old database. - Automatically update the settings.json file - Further improved code quality - Add a Tokenizer file that handles splitting up a sentence into tokens, and merging tokens back into sentences. - Added a SentenceSeparator value, which is placed inbetween sentences, when multiple sentences are generated (only when the first sentence was too short according to MinSentenceWordAmount)
Large rework of how punctuation is handled
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request overview:
AllowedUsers
field - gives developer (or whichever users are specified here) the permission to bypass the cooldown, or use the generate command even when the command is disabled.WhisperCooldown
field - whether the Bot whispers the cooldown message. Otherwise, do not send the cooldown.EnableGenerateCommand
field - enables or disables!generate
. Broadcaster andAllowerUsers
can override this setting, and still generate.MinSentenceWordAmount
value in settings.json.SentenceSeparator
value, which is placed inbetween sentences, when multiple sentences are generated (only when the first sentence was too short according toMinSentenceWordAmount
)settings.txt
withsettings.json
, which is automatically updated from v1.0!enable
)..gitignore
.See #14 and #16.
Thanks to @justinrusso for the help.