Review Request 124282: Implement Voikko based spellchecker for Sonnet

Jesse Jaara jesse.jaara at gmail.com
Fri Jul 10 12:11:43 UTC 2015


-----------------------------------------------------------
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150710/5d6daf93/attachment.html>


More information about the Kde-frameworks-devel mailing list