Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82306 --- Ship it! Three minor things left, this is looking really good! Do you have commit rights? If so, clean it up and push it. Otherwise, I or someone of us can do that for you then. src/plugins/voikko/voikkodict.cpp (line 144) https://git.reviewboard.kde.org/r/124282/#comment56673 call `reserve` on it in the ctor with a decent size (256?) src/plugins/voikko/voikkodict.cpp (line 147) https://git.reviewboard.kde.org/r/124282/#comment56674 style: Foo(...) Q_DECL_NOEXCEPT : q(...) , m_...(...) { ... } src/plugins/voikko/voikkodict.cpp (line 267) https://git.reviewboard.kde.org/r/124282/#comment56675 same as above, with the placement of the : - Milian Wolff On July 9, 2015, 10:41 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 9, 2015, 10:41 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82323 --- Ship it! Ship It! - Jesse Jaara On heinä 10, 2015, 11:15 ap, Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 10, 2015, 11:15 ap) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- File Attachments 0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/174028b1-4e2b-454d-b15e-fdb4f2e44db6__0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch 0002-Implement-Voikko-based-spell-checker-Sonnet-Speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8c0e2295-f19b-49e9-bc7d-11576cb167c5__0002-Implement-Voikko-based-spell-checker-Sonnet-SpellerP.patch 0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/1d8107b2-a1b2-43a8-b0c6-eda5023a5144__0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch 0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8177a1d7-f9d4-4b0c-a602-25d8f77c5472__0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 10, 2015, 11:15 ap) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- Final patchset ready for pushing to master. I have no commit right myself so please go ahead and deliver the code to it's rightfull place. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- File Attachments (updated) 0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/174028b1-4e2b-454d-b15e-fdb4f2e44db6__0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch 0002-Implement-Voikko-based-spell-checker-Sonnet-Speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8c0e2295-f19b-49e9-bc7d-11576cb167c5__0002-Implement-Voikko-based-spell-checker-Sonnet-SpellerP.patch 0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/1d8107b2-a1b2-43a8-b0c6-eda5023a5144__0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch 0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8177a1d7-f9d4-4b0c-a602-25d8f77c5472__0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 10, 2015, 12:11 p.m.) Status -- This change has been marked as submitted. Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- Submitted with commit 30d28a41737140ef69369d5c84d9bcd6a4321cdb by Milian Wolff on behalf of Jesse Jaara to branch master. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- File Attachments 0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/174028b1-4e2b-454d-b15e-fdb4f2e44db6__0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch 0002-Implement-Voikko-based-spell-checker-Sonnet-Speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8c0e2295-f19b-49e9-bc7d-11576cb167c5__0002-Implement-Voikko-based-spell-checker-Sonnet-SpellerP.patch 0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/1d8107b2-a1b2-43a8-b0c6-eda5023a5144__0003-Implement-Sonnet-Client-factory-for-Voikko-spell-che.patch 0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/8177a1d7-f9d4-4b0c-a602-25d8f77c5472__0004-Add-in-CMake-bits-to-enable-building-of-Voikko-plugi.patch Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 10, 2015, 10:41 ap) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- * : on long ctors goes to the next line * Reserve some initial bytes for wchar_t string conversion buffer. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs (updated) - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 10, 2015, 11:12 ap) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- File Attachments (updated) 0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch https://git.reviewboard.kde.org/media/uploaded/files/2015/07/10/174028b1-4e2b-454d-b15e-fdb4f2e44db6__0001-Define-QLoggingCategory-for-for-Voikko-based-speller.patch Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82252 --- some style nitpicks from my side, but it looks very good already - nice work! src/plugins/voikko/voikkoclient.cpp (line 28) https://git.reviewboard.kde.org/r/124282/#comment56631 here and elsewhere: the Q_FUNC_INFO is not required src/plugins/voikko/voikkodict.cpp (line 38) https://git.reviewboard.kde.org/r/124282/#comment56632 please wrap these in functions to remove static global initialization and delay it to the point where its actually required src/plugins/voikko/voikkodict.cpp (line 109) https://git.reviewboard.kde.org/r/124282/#comment56633 join next line src/plugins/voikko/voikkodict.cpp (line 132) https://git.reviewboard.kde.org/r/124282/#comment56634 while you properly delete it, I'd still urge you to cleanup the code by using `std::unique_ptr` if, in the future, you want to optimize your code, you should introduce a buffer (`std::vectorwchar_t`) and reuse that whenever you need to convert a string to `wchar_t`. Now, you always allocate a new buffer, which is bad, performance wise src/plugins/voikko/voikkodict.cpp (line 152) https://git.reviewboard.kde.org/r/124282/#comment56639 if (!voikkoSuggestions) { src/plugins/voikko/voikkodict.cpp (line 191) https://git.reviewboard.kde.org/r/124282/#comment56635 return !m_handle; src/plugins/voikko/voikkodict.cpp (line 201) https://git.reviewboard.kde.org/r/124282/#comment56636 rtrim src/plugins/voikko/voikkodict.cpp (line 204) https://git.reviewboard.kde.org/r/124282/#comment56637 if (!userDictFile.open(...)) { src/plugins/voikko/voikkodict.cpp (line 219) https://git.reviewboard.kde.org/r/124282/#comment56638 join next line - Milian Wolff On July 8, 2015, 5:10 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 8, 2015, 5:10 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - src/plugins/CMakeLists.txt 3d24d61 cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/voikko/CMakeLists.txt PRE-CREATION
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 9, 2015, 10:41 ip) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- * Add d-pointer to VoikkoDict * Refactor loadUserDict() to smaller parts. * Wrap QStringLiterals inside functions. * Use a QVector as buffer for wchar_t string conversions, to avoid allocating new buffer everytime * Use ! instead of == true or == Q_NULLPTR * Make debug messages more meaningfull Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs (updated) - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 8, 2015, 5:10 ip) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- * Use Q_FUNC_INFO macro in debug messages. * Always error out early on. * Stylistical changes * Dictionaries not dictionarys * Memeber need m_ prefix * ALL CAPS is macro in C++ and not a constant like in Java customs, replace with lower_case _delimeted. * { always around if body } * refactor storePersonal(word, bad, good) Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs (updated) - src/plugins/CMakeLists.txt 3d24d61 cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82192 --- src/plugins/voikko/voikkoclient.cpp (line 28) https://git.reviewboard.kde.org/r/124282/#comment56578 here you can just use the Q_FUNC_INFO macro to get the same information (the function signature). src/plugins/voikko/voikkoclient.cpp (line 30) https://git.reviewboard.kde.org/r/124282/#comment56579 plural is dictionaries src/plugins/voikko/voikkoclient.cpp (line 32) https://git.reviewboard.kde.org/r/124282/#comment56580 I prefer to error out early («if (!dictionaries) return;»), less indentation and state to remember. src/plugins/voikko/voikkodict.h (line 64) https://git.reviewboard.kde.org/r/124282/#comment56585 prefix all private members with m_ src/plugins/voikko/voikkodict.cpp (line 47) https://git.reviewboard.kde.org/r/124282/#comment56581 ALL_UPPERCASE usually means defines (because they have slightly different behavior from other variables). src/plugins/voikko/voikkodict.cpp (line 97) https://git.reviewboard.kde.org/r/124282/#comment56582 always use braces {} src/plugins/voikko/voikkodict.cpp (line 108) https://git.reviewboard.kde.org/r/124282/#comment56584 just return true here, and you don't need the else block. src/plugins/voikko/voikkodict.cpp (line 125) https://git.reviewboard.kde.org/r/124282/#comment56586 if (replacements.contains(word)) { suggestions.append(word); } is much more readable src/plugins/voikko/voikkodict.cpp (line 130) https://git.reviewboard.kde.org/r/124282/#comment56588 can't you free the string again here? then you can do an early return if wcharSuggestions is empty. (I'd also prefer avoiding hungarian notiation -- typeVariablename.) src/plugins/voikko/voikkodict.cpp (line 140) https://git.reviewboard.kde.org/r/124282/#comment56587 isn't this the wrong delete? It is declared as a pointer, not an array. src/plugins/voikko/voikkodict.cpp (line 172) https://git.reviewboard.kde.org/r/124282/#comment56590 This is not very elegant. A better solution might be to split this up into two functions (fetchPersonal() that returns languageNode, and storePersonal() that takes a languageNode()), maybe? src/plugins/voikko/voikkodict.cpp (line 180) https://git.reviewboard.kde.org/r/124282/#comment56589 error out early instead. also, QIODevice::Truncate? That will delete everything already in the file. src/plugins/voikko/voikkodict.cpp (line 236) https://git.reviewboard.kde.org/r/124282/#comment56591 error out early - Martin Tobias Holmedahl Sandsmark On July 7, 2015, 2:44 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 7, 2015, 2:44 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions.
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
On July 7, 2015, 7:07 p.m., Martin Tobias Holmedahl Sandsmark wrote: src/plugins/voikko/voikkodict.cpp, line 125 https://git.reviewboard.kde.org/r/124282/diff/3/?file=383592#file383592line125 if (replacements.contains(word)) { suggestions.append(word); } is much more readable I didn't see apol's comment above, but considering that this isn't something that's going to be called often and be performance criticial I much prefer your original code (much more readable). Even if my example was wrong (the new version was hard to grok). :-) - Martin Tobias Holmedahl --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82192 --- On July 7, 2015, 2:44 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 7, 2015, 2:44 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
On July 7, 2015, 9:07 p.m., Martin Tobias Holmedahl Sandsmark wrote: src/plugins/voikko/voikkoclient.cpp, line 32 https://git.reviewboard.kde.org/r/124282/diff/3/?file=383588#file383588line32 I prefer to error out early («if (!dictionaries) return;»), less indentation and state to remember. That's not the policy for KDE Frameworks though: https://techbase.kde.org/Policies/Kdelibs_Coding_Style See that running astyle is part of the process of becoming a framework: https://community.kde.org/Frameworks/CreationGuidelines - Aleix --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82192 --- On July 7, 2015, 4:44 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 7, 2015, 4:44 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 7, 2015, 2 ip) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- Repelaced few missed NULL's with Q_NULLPTR. Removed end-of-line whitespace from FindVOIKKO.cmake Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs (updated) - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82174 --- src/plugins/voikko/voikkoclient.h (line 37) https://git.reviewboard.kde.org/r/124282/#comment56563 it's override, no need to specify it's virtual. src/plugins/voikko/voikkodict.cpp (line 71) https://git.reviewboard.kde.org/r/124282/#comment56567 This line does nothing. src/plugins/voikko/voikkodict.cpp (line 125) https://git.reviewboard.kde.org/r/124282/#comment56564 use constFind, now you're looking up the word twice. src/plugins/voikko/voikkodict.cpp (line 261) https://git.reviewboard.kde.org/r/124282/#comment56566 qCDebug(SONNET_VOIKKO) Loaded words.size() replacements from the user dictionary.; Same above. I don't really know much about Voikko or even Sonnet, so just reviewing the code. - Aleix Pol Gonzalez On July 7, 2015, 4 p.m., Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated July 7, 2015, 4 p.m.) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61cf8de95301516fc80e7fed378215b447c src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 7, 2015, 2:44 ip) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Changes --- * Don't mark methods virtual * path = path.absolutePath(); does nothing, removed * use path instead of QDir(directory) in the lambda's return statement * Remove annoying qCDebug() clause, it's friend was already removode earlier * Use constFind instead of contains to look for replacements * Change Last NULL to Q_NULLPTR Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs (updated) - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: Review Request 124282: Implement Voikko based spellchecker for Sonnet
On heinä 7, 2015, 2:11 ip, Aleix Pol Gonzalez wrote: src/plugins/voikko/voikkodict.cpp, line 261 https://git.reviewboard.kde.org/r/124282/diff/1/?file=383564#file383564line261 qCDebug(SONNET_VOIKKO) Loaded words.size() replacements from the user dictionary.; Same above. That's make the ting extreamly nasty if someone ever decides that they also want the debugging and warning messages to be translated. That line mostlikely only gets called once during the lifetime of the application, so performance wise it isn't an issue. - Jesse --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/#review82174 --- On heinä 7, 2015, 2:44 ip, Jesse Jaara wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/124282/ --- (Updated heinä 7, 2015, 2:44 ip) Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark. Repository: sonnet Description --- # Implement Voikko based spellchecker for Sonnet ## Description Implements a spell chekcing plugin based on libvoikko http://voikko.puimula.org/. Primarily for supporting highquality Finnishs spell checking, but HFST trancuders can be found several other languages too. http://sourceforge.net/projects/hfst/files/resources/spell-transducers/ ## List of commits (oldest 1st) --- Define QLoggingCategory for for voikko speller plugin * Declared SONNET_VOIKKO QLoggingCategory -- Implement Voikko based spellchecker (dictionary) * All Sonnet::SpellerPlugin functions are implemented. * storeReplacement() and addToPersonal() use Json based storage. * File location: * UNIX OSX: QStandardPaths::GenericDataLocation/Sonnet/Voikko-user-dictionary.json * Windows = Vista: QSP::GenericDataLocation/../Roaming/Sonnet/Voikko-user-dictionary.json * XP: QSP::GenericDataLocation/../../Aplication Data/Sonnet/Voikko-user-dictionary.json * Format: ```JSON { languageId: { PersonalWords: [ word ], Replacements: [ {bad: eror, good: error} ] } ``` * Before use VoikkoDict based chekkers must be ensured to be with valid with initFailed(). As so the ctor is protected and only accessible from friens class VoikkoClient, which does this check before returning the speller. Using an invalid speller will result in null-pointer exceptions. -- Implement Sonnet::Client for Voikko speller * Reliability set to 50. Voikko is primarily only used for Finnish at the moment, although the HFST transducer-backend has added support for other languages of varying quality. As for Finnish (99% of use cases) the results are top quality. In any case the reliability should be higher than that of hunspell and aspell to prevent them from kicking in for Finnish, as the Finnish dictionarys for them are low-quality. * Name is Voikko -- Add in CMakeBits needed to compile Voikko speller. * Added FindVOIKKO module Diffs - cmake/FindVOIKKO.cmake PRE-CREATION src/plugins/CMakeLists.txt 3d24d61 src/plugins/voikko/CMakeLists.txt PRE-CREATION src/plugins/voikko/voikkoclient.h PRE-CREATION src/plugins/voikko/voikkoclient.cpp PRE-CREATION src/plugins/voikko/voikkodebug.h PRE-CREATION src/plugins/voikko/voikkodebug.cpp PRE-CREATION src/plugins/voikko/voikkodict.h PRE-CREATION src/plugins/voikko/voikkodict.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/124282/diff/ Testing --- Thanks, Jesse Jaara ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel