source: app/src/gue/common_guess.cc @ 8abee07

help
Last change on this file since 8abee07 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: 954 bytes
Line 
1#include <stdlib.h>
2#include <string.h>
3#include "common_guess.h"
4
5int guess_count=0;
6double delta=0.1;
7int cut_off=100;
8char dictionary[255];
9bool per_info=false;
10bool weights=true;
11
12void process_guess_options(gengetopt_args_info* args)
13{
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[255];
22      expand_path(args->dictionary_home_arg, buf);
23      sprintf(dictionary,"%s/%s/lem.bin",buf,args->language_arg);
24    }
25
26  if(args->guess_count_given)
27    guess_count=args->guess_count_arg;
28  else
29    guess_count=0;
30
31  if(guess_count==0)
32    guess_count=100;
33
34  if(args->delta_given)
35    delta=args->delta_arg;
36  else
37    delta=0.1;
38
39  if(args->cut_off_given)
40    cut_off=args->cut_off_arg;
41  else
42    cut_off=100;
43
44  if(args->per_info_given)
45    per_info=args->per_info_flag;
46
47  if(args->weights_given)
48    weights=false;
49
50}
Note: See TracBrowser for help on using the repository browser.