source: app/src/lem/common_lem.cc @ 25ae32e

help
Last change on this file since 25ae32e was 25ae32e, checked in by obrebski <obrebski@…>, 16 years ago

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@4 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100644
File size: 978 bytes
Line 
1#include <stdlib.h>
2#include <string.h>
3#include "common_lem.h"
4
5char dictionary[255];
6
7void process_lem_options(gengetopt_args_info* args)
8{
9
10  if(args->dictionary_given)
11    {
12      expand_path(args->dictionary_arg,dictionary);
13    }
14  else if (args->dictionary_home_given && args->language_given)
15    {
16      char buf[255];
17      expand_path(args->dictionary_home_arg, buf);
18      sprintf(dictionary,"%s/%s/lem.bin",buf,args->language_arg);
19    }
20}
21
22
23// STARE
24//  if(args.dictionary_given)
25//    strcpy(dictionary, args.dictionary_arg);
26//  else {
27//     char path[256];
28//     //sprintf(path, "/etc/utt/data/%s/%s", args.locale_arg, DICT_FILE);
29//     //if (file_accessible(path) == 0)
30//     //  strcpy(dictionary, path);
31//     //else {
32//       sprintf(path, "%s/%s", utt_dir, DICT_FILE);
33//       if (file_accessible(path) == 0)
34//      strcpy(dictionary, path);
35//       else {
36//      fprintf(stderr, "Cannot find dictionary!\n");
37//      exit(1);
38//       }
39//       //}
40//   }
41
Note: See TracBrowser for help on using the repository browser.