Revert "markov: abandon min_words_per_sentence for lines"
This reverts commit 464727cc74
.
it turns out that without the min_words_per_sentence adjustment, the
default min_words (15) is way too demanding on a lot of chains, so we're
going to go back to this for the moment
This commit is contained in:
parent
ab9edb2c9b
commit
9b5e8445bf
|
@ -15,8 +15,9 @@ def generate_line(context, topics=None, min_words=15, max_words=30, max_sentence
|
||||||
tries = 0
|
tries = 0
|
||||||
sentences = 0
|
sentences = 0
|
||||||
line = []
|
line = []
|
||||||
|
min_words_per_sentence = min_words / max_sentences
|
||||||
while tries < max_tries:
|
while tries < max_tries:
|
||||||
line += generate_longish_sentence(context, topics=topics, min_words=min_words,
|
line += generate_longish_sentence(context, topics=topics, min_words=min_words_per_sentence,
|
||||||
max_words=max_words, max_tries=max_tries)
|
max_words=max_words, max_tries=max_tries)
|
||||||
sentences += 1
|
sentences += 1
|
||||||
if sentences >= max_sentences:
|
if sentences >= max_sentences:
|
||||||
|
|
Loading…
Reference in New Issue