from million.analyze.wordFinder import findWords from million.parse.fb_exports import FacebookExportParser DATA_PATH = './data/' parser = FacebookExportParser() export = parser.parse(DATA_PATH) gros_mots = ['merde', 'sexe', 'pute', 'putain', 'bite', 'nichon', 'con(ne)?', 'baiser?'] msg_gromots = findWords(export.messages, gros_mots) for gromot in msg_gromots: print(f"{gromot.sender_name} : {gromot.content}")