diff --git a/OpusCatMTEngine/Properties/AssemblyInfo.cs b/OpusCatMTEngine/Properties/AssemblyInfo.cs index 3136454..bdee8f9 100644 --- a/OpusCatMTEngine/Properties/AssemblyInfo.cs +++ b/OpusCatMTEngine/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.3")] -[assembly: AssemblyFileVersion("1.1.0.3")] +[assembly: AssemblyVersion("1.1.0.4")] +[assembly: AssemblyFileVersion("1.1.0.4")] diff --git a/OpusCatMTEngine/StartMosesBpeMultilingualMtPipe.bat b/OpusCatMTEngine/StartMosesBpeMultilingualMtPipe.bat index 6571fb7..4119e3b 100644 --- a/OpusCatMTEngine/StartMosesBpeMultilingualMtPipe.bat +++ b/OpusCatMTEngine/StartMosesBpeMultilingualMtPipe.bat @@ -1,5 +1,6 @@ @ set modeldir=%1 @ set sourcelang=%2 +@ set targetlang=%3 @ chcp 65001 > nul @ title OPUS-CAT MT engine - %1 -@ Preprocessing\mosesprocessor.exe --stage preprocess --sourcelang %sourcelang% --tcmodel %modeldir%\source.tcmodel | Preprocessing\apply_bpe.exe -c %modeldir%\source.bpe | powershell -Command "$input | %%{'>>%targetlang%<< ' + $_}" | Marian\marian.exe decode --log-level=warn -c %modeldir%\decoder.yml | Preprocessing\process.exe --stage postprocess --targetlang fi \ No newline at end of file +@ Preprocessing\mosesprocessor.exe --stage preprocess --sourcelang %sourcelang% --tcmodel %modeldir%\source.tcmodel | Preprocessing\apply_bpe.exe -c %modeldir%\source.bpe | powershell -Command "$input | %%{'>>%targetlang%<< ' + $_}" | Marian\marian.exe decode --log-level=warn -c %modeldir%\decoder.yml | Preprocessing\process.exe --stage postprocess --targetlang %targetlang% \ No newline at end of file diff --git a/OpusCatMTEngine/TranslationDbHelper.cs b/OpusCatMTEngine/TranslationDbHelper.cs index 4d57474..80b6cb6 100644 --- a/OpusCatMTEngine/TranslationDbHelper.cs +++ b/OpusCatMTEngine/TranslationDbHelper.cs @@ -86,7 +86,7 @@ internal static void SetupTranslationDb() OpusCatMTEngine.Properties.Resources.App_ConfirmDbCaption, MessageBoxButton.OKCancel, MessageBoxImage.Question); - if (result == MessageBoxResult.Yes) + if (result == MessageBoxResult.OK) { translationDb.Delete(); } @@ -105,7 +105,10 @@ internal static void SetupTranslationDb() } //Remove old translation from the db (time period can be set in settings) - TranslationDbHelper.RemoveOldTranslations(); + if (OpusCatMTEngineSettings.Default.CacheMtInDatabase) + { + TranslationDbHelper.RemoveOldTranslations(); + } } private static void RemoveOldTranslations() @@ -116,7 +119,7 @@ private static void RemoveOldTranslations() using (var m_dbConnection = new SQLiteConnection($"Data Source={translationDb};Version=3;")) { m_dbConnection.Open(); - //TODO: why does the parameter not work for days? + using (SQLiteCommand deleteOld = new SQLiteCommand("DELETE FROM translations WHERE additiondate <= date('now',@period)", m_dbConnection)) {