help
Line | |
---|
1 | #include <stdlib.h> |
---|
2 | #include <string.h> |
---|
3 | #include "common_lem.h" |
---|
4 | |
---|
5 | char dictionary[255]; |
---|
6 | |
---|
7 | void 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.