lem, gue, kor, cor sprawdzaja czy slownik istnieje i da sie otworzyc

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@47 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
This commit is contained in:
obrebski 2008-05-08 14:38:00 +00:00
parent 0e3df7e06a
commit 40358d23e5
6 changed files with 47 additions and 5 deletions

View File

@ -1,16 +1,16 @@
BARDZO WAZNE:
* zawieszanie sie lema dla wyrazow z pola -I (np. kor)
* komunikaty o nieznalezieniu slownika (lem) [TO]
* zawieszanie sie lema dla wyrazow z pola -I (np. kor) [ZROBIONE,TO]
* komunikaty o nieznalezieniu slownika (lem) [ZROBIONE, TO]
WAZNE:
* zamienic kota na lepszego (Kubis) [TO]
* sen - unikać dwukrotnego wstawiania BOSów i EOSów
* polaczyc sen'y [TO]
* programy z atrybutyem input-field: funkcja process_seg zwraca false, gdy nie ma pola podanego po -I
* programy z atrybutyem input-field: funkcja process_seg zwraca false, gdy nie ma pola podanego po -I [ZROBIONE,TO]
* generowanie i sprawdzanie zaleznosci dla tarballa [PK]
* przygotowanie dystrybujcji slownikow [PK]
* (zrobione dla ser?) Nazwy pmdb2re -> pmdb.tag2re (grp, ser).
* (zrobione dla ser?) Nazwy pmdb2re -> pmdb.tag2re (grp, ser). [ZROBIONE,TO]
* 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
@ -18,4 +18,6 @@ WAZNE:
find: /home/to/work/utt/lang/dist/tarball/utt-0.9.2/share/utt/pl_PL.UTF-8/.svn: Nie ma takiego pliku ani katalogu
find: /home/to/work/utt/lang/dist/tarball/utt-0.9.2/share/utt/pl_PL.ISO-8859-2/.svn: Nie ma takiego pliku ani katalogu
* przyspieszyć process_seg() -> obliczanie prefiksów pól z opcji -s i -S raz na poczatku programu, a nie w kolko
* kor: nie dziala opcja distance
* zunifikowac opcje cor i kor

View File

@ -194,7 +194,7 @@ void process_common_options(gengetopt_args_info* args, char* argv0)
// sprawdza istnienie pliku
int file_accessible(const char* path) {
return access(path, R_OK);
return access(path, R_OK);
}
// sprawdza istnienie pliku konfiguracyjnego

View File

@ -9,11 +9,21 @@ void process_cor_options(gengetopt_args_info* args)
if(args->dictionary_given)
{
expand_path(args->dictionary_arg,dictionary);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
else if (args->dictionary_home_given && args->language_given)
{
char buf[255];
expand_path(args->dictionary_home_arg, buf);
sprintf(dictionary,"%s/%s/cor.bin",buf,args->language_arg);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
}

View File

@ -15,12 +15,22 @@ void process_guess_options(gengetopt_args_info* args)
if(args->dictionary_given)
{
expand_path(args->dictionary_arg,dictionary);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
else if (args->dictionary_home_given && args->language_given)
{
char buf[255];
expand_path(args->dictionary_home_arg, buf);
sprintf(dictionary,"%s/%s/lem.bin",buf,args->language_arg);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
if(args->guess_count_given)

View File

@ -15,12 +15,22 @@ void process_cor_options(gengetopt_args_info* args)
if(args->dictionary_given)
{
expand_path(args->dictionary_arg,dictionary);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
else if (args->dictionary_home_given && args->language_given)
{
char buf[MAX_PATH_LENGTH];
expand_path(args->dictionary_home_arg, buf);
sprintf(dictionary,"%s/%s/cor.bin",buf,args->language_arg);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
expand_path(args->weights_arg, file_weights);

View File

@ -10,12 +10,22 @@ void process_lem_options(gengetopt_args_info* args)
if(args->dictionary_given)
{
expand_path(args->dictionary_arg,dictionary);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
else if (args->dictionary_home_given && args->language_given)
{
char buf[255];
expand_path(args->dictionary_home_arg, buf);
sprintf(dictionary,"%s/%s/lem.bin",buf,args->language_arg);
if(file_accessible(dictionary)!=0)
{
fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
exit(1);
}
}
}