set max sentence length of 450 characters.

This commit is contained in:
Gordon Shumway 2019-12-22 15:35:26 -05:00 committed by GitHub
parent ef4227f676
commit 9d2a3bc8a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class Markovify(callbacks.Plugin):
def get_response(self, channel):
try:
response = self.model[channel].make_sentence()
response = self.model[channel].make_short_sentence(450)
except KeyError:
file = self.directory.dirize(channel.lower() + "/markov.json")
try:
@ -220,7 +220,7 @@ class Markovify(callbacks.Plugin):
self.model[channel] = POSifiedText.from_json(jsondata)
except:
return
response = self.model[channel].make_sentence()
response = self.model[channel].make_short_sentence(450)
except:
return
if response and len(response) > 1 and not response.isspace():