From 9689618102d3693254f5fca08233e9182bf8787a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 10 Jan 2019 10:58:35 +0100 Subject: markov.lpr: line feed ends a word, too --- markov.lpr | 1 + markov.lps | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/markov.lpr b/markov.lpr index bc4f6b4..bdc1e48 100644 --- a/markov.lpr +++ b/markov.lpr @@ -71,6 +71,7 @@ begin reset(f); while not eof(f) do begin readln(f,s); + s:=s+' '; // lf ends a word, too current:=0; // reset current index for i:=1 to length(s) do begin current:=current*(length(i2c)+1) mod length(probabilities); diff --git a/markov.lps b/markov.lps index c2d3cbf..4950f82 100644 --- a/markov.lps +++ b/markov.lps @@ -7,9 +7,8 @@ - - + @@ -34,6 +33,7 @@ + -- cgit v1.2.3-70-g09d2