importer tout le dossier corpus
This commit is contained in:
10
markov.py
10
markov.py
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user