importer tout le dossier corpus

This commit is contained in:
2026-02-05 20:15:56 +01:00
parent 3c18739db0
commit 8f9987fcd2
2 changed files with 5 additions and 5 deletions

View File

@@ -1,11 +1,11 @@
from collections import defaultdict
from random import choice, randrange
from pathlib import Path
from random import choice
suivants = defaultdict(list)
for path in (
"fra_wikipedia_2021_10K-sentences.txt",
):
with open(path, "r", encoding="utf-8") as fichier:
for chemin in Path("corpus").iterdir():
with open(chemin, "r", encoding="utf-8") as fichier:
for phrase in fichier:
antepenultieme, penultieme = "", ""
for word in phrase.split():