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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
listInfoSection= [
{'type': 'adjectif', 'match': 'adj', 'o': 'adjectif'},
{'type': 'adjectif', 'match': 'adjectif', 'o': 'adjectif'},
{'type': 'adjectif', 'match': 'adj-dém', 'o': 'adjectif démonstratif'},
{'type': 'adjectif', 'match': 'adjectif démonstratif', 'o': 'adjectif démonstratif'},
{'type': 'adjectif', 'match': 'adjectif exclamatif', 'o': 'adjectif exclamatif'},
{'type': 'adjectif', 'match': 'adjectif indéfini', 'o': 'adjectif indéfini'},
{'type': 'adjectif', 'match': 'adjectif interrogatif', 'o': 'adjectif interrogatif'},
{'type': 'adjectif', 'match': 'adjectif numéral', 'o': 'adjectif numéral'},
{'type': 'adjectif', 'match': 'adjectif possessif', 'o': 'adjectif possessif'},
{'type': 'adjectif', 'match': 'adjectif relatif', 'o': 'adjectif relatif'},
{'type': 'adverbe', 'match': 'adv', 'o': 'adverbe'},
{'type': 'adverbe', 'match': 'adverbe', 'o': 'adverbe'},
{'type': 'adverbe', 'match': 'adverbe interrogatif', 'o': 'adverbe interrogatif'},
{'type': 'adverbe', 'match': 'adverbe relatif', 'o': 'adverbe relatif'},
{'type': 'article', 'match': 'article', 'o': 'article'},
{'type': 'article', 'match': 'article défini', 'o': 'article défini'},
{'type': 'article', 'match': 'article indéfini', 'o': 'article indéfini'},
{'type': 'article', 'match': 'article partitif', 'o': 'article partitif'},
{'type': 'conjonction', 'match': 'conjonction', 'o': 'conjonction'},
{'type': 'conjonction', 'match': 'conjonction de coordination', 'o': 'conjonction de coordination'},
{'type': 'erreur', 'match': 'erreur', 'o': 'faute courante'},
{'type': 'erreur', 'match': 'faute', 'o': 'faute courante'},
{'type': 'interjection', 'match': 'interj', 'o': 'interjection'},
{'type': 'interjection', 'match': 'interjection', 'o': 'interjection'},
{'type': 'interjection', 'match': 'interjection', 'o': 'interjection'},
{'type': 'locuton nominale', 'match': 'loc-phr', 'o': 'locution nominale'},
{'type': 'locuton nominale', 'match': 'locution', 'o': 'locution nominale'},
{'type': 'locuton nominale', 'match': 'locution nominale', 'o': 'locution nominale'},
{'type': 'locuton nominale', 'match': 'locution phrase', 'o': 'locution nominale'},
{'type': 'locuton nominale', 'match': 'locution-phrase', 'o': 'locution nominale'},
{'type': 'nom', 'match': 'nom', 'o': 'nom'},
{'type': 'nom', 'match': 'nom1', 'o': 'nom'},
{'type': 'nom', 'match': 'nom2', 'o': 'nom'},
{'type': 'nom', 'match': 'nom3', 'o': 'nom'},
{'type': 'nom', 'match': 'nom4', 'o': 'nom'},
{'type': 'nom', 'match': 'nom5', 'o': 'nom'},
{'type': 'nom', 'match': 'nom6', 'o': 'nom'},
{'type': 'nom', 'match': 'nom7', 'o': 'nom'},
{'type': 'nom', 'match': 'nom8', 'o': 'nom'},
{'type': 'nom', 'match': 'nom9', 'o': 'nom'},
{'type': 'nom', 'match': 'nom10', 'o': 'nom'},
{'type': 'nom', 'match': 'nom11', 'o': 'nom'},
{'type': 'nom', 'match': 'nom12', 'o': 'nom'},
{'type': 'nom', 'match': 'nom13', 'o': 'nom'},
{'type': 'nom', 'match': 'nom14', 'o': 'nom'},
{'type': 'nom', 'match': 'nom15', 'o': 'nom'},
{'type': 'nom', 'match': 'nom16', 'o': 'nom'},
{'type': 'nom', 'match': 'nom17', 'o': 'nom'},
{'type': 'nom', 'match': 'nom commun', 'o': 'nom'},
{'type': 'nom', 'match': 'substantif', 'o': 'substantif'},
{'type': 'nom de famille', 'match': 'nom de famille', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom de famille anglais', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom-fam', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom-pr', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom-propre', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom pr', 'o': 'nom de famille'},
{'type': 'nom de famille', 'match': 'nom propre', 'o': 'nom de famille'},
{'type': 'nom scientifique', 'match': 'nom scientifique', 'o': 'nom scientifique'},
{'type': 'particule', 'match': 'particule', 'o': 'particule'},
{'type': 'nom de famille', 'match': 'patronyme', 'o': 'nom de famille'},
{'type': 'préfixe', 'match': 'préfixe', 'o': 'préfixe'},
{'type': 'suffixe', 'match': 'suffixe', 'o': 'suffixe'},
{'type': 'prénom', 'match': 'prénom', 'o': 'prénom'},
{'type': 'onomatopée', 'match': 'onomatopée', 'o': 'onomatopée'},
{'type': 'onomatopée', 'match': 'onom', 'o': 'onomatopée'},
{'type': 'préposition', 'match': 'prép', 'o': 'préposition'},
{'type': 'préposition', 'match': 'préposition', 'o': 'préposition'},
{'type': 'pronom', 'match': 'pronom', 'o': 'pronom'},
{'type': 'pronom', 'match': 'pronom démonstratif', 'o': 'pronom démonstratif'},
{'type': 'pronom', 'match': 'pronom indéfini', 'o': 'pronom indéfini'},
{'type': 'pronom', 'match': 'pronom interrogatif', 'o': 'pronom interrogatif'},
{'type': 'pronom', 'match': 'pronom personnel', 'o': 'pronom personnel'},
{'type': 'pronom', 'match': 'pronom possessif', 'o': 'pronom possessif'},
{'type': 'pronom', 'match': 'pronom relatif', 'o': 'pronom relatif'},
{'type': 'verbe', 'match': 'verb', 'o': 'verbe'},
{'type': 'verbe', 'match': 'verbe', 'o': 'verbe'},
{'type': 'verbe', 'match': 'verbe pronominal', 'o': 'verbe pronominal'}
]
listSections = []
with open("./listSections", "r") as f:
for line in f:
line = line.strip()
if line[-3:] != "===":
continue
s = line.find('{{')+2
e = line.find('}}')
if not s < e:
continue
argsStr = line[s:e]
args = list(map(lambda x: x.strip().lower(), argsStr.split('|')))
if len(args) <= 2 or not args[1]:
continue
if not args[2].startswith('fr'):
continue
classed = False
for m in listInfoSection:
if m['match'] == args[1]:
classed = True
continue
if not classed:
listSections.append(args[1])
for section in (list(set(listSections))):
print(section)
|