-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts.py
66 lines (58 loc) · 1.43 KB
/
consts.py
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
"""
Projet : pyChatBot
Auteurs : Pierre Cameleri, Raphaël Guignolle
Description : Définition des constantes essentielles
"""
from os import listdir
# Noms et prénoms des présidents
NOM_PRENOM = {
"Hollande": "François",
"Chirac": "Jacques",
"Giscard dEstaing": "Valéry",
"Macron": "Emmanuel",
"Mitterrand": "François",
"Sarkozy": "Nicolas"
}
# Dictionnaires pour les transformations
TRANSFORMATIONS = {
'À': 'a',
'à': 'a',
'ç': 'c',
'é': 'e',
'è': 'e',
'ê': 'e',
'ë': 'e',
'ù': 'u',
'û': 'u',
'Î': 'i',
'î': 'i',
'ï': 'i',
}
# Mot parasite
PARASITE = {
("le", "la", "l", "les"): "le",
("un", "une"): "un",
("d", "du", "de", "des"): "de",
("ce", "cette", "cet", "ces", "cettes"): "ce",
("mon", "ton", "son", "ma", "ta", "sa", "notre", "votre", "leur", "nos", "vos", "leurs"): "mon",
("que", "quel", "quels", "quelle", "quelles"): "que",
("j", "je"): "je",
("n", "ne"): "ne"
}
# Synatx à réduire
REDUCTION_SYNTAX = ".,;!'`\"?_-:\n "
# Répertoire des CORPUS
CORPUS_CLEAN = "./cleaned/"
CORPUS_IN = "./speeches/"
NB_TEXT = len(listdir(CORPUS_IN))
PROMPT_TEXT = "prompt"
STARTERS = {
"Est-ce que": "Oui, en effet,",
"Comment": "Après analyse,",
"Pourquoi": "Parce que,",
"Peux-tu": "Oui bien sûr,"
}
END_OF_SENTENCE = "?.!"
if __name__ == "__main__":
print("Do not run this file.")
print("Run ./main.py instead")