Commit 68a391a3 authored by Arne Köhn's avatar Arne Köhn

Fix detection of the end of a sentence. Only . was considered as EOS, which is clearly wrong

parent cdb097d3
......@@ -74,8 +74,9 @@ sub process {
while ($line = <$inputfile>) {
if ($line !~ /^[#*%].*/) {
$line =~ s/\t\$/\t/;
$sentences[$n] .= join(' ', (split(/\s+/, $line))[0,1])."\n";
if ($line =~ /^\./) {
$line = join(' ', (split(/\s+/, $line))[0,1])."\n";
$sentences[$n] .= $line;
if ($line =~ /\.$/) {
$n++;
$sentences[$n] = '';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment