1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
"""
Lexicographer for the French language
"""
# Note:
# This mode must contains at least:
# <dSugg> : a dictionary for default suggestions.
# <bLexicographer> : a boolean False
# if the boolean is True, 4 functions are required:
# split(sWord) -> returns a list of string (that will be analyzed)
# analyze(sWord) -> returns a string with the meaning of word
# readableMorph(sMorph) -> returns a string with the meaning of tags
# setLabelsOnToken(dToken) -> adds readable information on token
# isValidSugg(sWord, oSpellChecker) -> returns a filtered list of suggestions
import re
#### Suggestions
dSugg = {
"bcp": "beaucoup",
"ca": "ça",
"cad": "c’est-à-dire",
"cb": "combien|CB",
"cdlt": "cordialement",
"construirent": "construire|construisirent|construisent|construiront",
"càd": "c’est-à-dire",
"chai": "j’sais|je sais",
"chais": "j’sais|je sais",
"chui": "j’suis|je suis",
"chuis": "j’suis|je suis",
"done": "donc|donne",
"dc": "de|donc",
"email": "courriel|e-mail|émail",
"emails": "courriels|e-mails",
"ete": "êtes|été",
"Etes-vous": "Êtes-vous",
"Etiez-vous": "Étiez-vous",
"Etions-nous": "Étions-nous",
"loins": "loin",
|
|
>
<
>
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
"""
Lexicographer for the French language
"""
# Note:
# This mode must contains at least:
# <dSugg> : a dictionary for default suggestions.
# <bLexicographer> : a boolean False
# if the boolean is True, 4 functions are required:
# split(sWord) -> returns a list of strings (that will be analyzed)
# analyze(sWord) -> returns a string with the meaning of word
# readableMorph(sMorph) -> returns a string with the meaning of tags
# setLabelsOnToken(dToken) -> adds readable information on token
# isValidSugg(sWord, oSpellChecker) -> returns a filtered list of suggestions
import re
#### Suggestions
dSugg = {
"bcp": "beaucoup",
"ca": "ça",
"cad": "c’est-à-dire",
"càd": "c’est-à-dire",
"cb": "combien|CB",
"cdlt": "cordialement",
"construirent": "construire|construisirent|construisent|construiront",
"chai": "j’sais|je sais",
"chais": "j’sais|je sais",
"chui": "j’suis|je suis",
"chuis": "j’suis|je suis",
"dc": "de|donc",
"done": "donc|donne",
"dp": "depuis|de|du",
"dps": "depuis|des|dos|dès|dés",
"email": "courriel|e-mail|émail",
"emails": "courriels|e-mails",
"ete": "êtes|été",
"Etes-vous": "Êtes-vous",
"Etiez-vous": "Étiez-vous",
"Etions-nous": "Étions-nous",
"loins": "loin",
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
"prsq": "presque",
"qcq": "quiconque",
"qd": "quand",
"qq": "quelque",
"qqch": "quelque chose",
"qqn": "quelqu’un",
"qqne": "quelqu’une",
"qqs": "quelques",
"qqunes": "quelques-unes",
"qquns": "quelques-uns",
"tdq": "tandis que",
"tj": "toujours",
"tjs": "toujours",
"tq": "tant que|tandis que",
"ts": "tous",
"tt": "tant|tout",
"tte": "toute",
"ttes": "toutes",
"y’a": "y a",
"Iier": "Iᵉʳ",
|
>
>
>
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
"prsq": "presque",
"qcq": "quiconque",
"qd": "quand",
"qq": "quelque",
"qqch": "quelque chose",
"qqn": "quelqu’un",
"qqne": "quelqu’une",
"qqp": "quelque part",
"qqs": "quelques",
"qqunes": "quelques-unes",
"qquns": "quelques-uns",
"tdq": "tandis que",
"tj": "toujours",
"tjs": "toujours",
"tps": "temps|tes",
"tq": "tant que|tandis que",
"ttq": "tant que",
"ts": "tous",
"tt": "tant|tout",
"tte": "toute",
"ttes": "toutes",
"y’a": "y a",
"Iier": "Iᵉʳ",
|