mgrLM // Enforce UserPhraseLM format consolidation on write.
This commit is contained in:
parent
37a96851ea
commit
df26a29324
|
@ -20,6 +20,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
|
|||
#import "mgrLangModel.h"
|
||||
#import "mgrLangModel_Privates.h"
|
||||
#import "vChewing-Swift.h"
|
||||
#import "LMConsolidator.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace vChewing;
|
||||
|
@ -267,6 +268,9 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
|
|||
[writeFile writeData:data];
|
||||
[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,
|
||||
// so we don't have to load data here.
|
||||
// [self loadUserPhrases];
|
||||
|
|
Loading…
Reference in New Issue