- Timestamp:
- 05/09/08 10:38:46 (17 years ago)
- Branches:
- master, help
- Children:
- 6ac84d8
- Parents:
- 9b57c4d
- git-author:
- obrebski <obrebski@…> (05/09/08 10:38:46)
- git-committer:
- obrebski <obrebski@…> (05/09/08 10:38:46)
- Location:
- app/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
app/src/dgp/cmdline_dgp.ggo
rdf77b87 r3748bd1 3 3 4 4 option "grammar" g "Grammar file" 5 string typestr="filename" default="dgp.dgp"5 string no typestr="filename" 6 6 7 7 option "long" l "Long output" -
app/src/dgp/dgc
radb4c8d r3748bd1 38 38 next unless length; 39 39 my ($name, $value) = split(/\s*=\s*/, $_, 2); 40 if(($name eq "cat file")or($name eq "c")){40 if(($name eq "categories")or($name eq "c")){ 41 41 $catfile=$value; 42 42 } 43 elsif(($name eq "dic file")or($name eq "d")){43 elsif(($name eq "dictionary")or($name eq "d")){ 44 44 $dicfile=$value; 45 45 } 46 elsif(($name eq "gram file")or($name eq "g")){46 elsif(($name eq "grammar")or($name eq "g")){ 47 47 $gramfile=$value; 48 48 } … … 61 61 62 62 GetOptions("help|h" => \$help, 63 "cat file|c=s" => \$catfile,64 "dic file|d=s" => \$dicfile,65 "gram file|g=s" => \$gramfile,63 "categories|c=s" => \$catfile, 64 "dictionary|d=s" => \$dicfile, 65 "grammar|g=s" => \$gramfile, 66 66 "outputfile|o=s" => \$outputfile); 67 68 my $homedir = $ENV{'HOME'}; 69 $catfile =~ s/~/$homedir/; 70 $dicfile =~ s/~/$homedir/; 71 $gramfile =~ s/~/$homedir/; 72 $outputfile =~ s/~/$homedir/; 73 67 74 68 75 if($help) … … 72 79 73 80 Options: 74 --cat file-c filename List of syntactic categories.75 --dic file -d filenameDictionary.76 --gram file-g filename List of grammar rules.77 --outputfile -o filename Output file name.81 --categories -c filename List of syntactic categories. 82 --dictionary -d filename Dictionary. 83 --grammar -g filename List of grammar rules. 84 --outputfile -o filename Output file name. 78 85 --help -h Help. 79 86 END -
app/src/dgp/grammar.hh
r0214596 r3748bd1 18 18 // enum CONSTR { SGL, OBL, LEFT, RIGHT, INIT, NONINIT, FIN, NONFIN }; 19 19 20 Grammar() : types_sz(0), cats_sz(0) { 20 Grammar() : types_sz(0), cats_sz(0) {} ; 21 21 22 22 int types_sz; -
app/src/dgp/main.cc
rdf77b87 r3748bd1 20 20 int segcount=0; 21 21 char seg_mnode[MAXSEGMENTS]; 22 char grammarfile[255]; 23 22 24 23 25 Grammar grammar; … … 41 43 process_common_options(&args,argv[0]); 42 44 43 // if(args.help_given) cmdline_parser_print_help (); 45 if(!args.grammar_given) 46 fprintf(stderr,"dgp: no grammar given\n"); 44 47 45 // if(args.input_given) 46 // if(!(inputf=fopen(args.input_arg,"r"))) 47 // fprintf(stderr,"dgp: input file not found: %s.\n", args.input_arg), exit(1); 48 expand_path(args.grammar_arg,grammarfile); 48 49 49 // if(args.output_given) 50 // if(!(outputf=fopen(args.output_arg,"w"))) 51 // fprintf(stderr,"dgp: cannot open output file: %s.\n", args.output_arg), exit(1); 52 53 if(!(grammarf=fopen(args.grammar_arg,"r"))) 54 fprintf(stderr,"dgp: grammar file not found: %s.\n", args.grammar_arg), exit(1); 50 if(!(grammarf=fopen(grammarfile,"r"))) 51 fprintf(stderr,"dgp: grammar file not found: %s.\n", grammarfile), exit(1); 55 52 56 53 if(args.debug_given) debug=true; -
app/src/dgp/mgraph.cc
r28e9ae0 r3748bd1 23 23 if(*cat) ++cat; 24 24 25 Cat::add(cat); 26 nodes[n].cat=cat; 25 // Cat::add(cat); 26 if(Cat::index(cat)>0) 27 nodes[n].cat=cat; 28 else 29 nodes[n].cat="NULL"; 27 30 28 31 nodes[n].pred.clear(); -
app/src/gph/gph
r19dfa5c r3748bd1 80 80 81 81 Options: 82 - p tag Process segments with this tag as nodes.83 - r tag Start new graph at this tag.84 - f filenameInput file.85 - o filenameOutput file.86 - iToggle interactive mode (default=off).82 --process=TYPE -p TYPE Process segments of type TYPE. 83 --reset=TYPE -r TYPE Start new graph at tags of type TYPE. 84 --inputfile=FILE -f FILE Input file. 85 --outputfile=FILE -o FILE Output file. 86 --interactive -i Toggle interactive mode (default=off). 87 87 END 88 88 ;
Note: See TracChangeset
for help on using the changeset viewer.