[dasher] Fix non-Chinese language models broken by Chinese Dasher.
- From: Patrick Welche <pwelche src gnome org>
- To: svn-commits-list gnome org
- Subject: [dasher] Fix non-Chinese language models broken by Chinese Dasher.
- Date: Fri, 3 Jul 2009 11:48:59 +0000 (UTC)
commit 86403d044beef60e5f71ac6bce0da4582613518e
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Fri Jul 3 12:48:11 2009 +0100
Fix non-Chinese language models broken by Chinese Dasher.
Also reinstates learning-as-you-write, though not for Chinese.
ChangeLog | 1 +
Src/DasherCore/AlphabetManager.cpp | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b524bd4..fdf7046 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2009-07-03 Alan Lawrence <acl33 inf phy cam ac uk>
* Update MacOS project files for refactorings and Chinese Dasher.
+ * Fix non-Chinese language models broken by Chinese Dasher.
2009-07-03 Patrick Welche <prlw1 cam ac uk>
diff --git a/Src/DasherCore/AlphabetManager.cpp b/Src/DasherCore/AlphabetManager.cpp
index bdcb5cf..7ebbf47 100644
--- a/Src/DasherCore/AlphabetManager.cpp
+++ b/Src/DasherCore/AlphabetManager.cpp
@@ -305,7 +305,7 @@ CDasherNode *CAlphabetManager::CreateSymbolNode(CDasherNode *pParent, symbol iSy
else{
CLanguageModel::Context iContext;
iContext = m_pLanguageModel->CloneContext(pParentData->iContext);
- //m_pLanguageModel->EnterSymbol(iContext, iSymbol);
+ m_pLanguageModel->EnterSymbol(iContext, iSymbol); // TODO: Don't use symbols?
pNodeUserData->iContext = iContext;
}
@@ -529,8 +529,9 @@ CDasherNode *CAlphabetManager::RebuildParent(CDasherNode *pNode) {
void CAlphabetManager::SetFlag(CDasherNode *pNode, int iFlag, bool bValue) {
switch(iFlag) {
case NF_COMMITTED:
- if(bValue && !pNode->GetFlag(NF_GAME) && m_pInterface->GetBoolParameter(BP_LM_ADAPTIVE))
- //static_cast<SAlphabetData *>(pNode->m_pUserData)->pLanguageModel->LearnSymbol(m_iLearnContext, static_cast<SAlphabetData *>(pNode->m_pUserData)->iSymbol);
+ if(bValue && !pNode->GetFlag(NF_GAME) && m_pInterface->GetBoolParameter(BP_LM_ADAPTIVE)
+ && m_iConversionID!=2)
+ static_cast<SAlphabetData *>(pNode->m_pUserData)->pLanguageModel->LearnSymbol(m_iLearnContext, static_cast<SAlphabetData *>(pNode->m_pUserData)->iSymbol);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]