https://github.com/vsiivola/variKN
Tip revision: 975b0bcce1be6891cbd3269053143d9727a97614 authored by Vesa Siivola on 12 June 2012, 13:01:05 UTC
Fixed compilation for gcc 4.7.0
Fixed compilation for gcc 4.7.0
Tip revision: 975b0bc
arpa2arpa.cc
// Copyright (C) 2007 Vesa Siivola.
// See licence.txt for the terms of distribution.
// This program converts the extended ARPA formats used by some tools
// to regular standard ARPA language models.
#include "conf.hh"
#include "io.hh"
#include "TreeGram.hh"
int main (int argc, char **argv) {
conf::Config config;
config("Usage: arpa2arpa nonstandard_in standard_out\nConverts interpolated arpa to backoff arpa.\n");
config.parse(argc,argv,2);
io::Stream::verbose=true;
io::Stream in(config.arguments[0], "r");
io::Stream out(config.arguments[1], "w");
TreeGram ng;
fprintf(stderr,"Reading\n");
ng.read(in.file);
in.close();
fprintf(stderr,"Writing\n");
ng.write(out.file);
out.close();
}