Changeset 6ac84d8 for app/src/gue
- Timestamp:
- 05/09/08 12:42:32 (17 years ago)
- Branches:
- master, help
- Children:
- 19760ef
- Parents:
- 3748bd1
- git-author:
- obrebski <obrebski@…> (05/09/08 12:42:32)
- git-committer:
- obrebski <obrebski@…> (05/09/08 12:42:32)
- Location:
- app/src/gue
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
app/src/gue/common_guess.cc
r40358d2 r6ac84d8 26 26 char buf[255]; 27 27 expand_path(args->dictionary_home_arg, buf); 28 sprintf(dictionary,"%s/%s/ lem.bin",buf,args->language_arg);28 sprintf(dictionary,"%s/%s/gue.bin",buf,args->language_arg); 29 29 if(file_accessible(dictionary)!=0) 30 30 { -
app/src/gue/main.cc
r10c74af r6ac84d8 13 13 #define W_PREF 0.4 14 14 15 15 16 int main(int argc, char** argv) { 16 17 … … 25 26 process_common_options(&args,argv[0]); 26 27 process_guess_options(&args); 27 28 29 // PONIÅ»EJ POPRZEDNI KOD (JUSTYNY)30 // //preliminary command-line parsing - for configuration file info only31 // gengetopt_args_info pre_args;32 33 // if (cmdline_parser(argc, argv, &pre_args) != 0)34 // exit(1);35 // if(pre_args.config_given){36 // printf("podano config: %s\n",pre_args.config_arg);37 // non_standard_config=1;38 // }39 40 41 // //configuration file 1 parsing42 // struct cmdline_parser_params *params;43 // params = cmdline_parser_params_init();44 // params->initialize = 1;45 // if(cmdline_parser_config_file(CONFIGFILE1,&args, params)!=0){46 // printf("System-wide configuration file parsing error!\n");47 // exit(1);48 // }49 50 // //configuration file 2 parsing-overriding51 // params->initialize=0;52 // params->override=1;53 // char* config2=(non_standard_config)?pre_args.config_arg:CONFIGFILE2;54 // if(cmdline_parser_config_file(config2,&args, params)!=0){55 // printf("User configuration file parsing error!\n");56 // return 1;57 // }58 59 // params->initialize=0;60 // params->override=1;61 // //params->check_required=1;62 63 // free(params);64 65 // //command-line options parsing-overriding66 // if (cmdline_parser(argc, argv, &args) != 0)67 // exit(1);68 69 28 70 29 char line[MAX_LINE]; … … 84 43 int start, len; 85 44 86 line[strlen(line)-1] = '\0';45 // line[strlen(line)-1] = '\0'; 87 46 88 47 if (!process_seg(line, args)) … … 119 78 120 79 count = 1; 80 81 tab.sort(); 121 82 122 83 while (count < tab.count() && count <= guess_count) … … 177 138 else 178 139 { 179 for (int i=0; i< tab.count(); ++i)140 for (int i=0; i< count; ++i) 180 141 { 181 142 // kolejne opisy - kolejne linie. 182 143 char* descp=desc; 183 descp += sprintf(desc, " %s%s,%s \n", output_field_prefix, tab[i].lemma(), tab[i].descr());144 descp += sprintf(desc, " %s%s,%s", output_field_prefix, tab[i].lemma(), tab[i].descr()); 184 145 if(weights) descp += sprintf(descp,":%d",(int)tab[i].w_suf()); 146 descp += sprintf(descp,"\n"); 185 147 strcpy(outline,line); 186 148 outline[strlen(outline)-1]='\0';
Note: See TracChangeset
for help on using the changeset viewer.