wsplny parametr -e usunity

wygadzone teksty help
This commit is contained in:
Tomasz Obrebski 2013-01-18 22:43:56 +01:00
parent 243d027267
commit e0cd003326
9 changed files with 22 additions and 66 deletions

View File

@ -3,32 +3,30 @@
option "input" f "Input file" string no
option "output" o "Output file for succesfully processed segments" string no
option "fail" e "Output file for unsuccesfully processed segments " string no
option "output" o "Output file" string no
option "only-fail" - "Print only segments the program failed to process" flag off hidden
option "no-fail" - "Print only segments the program processed" flag off hidden
option "copy" c "Copy succesfully processed segments to standard output" flag off
option "copy" c "Copy succesfully processed segments to output" flag off
option "process" p "Process segments with this tag" string no multiple
option "process" p "Process segments of this type only" string no multiple
option "select" s "Select only segments with this field" string no multiple
option "select" s "Select only segments containing this field" string no multiple
option "ignore" S "Select only segments without this field" string no multiple
option "ignore" S "Select only segments, which doesn't contain this field" string no multiple
option "output-field" O "Output field name" string no
option "output-field" O "Output field name (default: program name)" string no
option "input-field" I "Input field name" string no multiple
option "input-field" I "Input field name (default: the FORM field)" string no multiple
option "interactive" i "Toggle interactive mode" flag off
option "config" - "Configuration file" string typestr="FILENAME" no
option "one-field" 1 "Print all results in one segments (creates ambiguous annotation)" flag off
option "one-field" 1 "Print all alternative results in one field (creates compact ambiguous annotation)" flag off
option "one-line" - "Print annotation alternatives as additional fields" flag off
option "one-line" - "Print annotation alternatives as additional fields in the same segment" flag off
option "language" - "Language." string no

View File

@ -9,7 +9,6 @@
FILE* inputf=stdin;
FILE* outputf=stdout;
FILE* failedf=stdout;
bool copy_processed=0;
bool one_field=false;
bool one_line=false;
@ -171,13 +170,6 @@ void process_common_options(gengetopt_args_info* args, char* argv0)
exit(1);
}
if(args->fail_given)
if(!(failedf=fopen(args->fail_arg,"w")))
{
fprintf(stderr,"Cannot open the output file: %s.\n", args->fail_arg);
exit(1);
}
if(args->input_field_given)
fieldprefix(args->input_field_arg[0],input_field_prefix);
else

View File

@ -76,7 +76,7 @@ int main(int argc, char** argv) {
}
if ( tab.count() == 0)
fputs(line, failedf);
fputs(line, outputf);
else
{
if(args.replace_flag)
@ -145,11 +145,7 @@ int main(int argc, char** argv) {
}
}
if(args.interactive_flag)
{
fflush(outputf);
fflush(failedf);
}
if(args.interactive_flag) fflush(outputf);
}
cmdline_parser_free(&args);
}

View File

@ -56,8 +56,8 @@ int main(int argc, char** argv) {
guess.ana(form, tab);
if ((tab.count()==0) && (!args.no_fail_flag)) // no guesses - analysis was unsuccessful
fputs(line, failedf);
if ((tab.count()==0)) // no guesses - analysis was unsuccessful
fputs(line, outputf);
else
{
@ -154,8 +154,7 @@ int main(int argc, char** argv) {
}
}
}
if(args.interactive_flag)
fflush(outputf), fflush(failedf);
if(args.interactive_flag) fflush(outputf);
}
cmdline_parser_free(&args);

View File

@ -22,9 +22,6 @@ int main(int argc, char** argv) {
Corr cor;
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// strcpy(dictionary,"cor.bin");
cor.load(dictionary);
cor.t=args.distance_arg;
@ -71,7 +68,7 @@ int main(int argc, char** argv) {
}
if ( tab.count() == 0)
fputs(line, failedf);
fputs(line, inputf);
else
{
tab.sort();
@ -164,11 +161,7 @@ int main(int argc, char** argv) {
}
}
if(args.interactive_flag)
{
fflush(outputf);
fflush(failedf);
}
if(args.interactive_flag) fflush(outputf);
}
cmdline_parser_free(&args);
}

View File

@ -29,23 +29,3 @@ void process_lem_options(gengetopt_args_info* args)
}
}
// STARE
// if(args.dictionary_given)
// strcpy(dictionary, args.dictionary_arg);
// else {
// char path[256];
// //sprintf(path, "/etc/utt/data/%s/%s", args.locale_arg, DICT_FILE);
// //if (file_accessible(path) == 0)
// // strcpy(dictionary, path);
// //else {
// sprintf(path, "%s/%s", utt_dir, DICT_FILE);
// if (file_accessible(path) == 0)
// strcpy(dictionary, path);
// else {
// fprintf(stderr, "Cannot find dictionary!\n");
// exit(1);
// }
// //}
// }

View File

@ -65,7 +65,7 @@ int main(int argc, char** argv) {
}
if (tab.count() == 0)
fputs(line, failedf);
fputs(line, outputf);
else
{ // mamy jakies opisy w slowniku
@ -123,8 +123,7 @@ int main(int argc, char** argv) {
}
}
if(args.interactive_flag)
fflush(outputf), fflush(failedf);
if(args.interactive_flag) fflush(outputf);
}
cmdline_parser_free(&args);

View File

@ -69,7 +69,7 @@ int main(int argc, char** argv) {
lem->ana(p,tab);
}
if (tab.count() == 0) {
fputws(line, failedf);
fputws(line, outputf);
}
else
@ -132,8 +132,7 @@ int main(int argc, char** argv) {
}
}
if (args.interactive_flag)
fflush(outputf), fflush(failedf);
if (args.interactive_flag) fflush(outputf);
}
cmdline_parser_free(&args);

View File

@ -11,11 +11,11 @@ text "
DESCRIPTION
tok reads from standard input, identifies tokens on the basis of their orthographic form and writes a sequence of segments in UTT format to
the standard output. The type of the token is printed as the type field.
the standard output.
OUTPUT FORMAT
UTT-file with four fields: start, length, type, and form. In the type field five types of tokens are distinguished:
UTT-file with four fields: START, LENGTH, TYPE, and FORM. In the TYPE field five types of tokens are distinguished:
W (word) - continuous sequence of letters
N (number) - continuous sequence of digits