Commit 38d9bdfb authored by osboxes.org's avatar osboxes.org
Browse files

failide ja lausete sorteerimine muudetud

parent bfc66011
This diff is collapsed.
......@@ -7,24 +7,23 @@
import os
import sys
import pathlib
import re
from bs4 import BeautifulSoup
from pathlib import Path
#lähtefailide kataloog
indir = '/Users/rabauti/repos/tu/ut_veakorpus/korpus_ids'
indir = '/home/osboxes/repos/tu/ut_veakorpus/korpus_ids'
files = os.listdir(indir)
files = sorted(os.listdir(indir))
file_pattern_txt = re.compile('([^\/]+).txt$')
for folder in files:
if not folder.startswith('.'):
folder = folder.strip()
files2 = os.listdir(indir+'/'+folder)
files2 = sorted(os.listdir(indir+'/'+folder))
for name2 in files2:
if file_pattern_txt.search(name2):
filename = indir + '/' + folder + '/' + name2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment