summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-10 10:58:35 +0100
committerErich Eckner <git@eckner.net>2019-01-10 10:58:35 +0100
commit9689618102d3693254f5fca08233e9182bf8787a (patch)
treecef222494a8890fd937b96093870230e89a2efb2
parent5cf2e600b9eac373ce2296da5587ce9c7eefe6ab (diff)
downloadmarkov-9689618102d3693254f5fca08233e9182bf8787a.tar.xz
markov.lpr: line feed ends a word, too
-rw-r--r--markov.lpr1
-rw-r--r--markov.lps4
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 @@
<Unit0>
<Filename Value="markov.lpr"/>
<IsPartOfProject Value="True"/>
- <IsVisibleTab Value="True"/>
<TopLine Value="54"/>
- <CursorPos X="40" Y="78"/>
+ <CursorPos X="37" Y="74"/>
<UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit0>
@@ -34,6 +33,7 @@
<Unit3>
<Filename Value="generate-random-word-from-wikipedia.sh"/>
<IsPartOfProject Value="True"/>
+ <IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<CursorPos X="55" Y="30"/>
<UsageCount Value="23"/>