importer tout le dossier corpus
This commit is contained in:
1 parent
3c18739db0
commit
8f9987fcd2
2 files changed
+5
-5
No files matched your search
File renamed without changes.
@@ -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