43#include "EST_ling_class.h"
44#include "EST_cmd_line.h"
54 "ch_utt <input file> -o <output file> <options>\n"
55 "Summary: change/copy utterance file\n"
56 "use \"-\" to make input and output files stdin/out\n"
58 "-f <string> Feature to use as item ID when merging utterances.\n"
59 "-o <ofile> output file name\n"
60 "-otype <string> output file type: \n"
61 "-sysdir <string> Look for unqualified system entities in this directory"
62 ) + options_utterance_filetypes_long(),
66 EST_read_status
rstat;
70 if (
al.present(
"-sysdir"))
71 utterance_xml_register_id(
"^\\([^/]*\\)",
72 al.sval(
"-sysdir") +
"/\\1");
76 if (
rstat == read_format_error)
77 EST_error(
"Bad format in %s", (
const char *)
files.first());
78 else if (
rstat != read_ok)
79 EST_sys_error(
"Error reading %s", (
const char *)
files.first());
84 for(; fp != NULL; fp=fp->next())
88 if (
rstat == read_format_error)
89 EST_error(
"Bad format in %s", (
const char *)
files(fp));
90 else if (
rstat != read_ok)
91 EST_sys_error(
"Error reading %s", (
const char *)
files(fp));
93 utterance_merge(utt, u,
feat);
EST_read_status load(const EST_String &filename)
EST_write_status save(const EST_String &filename, const EST_String &type="est_ascii") const