Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2018-05-03 12:28:11 +0300
committerKenneth Heafield <github@kheafield.com>2018-05-03 12:28:11 +0300
commitae4746991928d61f833c35501236e1805b91ef06 (patch)
tree491d4ce5ea799d55a319c24067484ebd069713dc /scripts/ems/support
parent5a7c31e5d123ac6b785eee2ca4d03d255c55df07 (diff)
Don't drop last character if file does not end with newline
Diffstat (limited to 'scripts/ems/support')
-rwxr-xr-xscripts/ems/support/split-sentences.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ems/support/split-sentences.perl b/scripts/ems/support/split-sentences.perl
index 19d05d8e1..29b61695e 100755
--- a/scripts/ems/support/split-sentences.perl
+++ b/scripts/ems/support/split-sentences.perl
@@ -74,7 +74,7 @@ if (-e "$prefixfile") {
## Loop over text, add lines together until we get a blank line or a <p>
my $text = "";
while (<STDIN>) {
- chop;
+ chomp;
if (/^<.+>$/ || /^\s*$/) {
# Time to process this block; we've hit a blank or <p>
&do_it_for($text, $_);