MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   [Plugin] Grammalecte (https://www.mobileread.com/forums/showthread.php?t=319793)

Doitsu 05-04-2019 01:24 PM

[Plugin] Grammalecte
 
1 Attachment(s)
Initial release: October 17, 2020
Current Version: "0.1.4.2"

This plugin is a simple Grammalecte-based grammar/spell checker for French ebooks. (Unlike the LibreOffice version, this plugin does not come with a GUI.)

Credits: This plugin uses the Grammalecte 1.12.2 Python library.

System requirements: Sigil 0.9.5 or higher.

Installation:

1. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected or greyed out.

2. Click Add Plugin and select Grammalecte_v0.1.4.1.zip. This will install the Grammalecte plugin, which you can select via Plugins > Validation > Grammalecte.

Note that this plugin will only check files highlighted in the Book Browser window. (If you want to check all files, click the Text folder.)

Settings:

This plugin doesn't come with a GUI, however, advanced users can customize it by adding/editing the following Grammalecte.json entries:

Spoiler:
Code:

apos:        True        Apostrophe typographique
bs:        True        Populaire
chim:        False        Chimie [!]
conf:        True        Confusions et faux-amis
conj:        True        Conjugaisons
date:        True        Validité des dates
esp:        True        Espaces surnuméraires
gn:        True        Accords (genre et nombre)
html:        True        ?
idrule:        False        Identifiant des règles de contrôle [!]
imp:        True        Impératif
infi:        True        Infinitif
inte:        True        Interrogatif
latex:        True        ?
liga:        False        Signaler ligatures typographiques
maj:        True        Majuscules
mapos:        False        Apostrophe manquante après lettres isolées [!]
mc:        False        Mots composés [!]
nbsp:        False        Espaces insécables
neg:        False        Adverbe de négation [!]
nf:        True        Normes françaises
num:        True        Nombres
ocr:        False        Erreurs de numérisation (OCR) [!]
pleo:        True        Pléonasmes
ppas:        True        Participes passés, adjectifs
redon1:        False        Répétitions dans le paragraphe [!]
redon2:        False        Répétitions dans la phrase [!]
sgpl:        True        Pluriels (locutions)
tab:        False        Tabulations surnuméraires
tu:        True        Traits d'union
typo:        True        Signes typographiques
unit:        True        Espaces insécables avant unités de mesure
virg:        True        Virgules
vmode:        True        Modes verbaux



For example, if you add the following entries to Grammalecte.json:

Code:

liga:        True,
idrule:        True,

Grammalecte will flag common ligatures and display rule ids.

Note that since Sigil comes with a much better spell checker, typos reported by Grammalecte are hidden by default. To display them, simply change:

Code:

  "error_types": [
    "lGrammarErrors"
  ]

to:

Code:

  "error_types": ["lGrammarErrors", "lSpellingErrors"]
(As with all JSON entries, each entry, except for the last one, needs to be terminated by a comma.)

The plugin will also check the Grammalecte website at least once a week for updates. If you'd rather manually update the plugin, please change the following entry:

Code:

  "update_check": true,
to:

Code:

  "update_check": false,
Since the French dictionaries bundled with Sigil are slightly outdated, French users also might want to download and install the latest French Hunspell dictionaries from the Grammalecte website.

License: GNU General Public License v3 (GPL-3)

roger64 05-06-2019 11:44 AM

Merci beaucoup pour cet excellent greffon. :)

Doitsu 04-03-2020 09:42 AM

Grammalecte-Version 1.8.0 warning
 
Since the latest Grammalecte version (1.8.0) was no longer compatible with this plugin, I've updated the plugin to add Grammalecte 1.8.0 support. Please download the latest version attached to the first post.


All times are GMT -4. The time now is 08:45 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.