summaryrefslogtreecommitdiff
path: root/audio/festival/patches/patch-speech__tools_include_EST__Ngrammar.h
blob: c4412127d68940b5d384426da689309e40eb4cff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$NetBSD: patch-speech__tools_include_EST__Ngrammar.h,v 1.2 2013/07/18 20:19:51 joerg Exp $

--- speech_tools/include/EST_Ngrammar.h.orig	2013-07-17 14:46:59.000000000 +0000
+++ speech_tools/include/EST_Ngrammar.h
@@ -538,18 +538,18 @@ public:
 						     double floor);
     friend EST_write_status save_ngram_htk_ascii(const EST_String filename, 
 						 EST_Ngrammar &n,
-						 double floor=0.0);
+						 double floor);
 
     //friend EST_write_status save_ngram_htk_binary(const EST_String filename, 
     //					  EST_Ngrammar &n);
     friend EST_write_status save_ngram_cstr_ascii(const EST_String filename, 
 						  EST_Ngrammar &n,
-						  const bool trace=false,
-						  double floor=0.0);
+						  const bool trace,
+						  double floor);
     friend EST_write_status save_ngram_cstr_bin(const EST_String filename, 
 						EST_Ngrammar &n, 
-						const bool trace=false,
-						double floor=0.0);
+						const bool trace,
+						double floor);
     friend EST_write_status save_ngram_arpa(const EST_String filename, 
 					    EST_Ngrammar &n);
     friend EST_write_status save_ngram_arpa_sub(ostream *ost, 
@@ -561,11 +561,11 @@ public:
     // Auxiliary functions
     
     // smoothing
-friend void frequency_of_frequencies(EST_DVector &ff, EST_Ngrammar &n,int this_order=0);
-friend void map_frequencies(EST_Ngrammar &n, const EST_DVector &map, const int this_order=0);
-friend bool Good_Turing_smooth(EST_Ngrammar &n, int maxcount, int mincount=0);
+friend void frequency_of_frequencies(EST_DVector &ff, EST_Ngrammar &n,int this_order);
+friend void map_frequencies(EST_Ngrammar &n, const EST_DVector &map, const int this_order);
+friend bool Good_Turing_smooth(EST_Ngrammar &n, int maxcount, int mincount);
 friend void Good_Turing_discount(EST_Ngrammar &ngrammar, const int maxcount,
-				 const double default_discount=0.5);
+				 const double default_discount);
 
 friend void fs_build_backoff_ngrams(EST_Ngrammar *backoff_ngrams,
 				    EST_Ngrammar &ngram);
@@ -584,6 +584,12 @@ friend class EST_BackoffNgrammar;
     
 };
 
+void frequency_of_frequencies(EST_DVector &ff, EST_Ngrammar &n,int this_order=0);
+void map_frequencies(EST_Ngrammar &n, const EST_DVector &map, const int this_order=0);
+bool Good_Turing_smooth(EST_Ngrammar &n, int maxcount, int mincount=0);
+void Good_Turing_discount(EST_Ngrammar &ngrammar, const int maxcount,
+				 const double default_discount=0.5);
+
 void Ngram_freqsmooth(EST_Ngrammar &ngram,
 		      int smooth_thresh1,
 		      int smooth_thresh2);