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

corpus-sizes.perl « training « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02dd4ae9b618cc1f73163544142f3df7de3c075c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env perl 

# $Id: consolidate-training-data.perl 928 2009-09-02 02:58:01Z philipp $

use warnings;
use strict;

my ($in,$out,@PART) = @ARGV;

foreach my $part (@PART) {
    die("ERROR: no part $part.$in or $part.$out") if (! -e "$part.$in" || ! -e "$part.$out");
    my $in_size = `cat $part.$in | wc -l`;
    my $out_size = `cat $part.$out | wc -l`;
    die("number of lines don't match: '$part.$in' ($in_size) != '$part.$out' ($out_size)") 
        if $in_size != $out_size;
    print "$in_size";
}