[irstlm] 01/78: added default for a few variables
Giulio Paci
giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:46:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
giuliopaci-guest pushed a commit to tag adaptiveLM.v0.10
in repository irstlm.
commit bf7616a3bc5f6d87f57a1dd39fbc1f96fa5e6d41
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date: Mon Nov 2 08:31:55 2015 +0100
added default for a few variables
---
src/compile-lm.cpp | 4 ++--
src/dtsel.cpp | 2 +-
src/interpolate-lm.cpp | 4 ++--
src/lmContainer.cpp | 2 +-
src/lmtable.cpp | 2 +-
src/score-lm.cpp | 4 ++--
src/tlm.cpp | 2 +-
src/util.h | 2 ++
8 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/compile-lm.cpp b/src/compile-lm.cpp
index 5ed6cbf..0ad6707 100644
--- a/src/compile-lm.cpp
+++ b/src/compile-lm.cpp
@@ -73,8 +73,8 @@ int main(int argc, char **argv)
int debug = 0;
bool memmap = false;
- int requiredMaxlev = 1000;
- int dub = 10000000;
+ int requiredMaxlev = IRSTLM_REQUIREDMAXLEV_DEFAULT;
+ int dub = IRSTLM_DUB_DEFAULT;
int randcalls = 0;
float ngramcache_load_factor = 0.0;
float dictionary_load_factor = 0.0;
diff --git a/src/dtsel.cpp b/src/dtsel.cpp
index 79caab5..b52818a 100644
--- a/src/dtsel.cpp
+++ b/src/dtsel.cpp
@@ -131,7 +131,7 @@ int main(int argc, char **argv)
int minfreq=2; //frequency threshold for dictionary pruning (optional)
int ngsz=0; // n-gram size
- int dub=10000000; //upper bound of true vocabulary
+ int dub=IRSTLM_DUB_DEFAULT; //upper bound of true vocabulary
int model=2; //data selection model: 1 only in-domain cross-entropy,
//2 cross-entropy difference.
int cv=1; //cross-validation parameter: 1 only in-domain cross-entropy,
diff --git a/src/interpolate-lm.cpp b/src/interpolate-lm.cpp
index d3071b3..3d0a3ec 100644
--- a/src/interpolate-lm.cpp
+++ b/src/interpolate-lm.cpp
@@ -82,8 +82,8 @@ int main(int argc, char **argv)
int order = 0;
int debug = 0;
int memmap = 0;
- int requiredMaxlev = 1000;
- int dub = 10000000;
+ int requiredMaxlev = IRSTLM_REQUIREDMAXLEV_DEFAULT;
+ int dub = IRSTLM_DUB_DEFAULT;
float ngramcache_load_factor = 0.0;
float dictionary_load_factor = 0.0;
diff --git a/src/lmContainer.cpp b/src/lmContainer.cpp
index 4d7a756..60f7927 100644
--- a/src/lmContainer.cpp
+++ b/src/lmContainer.cpp
@@ -69,7 +69,7 @@ inline void error(const char* message)
lmContainer::lmContainer()
{
- requiredMaxlev=1000;
+ requiredMaxlev=IRSTLM_REQUIREDMAXLEV_DEFAULT;
lmtype=_IRSTLM_LMUNKNOWN;
maxlev=0;
}
diff --git a/src/lmtable.cpp b/src/lmtable.cpp
index 84c31dd..fc7852e 100644
--- a/src/lmtable.cpp
+++ b/src/lmtable.cpp
@@ -100,7 +100,7 @@ namespace irstlm {
#endif
memmap=0;
- requiredMaxlev=1000;
+ requiredMaxlev=IRSTLM_REQUIREDMAXLEV_DEFAULT;
isPruned=false;
isInverted=false;
diff --git a/src/score-lm.cpp b/src/score-lm.cpp
index 4cb8708..5b595dc 100644
--- a/src/score-lm.cpp
+++ b/src/score-lm.cpp
@@ -59,8 +59,8 @@ void usage(const char *msg = 0)
int main(int argc, char **argv)
{
int mmap = 0;
- int dub = 10000000;
- int requiredMaxlev = 1000;
+ int dub = IRSTLM_DUB_DEFAULT;
+ int requiredMaxlev = IRSTLM_REQUIREDMAXLEV_DEFAULT;
char *lm = NULL;
bool help=false;
diff --git a/src/tlm.cpp b/src/tlm.cpp
index 3daefb7..0f70c6d 100644
--- a/src/tlm.cpp
+++ b/src/tlm.cpp
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
bool backoff=false; //back-off or interpolation
int lmtype=0;
- int dub=10000000; //dictionary upper bound
+ int dub=IRSTLM_DUB_DEFAULT; //dictionary upper bound
int size=0; //lm size
int interactive=0;
diff --git a/src/util.h b/src/util.h
index 4d85170..34db77a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -21,6 +21,8 @@ using namespace std;
#define LMTMAXLEV 20
#define MAX_LINE 100000
+#define IRSTLM_DUB_DEFAULT 10000000
+#define IRSTLM_REQUIREDMAXLEV_DEFAULT 1000
//0.000001 = 10^(-6)
//0.000000000001 = 10^(-12)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git
More information about the debian-science-commits
mailing list