-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.py
More file actions
44 lines (30 loc) · 1.53 KB
/
demo.py
File metadata and controls
44 lines (30 loc) · 1.53 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
demo.py: provides a demonstration of using our difficulty calculating code.
NOTE: for this to run, the difficulty calculating package must be installed locally. It also assumes that the dataset
to calculate the difficulty for is in the same directory as this code file and that you are running the code from
that same directory.
"""
# ======================================================================================================================
#
# CODE SETUP
#
# ======================================================================================================================
# ====>> Own Package Imports <<====
from edm import report
import data_loader
# ====>> Authorship Info <<====
__author__ = ["Ed Collins", "Nikolai Rozanov", "Bingbing Zhang"]
__licence__ = "MIT"
__version__ = "0.0.1"
# ======================================================================================================================
# ======================================================================================================================
#
# MAIN
#
# ======================================================================================================================
datasetName = "SST_2"
dataset = data_loader.load_dataset(datasetName)
trSents, trLabels = dataset["TRAIN"]
difficultyReport = report.get_difficulty_report(sents=trSents, labels=trLabels)
print(difficultyReport)
# ======================================================================================================================