mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Disable debug flag
This commit is contained in:
parent
cd3d5a284f
commit
001f1eb442
@ -296,7 +296,7 @@ public class LanguageModelFacilitator(
|
||||
|
||||
val lastIdx = wordCtx.lastIndexOf(committedNgramCtx)
|
||||
if(lastIdx == -1) {
|
||||
println("addToHistory: extraction failed, couldn't find ngram ctx in full ctx")
|
||||
//println("addToHistory: extraction failed, couldn't find ngram ctx in full ctx")
|
||||
return
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ public class LanguageModelFacilitator(
|
||||
lastIdx + committedNgramCtx.length
|
||||
)
|
||||
if(misspelledWord.isNotBlank() && (!(misspelledWord.startsWith(" ") || committedNgramCtx == " ") || misspelledWord.endsWith(" ") || misspelledWord.trim().contains(" "))) {
|
||||
println("addToHistory: extraction failed bad context. wordCtx=[$wordCtx] -- committedNgramCtx=[$committedNgramCtx] -- word=[$word] -- fullNgram=[$ngramContext]")
|
||||
//println("addToHistory: extraction failed bad context. wordCtx=[$wordCtx] -- committedNgramCtx=[$committedNgramCtx] -- word=[$word] -- fullNgram=[$ngramContext]")
|
||||
return
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ public class LanguageModelFacilitator(
|
||||
}
|
||||
|
||||
historyLog.add(logToAdd)
|
||||
println("addToHistory: Adding $logToAdd")
|
||||
//println("addToHistory: Adding $logToAdd")
|
||||
}
|
||||
|
||||
public fun unlearnFromHistory(
|
||||
@ -358,9 +358,9 @@ public class LanguageModelFacilitator(
|
||||
}
|
||||
|
||||
if(logToRemove == -1) {
|
||||
println("addToHistory: UNLEARN Couldn't find key $keyToSearch")
|
||||
//println("addToHistory: UNLEARN Couldn't find key $keyToSearch")
|
||||
} else {
|
||||
println("addToHistory: Unlearning ${historyLog[logToRemove]}")
|
||||
//println("addToHistory: Unlearning ${historyLog[logToRemove]}")
|
||||
historyLog.removeAt(logToRemove)
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ LOCAL_ARM_NEON := true
|
||||
############ some local flags
|
||||
# If you change any of those flags, you need to rebuild both libjni_latinime_common_static
|
||||
# and the shared library that uses libjni_latinime_common_static.
|
||||
FLAG_DBG ?= true
|
||||
FLAG_DBG ?= false
|
||||
FLAG_DO_PROFILE ?= false
|
||||
|
||||
######################################
|
||||
|
@ -136,12 +136,12 @@ namespace latinime {
|
||||
// TODO: Callback for progress
|
||||
static void xlm_AdapterTrainer_train(JNIEnv *env, jobject instance, jlong statePtr) {
|
||||
jclass clazz = env->GetObjectClass(instance);
|
||||
assert(clazz);
|
||||
ASSERT(clazz);
|
||||
|
||||
jmethodID progressMethodId = env->GetMethodID(clazz, "emitProgress", "(F)V");
|
||||
jmethodID lossMethodId = env->GetMethodID(clazz, "emitLoss", "(F)V");
|
||||
assert(progressMethodId);
|
||||
assert(lossMethodId);
|
||||
ASSERT(progressMethodId);
|
||||
ASSERT(lossMethodId);
|
||||
|
||||
auto *state = reinterpret_cast<AdapterTrainerState *>(statePtr);
|
||||
state->env = env;
|
||||
|
Loading…
Reference in New Issue
Block a user