File size: 674 Bytes
96432bc
 
e192c17
96432bc
 
 
 
 
e192c17
96432bc
 
 
 
 
e192c17
96432bc
e192c17
96432bc
 
 
 
 
 
 
 
e192c17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from os.path import dirname, join


def count_lines(filepath):
    with open(filepath, encoding="utf-8") as f:
        lines = f.read().splitlines()
        return len(lines)


def statistic(subset_folder):
    print("Train\t\t", count_lines(join(subset_folder, "train.txt")))
    print("Validation\t", count_lines(join(subset_folder, "validation.txt")))
    print("Test\t\t", count_lines(join(subset_folder, "test.txt")))


pwd = dirname(__file__)
dataset_folder = join(pwd, "data")

print("Subset Small")
statistic(join(dataset_folder, "small"))

print("Subset Base")
statistic(join(dataset_folder, "base"))

print("Subset Large")
statistic(join(dataset_folder, "large"))