mgrLM // Enforce UserPhraseLM format consolidation on write.
This commit is contained in:
parent
8fba6c5315
commit
7cd525afe8
|
@ -20,6 +20,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
|
||||||
#import "mgrLangModel.h"
|
#import "mgrLangModel.h"
|
||||||
#import "mgrLangModel_Privates.h"
|
#import "mgrLangModel_Privates.h"
|
||||||
#import "vChewing-Swift.h"
|
#import "vChewing-Swift.h"
|
||||||
|
#import "LMConsolidator.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace vChewing;
|
using namespace vChewing;
|
||||||
|
@ -267,6 +268,9 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
|
||||||
[writeFile writeData:data];
|
[writeFile writeData:data];
|
||||||
[writeFile closeFile];
|
[writeFile closeFile];
|
||||||
|
|
||||||
|
// We enforce the format consolidation here, since the pragma header will let the UserPhraseLM bypasses the consolidating process on load.
|
||||||
|
LMConsolidator::ConsolidateContent([path UTF8String], Preferences.shouldAutoSortUserPhrasesAndExclListOnLoad, false);
|
||||||
|
|
||||||
// We use FSEventStream to monitor the change of the user phrase folder,
|
// We use FSEventStream to monitor the change of the user phrase folder,
|
||||||
// so we don't have to load data here.
|
// so we don't have to load data here.
|
||||||
// [self loadUserPhrases];
|
// [self loadUserPhrases];
|
||||||
|
|
Loading…
Reference in New Issue