w struktura.txt wpisalem sugestie R.D.

dgp obsluguje configa



git-svn-id: svn://atos.wmid.amu.edu.pl/utt@37 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
This commit is contained in:
obrebski 2008-05-07 12:11:21 +00:00
parent 13a8a67bce
commit df77b87018
4 changed files with 22 additions and 38 deletions

View File

@ -15,3 +15,4 @@ WAZNE:
* (zrobione dla ser?) Nazwy pmdb2re -> pmdb.tag2re (grp, ser).
* Zadania zwiazane z rozbudowa ser (src/ser/TODO).
* Nowa funkcjonalność dla kot? con? - każde zdanie w nowym wierszu
* opcja info w dgp powinna miec domyslna wartosc d lub h

View File

@ -26,6 +26,9 @@
/usr/local/bin/ipi.tag2re
/usr/local/bin/uam.tag2re
# R.D. sugeruje /etc/utt
# lokalnie: ~/.utt lub (trendy) ~/.config/utt
/usr/local/etc/utt/con.conf
/usr/local/etc/utt/cor.conf
/usr/local/etc/utt/dgc.conf
@ -53,10 +56,10 @@
/usr/local/lib/utt/ser.l.template
/usr/local/lib/utt/terms.m4
/usr/local/lib/utt/weights.kor
/usr/local/lib/utt/seg.rb
/usr/local/lib/utt/cats.dgc
/usr/local/lib/utt/gram.dgc
/usr/local/lib/utt/weights.kor # -> share
/usr/local/lib/utt/seg.rb # lok. ~/.local/lib/utt/seg.rb
/usr/local/lib/utt/cats.dgc # -> share
/usr/local/lib/utt/gram.dgc # -> share
/usr/local/share/doc/utt/FAQ
/usr/local/share/doc/utt/COPYRIGHT

View File

@ -1,36 +1,12 @@
package "dgp"
version "0.1"
#option "process" p "Process segments with this tag."
# string no multiple
#option "select" s "Select only segments with this field. [Not implemented.]"
# string no multiple
#option "ignore" S "Select only segments without this field. [Not implemented]"
# string no multiple
#option "input" f "Input file"
# string typestr="filename" no
#option "output" o "Output file"
# string typestr="filename" no
#option "failed" e "Fail file"
# string typestr="filename" no
#option "copy" c "Copy unprocessed"
# flag off
option "grammar" g "Grammar file"
string typestr="filename" default="dgp.dg"
string typestr="filename" default="dgp.dgp"
option "long" l "Long output"
flag off
#option "interactive" - "Interactive use."
# flag off
option "debug" d "Debug mode."
flag off
@ -39,4 +15,4 @@ h - heads d - dependents
s - sets
c - constraints n - node/arc counts t - parse time
"
string default="gh"
string no default="h"

View File

@ -34,17 +34,21 @@ main(int argc, char* argv[])
{
gengetopt_args_info args;
if(cmdline_parser(argc,argv,&args) != 0) exit(1);
if(cmdline_parser(argc,argv,&args) != 0)
exit(1);
if(args.help_given) cmdline_parser_print_help ();
process_config_files(&args,argv[0]);
process_common_options(&args,argv[0]);
if(args.input_given)
if(!(inputf=fopen(args.input_arg,"r")))
fprintf(stderr,"dgp: input file not found: %s.\n", args.input_arg), exit(1);
// if(args.help_given) cmdline_parser_print_help ();
if(args.output_given)
if(!(outputf=fopen(args.output_arg,"w")))
fprintf(stderr,"dgp: cannot open output file: %s.\n", args.output_arg), exit(1);
// if(args.input_given)
// if(!(inputf=fopen(args.input_arg,"r")))
// fprintf(stderr,"dgp: input file not found: %s.\n", args.input_arg), exit(1);
// if(args.output_given)
// if(!(outputf=fopen(args.output_arg,"w")))
// fprintf(stderr,"dgp: cannot open output file: %s.\n", args.output_arg), exit(1);
if(!(grammarf=fopen(args.grammar_arg,"r")))
fprintf(stderr,"dgp: grammar file not found: %s.\n", args.grammar_arg), exit(1);