correctors.fr#

Module Contents#

Classes#

FrenchCorrector

Corrects typical French typos to follow the following rules:

class correctors.fr.FrenchCorrector#

Bases: correctors.base.CorrectorBase, correctors.universal.UniversalCorrector

Corrects typical French typos to follow the following rules: * False friends (example / exemple) * TODO Instead of ellipsis, use “…” * Ensure correct French quotation marks: « Foo » (with non-breaking whitespaces   before/after the guillemets!)

correct_false_friends(self, text: str) str#

Correct typical mistakes

Currently only one rule: “example” is English -> “exemple” is correct French

correct_spaces_before_punctuation(self, text: str) str#

Ensure we have non-breaking spaces before : ; ! ? This is a specialty of French grammar, different to most languages

correct_quotation_marks(self, text: str) str#

Ensure correct French quotation marks: « Foo » (with non-breaking whitespaces   before/after the guillemets!)