summaryrefslogtreecommitdiff
path: root/markov.lpr
diff options
context:
space:
mode:
Diffstat (limited to 'markov.lpr')
-rw-r--r--markov.lpr1
1 files changed, 1 insertions, 0 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);