Skip to content

Commit f343824

Browse files
author
SeH
committed
updates pulled from cmusphinx/sphinx4 master
1 parent 7548c07 commit f343824

File tree

10 files changed

+238
-22
lines changed

10 files changed

+238
-22
lines changed

sphinx4-core/src/main/java/edu/cmu/sphinx/jsgf/JSGFGrammar.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,13 @@ public JSGFGrammar(URL baseURL, String grammarName,
201201
Dictionary dictionary) {
202202
super(showGrammar, optimizeGrammar, addSilenceWords, addFillerWords,
203203
dictionary);
204+
205+
logger = Logger.getLogger(getClass().getName());
204206
logMath = LogMath.getLogMath();
207+
205208
this.baseURL = baseURL;
206209
this.grammarName = grammarName;
207210
loadGrammar = true;
208-
logger = Logger.getLogger(getClass().getName());
209211
}
210212

211213
public JSGFGrammar() {
@@ -222,10 +224,13 @@ public JSGFGrammar() {
222224
@Override
223225
public void newProperties(PropertySheet ps) throws PropertyException {
224226
super.newProperties(ps);
227+
logger = ps.getLogger();
228+
logMath = LogMath.getLogMath();
229+
225230
baseURL = ConfigurationManagerUtils.getResource(PROP_BASE_GRAMMAR_URL,
226231
ps);
227-
logger = ps.getLogger();
228232
grammarName = ps.getString(PROP_GRAMMAR_NAME);
233+
229234
loadGrammar = true;
230235
}
231236

sphinx4-core/src/main/java/edu/cmu/sphinx/linguist/language/grammar/FSTGrammar.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ protected GrammarNode createGrammar(String bogusText)
127127

128128
public FSTGrammar(String path, boolean showGrammar, boolean optimizeGrammar, boolean addSilenceWords, boolean addFillerWords, Dictionary dictionary) {
129129
super(showGrammar,optimizeGrammar,addSilenceWords,addFillerWords,dictionary);
130-
this.path = path;
131130
logMath = LogMath.getLogMath();
131+
132+
this.path = path;
132133
}
133134

134135
public FSTGrammar() {
@@ -144,6 +145,7 @@ public FSTGrammar() {
144145
@Override
145146
public void newProperties(PropertySheet ps) throws PropertyException {
146147
super.newProperties(ps);
148+
logMath = LogMath.getLogMath();
147149

148150
path = ps.getString(PROP_PATH);
149151
}

sphinx4-core/src/main/java/edu/cmu/sphinx/linguist/language/grammar/SimpleWordListGrammar.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public void newProperties(PropertySheet ps) throws PropertyException {
7979

8080
path = ps.getString(PROP_PATH);
8181
isLooping = ps.getBoolean(PROP_LOOP);
82+
logMath = LogMath.getLogMath();
8283
}
8384

8485

sphinx4-core/src/test/resources/edu/cmu/sphinx/jsgf/test/weights.gram

Whitespace-only changes.

sphinx4-core/src/test/resources/edu/cmu/sphinx/linguist/language/ngram/arpa/test.dic

Whitespace-only changes.

sphinx4-core/src/test/resources/edu/cmu/sphinx/linguist/language/ngram/arpa/test.lm

Whitespace-only changes.

0 commit comments

Comments
 (0)