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

json2text.pl « scripts - github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7bd6117b23be9ae4ede846c4daab9b3ec47decf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env perl
use strict;
use JSON;
use Data::Dumper;

my $json = "";
while(<STDIN>) {
  $json .= $_;
}

my $d = from_json($json);
my @v;
foreach my $k (keys %$d) {
  $v[$d->{$k}] = $k;
}
print "$_\n" foreach(@v);