diff options
Diffstat (limited to 'getSection.py')
-rw-r--r-- | getSection.py | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/getSection.py b/getSection.py deleted file mode 100644 index 62b74be..0000000 --- a/getSection.py +++ /dev/null @@ -1,129 +0,0 @@ -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) - - - |