Changeset 6ac84d8
- 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
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
app/TODO
r9b57c4d r6ac84d8 1 1 BARDZO WAZNE: 2 2 * przemyslec sposob wybierania jezyka / slownika po zainstalowaniu roznych dystrybucji [PK, TO] 3 * gue nie sortuje wynikow, opcja weights dziala na odwrot 3 4 4 5 WAZNE: … … 13 14 * kor: nie dziala opcja distance 14 15 * zunifikowac opcje cor i kor 15 -
app/conf/gue.conf
ra5fdde9 r6ac84d8 11 11 # parameter_name [=] value 12 12 # 13 dictionary-home = PATH_PREFIX/share/utt 14 process = W -
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'; -
app/src/lib/word.cc
rac7d970 r6ac84d8 16 16 lemd[i]='\0'; 17 17 if(isdigit(lemd[0])) 18 fullform(f,lemd,l); // je ¶li lemat zakodowany18 fullform(f,lemd,l); // je¶li lemat zakodowany 19 19 else 20 strcpy(l,lemd); // je ¶li lemat w pe³nej postaci20 strcpy(l,lemd); // je¶li lemat w pe³nej postaci 21 21 strcpy(d,de+i+1); 22 22 } … … 25 25 bool Word::cmp_w(Word a, Word b) { 26 26 return (a.w_suf() > b.w_suf()); 27 } 28 //--------------------------------------------------------------------------- 29 bool Word::cmp_w_rev(Word a, Word b) { 30 return (a.w_suf() < b.w_suf()); 31 } 32 //--------------------------------------------------------------------------- 33 bool cmp_w_fun(Word a, Word b) { 34 return (a.w_suf() > b.w_suf()); 35 } 36 //--------------------------------------------------------------------------- 37 bool cmp_w_rev_fun(Word a, Word b) { 38 return (a.w_suf() < b.w_suf()); 27 39 } 28 40 //--------------------------------------------------------------------------- … … 110 122 void Words::sort() { 111 123 std::sort(tab.begin(), tab.end(), Word::cmp_w); 124 } 125 126 //--------------------------------------------------------------------------- 127 void Words::sort_rev() { 128 std::sort(tab.begin(), tab.end(), cmp_w_rev_fun); 112 129 } 113 130 -
app/src/lib/word.h
rac7d970 r6ac84d8 40 40 public: 41 41 static bool cmp_w(Word a, Word b); 42 static bool cmp_w_rev(Word a, Word b); 42 43 43 44 Word() : _len_suf(-1) { *f='\0'; returned=0; }; … … 104 105 105 106 //--------------------------------------------------------------------------- 107 108 109 110 111 bool cmp_w_fun(Word a, Word b); 112 bool cmp_w_rev_fun(Word a, Word b); 113 114 106 115 //--------------------------------------------------------------------------- 107 116 //--------------------------------------------------------------------------- … … 133 142 134 143 void sort(); 144 void sort_rev(); 135 145 136 146 void prn(ostream& os);
Note: See TracChangeset
for help on using the changeset viewer.