From 9d2a3bc8a7e2377e96b45b85a940fe9828edccc6 Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Sun, 22 Dec 2019 15:35:26 -0500 Subject: [PATCH] set max sentence length of 450 characters. --- Markovify/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Markovify/plugin.py b/Markovify/plugin.py index 1957b96..d5c24ea 100644 --- a/Markovify/plugin.py +++ b/Markovify/plugin.py @@ -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():