help
Last change
on this file since f5d3b20 was
b3179eb,
checked in by pawelk <pawelk@…>, 17 years ago
|
Dolozylismy dwie opcje do kora: wyswietlanie lub nie wynikow oraz wyswietlanie liczby najlepszych zmian.
git-svn-id: svn://atos.wmid.amu.edu.pl/utt@27 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
|
-
Property mode set to
100755
|
File size:
833 bytes
|
Line | |
---|
1 | #include <stdlib.h> |
---|
2 | #include <string.h> |
---|
3 | #include "common_cor.h" |
---|
4 | |
---|
5 | #define MAX_PATH_LENGTH 255 |
---|
6 | |
---|
7 | char dictionary[MAX_PATH_LENGTH]; |
---|
8 | char file_weights[MAX_PATH_LENGTH]; |
---|
9 | float threshold; |
---|
10 | bool show_scores = false; |
---|
11 | int result_count; |
---|
12 | |
---|
13 | void process_cor_options(gengetopt_args_info* args) |
---|
14 | { |
---|
15 | if(args->dictionary_given) |
---|
16 | { |
---|
17 | expand_path(args->dictionary_arg,dictionary); |
---|
18 | } |
---|
19 | else if (args->dictionary_home_given && args->language_given) |
---|
20 | { |
---|
21 | char buf[MAX_PATH_LENGTH]; |
---|
22 | expand_path(args->dictionary_home_arg, buf); |
---|
23 | sprintf(dictionary,"%s/%s/cor.bin",buf,args->language_arg); |
---|
24 | } |
---|
25 | |
---|
26 | expand_path(args->weights_arg, file_weights); |
---|
27 | |
---|
28 | threshold = args->threshold_arg; |
---|
29 | |
---|
30 | show_scores = args->show_scores_flag; |
---|
31 | |
---|
32 | if(args->count_given) { |
---|
33 | result_count = args->count_arg; |
---|
34 | } |
---|
35 | else { |
---|
36 | result_count = 0; |
---|
37 | } |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.