-
Notifications
You must be signed in to change notification settings - Fork 1
/
script_rc_test.r
executable file
·47 lines (40 loc) · 1.94 KB
/
script_rc_test.r
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
45
46
47
#!/usr/bin/Rscript
# ------------------------------------------------------------------------
# RUN CONTROL TEST DATA FROM QUIZZES: DEPRECATED.
# ------------------------------------------------------------------------
source("./script_library.r")
source("./script_back_off.r")
# ------------------------------------------------------------------------
# ........................................................................
# SETUP
# ........................................................................
#
# Adjust:
# - 'test_file_1': Contains sentences where last word has to be predicted.
# - 'set_path_to_data': Relative path to directory '05_Model_Data'.
# ........................................................................
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# ........................................................................
# DATA
# ........................................................................
#
source("./script_load_data.r")
set_path_to_data("./")
#
# Adjust to specific development data.
test_file_1 <- "./final_quiz/test.txt"
gp <- readLines(test_file_1)
# ........................................................................
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# ........................................................................
# PREDICT
# ........................................................................
#
gp <- get_last_four_words(gp)
#data_found <- back_off(gp, dtq_ml_wuvxyz, dtq_ml_wuvxy, dtq_ml_wuvx,
# dtq_ml_wuv, dtq_ml_wv, dtq_ml_w)
#print(paste("Top finding:", get_top_finding(data_found)))
# ........................................................................
# ------------------------------------------------------------------------