Output
JudiLing.write2csv — FunctionWrite results into a csv file. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.
JudiLing.write2df — FunctionReformat results into a dataframe. This function takes as input the results from the learn_paths and build_paths functions, including the information on gold paths that is optionally returned as second output result.
JudiLing.write_comprehension_eval — FunctionWrite comprehension evaluation into a CSV file, include target and predicted ids and indentifiers and their correlations.
JudiLing.write2csv — Methodwrite2csv(res, data, cue_obj_train, cue_obj_val, filename)Write results into csv file for the results from learn_paths and build_paths.
Obligatory Arguments
res::Array{Array{Result_Path_Info_Struct,1},1}: the results fromlearn_pathsorbuild_pathsdata::DataFrame: the datasetcue_obj_train::Cue_Matrix_Struct: the cue object for training datasetcue_obj_val::Cue_Matrix_Struct: the cue object for validation datasetfilename::String: the filename
Optional Arguments
grams::Int64=3: the number n in n-gram cuestokenized::Bool=false: if true, the dataset target is tokenizedsep_token::Union{Nothing, String, Char}=nothing: separatorstart_end_token::Union{String, Char}="#": start and end token in boundary cuesoutput_sep_token::Union{String, Char}="": output separatorpath_sep_token::Union{String, Char}=":": path separatortarget_col::Union{String, Symbol}=:Words: the column name for target stringsroot_dir::String=".": dir path for project root diroutput_dir::String=".": output dir inside root dir
Examples
# writing results for training data
JudiLing.write2csv(
res_train,
latin_train,
cue_obj_train,
cue_obj_train,
"res_latin_train.csv",
grams=3,
tokenized=false,
sep_token=nothing,
start_end_token="#",
output_sep_token="",
path_sep_token=":",
target_col=:Word,
root_dir=".",
output_dir="test_out")
# writing results for validation data
JudiLing.write2csv(
res_val,
latin_val,
cue_obj_train,
cue_obj_val,
"res_latin_val.csv",
grams=3,
tokenized=false,
sep_token=nothing,
start_end_token="#",
output_sep_token="",
path_sep_token=":",
target_col=:Word,
root_dir=".",
output_dir="test_out")JudiLing.write2csv — Methodwrite2csv(gpi::Vector{Gold_Path_Info_Struct}, filename)Write results into csv file for the gold paths' information optionally returned by learn_paths and build_paths.
Obligatory Arguments
gpi::Vector{Gold_Path_Info_Struct}: the gold paths' informationfilename::String: the filename
Optional Arguments
root_dir::String=".": dir path for project root diroutput_dir::String=".": output dir inside root dir
Examples
# write gold standard paths to csv for training data
JudiLing.write2csv(
gpi_train,
"gpi_latin_train.csv",
root_dir=".",
output_dir="test_out"
)
# write gold standard paths to csv for validation data
JudiLing.write2csv(
gpi_val,
"gpi_latin_val.csv",
root_dir=".",
output_dir="test_out"
)JudiLing.write2csv — Methodwrite2csv(ts::Threshold_Stat_Struct, filename)Write results into csv file for threshold and tolerance proportion for each timestep.
Obligatory Arguments
gpi::Vector{Gold_Path_Info_Struct}: the gold paths' informationfilename::String: the filename
Optional Arguments
root_dir::String=".": dir path for project root diroutput_dir::String=".": output dir inside root dir
Examples
JudiLing.write2csv(ts, "ts.csv", root_dir = @__DIR__, output_dir="out")JudiLing.write2df — Methodwrite2df(res, data, cue_obj_train, cue_obj_val)Reformat results into a dataframe for the results form learn_paths and build_paths functions.
Obligatory Arguments
res: output oflearn_pathsorbuild_pathsdata::DataFrame: the datasetcue_obj_train: cue object of the training data setcue_obj_val: cue object of the validation data set
Optional Arguments
grams::Int64=3: the number n in n-gram cuestokenized::Bool=false: if true, the dataset target is tokenizedsep_token::Union{Nothing, String, Char}=nothing: separatorstart_end_token::Union{String, Char}="#": start and end token in boundary cuesoutput_sep_token::Union{String, Char}="": output separatorpath_sep_token::Union{String, Char}=":": path separatortarget_col::Union{String, Symbol}=:Words: the column name for target strings
Examples
# writing results for training data
JudiLing.write2df(
res_train,
latin_train,
cue_obj_train,
cue_obj_train,
grams=3,
tokenized=false,
sep_token=nothing,
start_end_token="#",
output_sep_token="",
path_sep_token=":",
target_col=:Word)
# writing results for validation data
JudiLing.write2df(
res_val,
latin_val,
cue_obj_train,
cue_obj_val,
grams=3,
tokenized=false,
sep_token=nothing,
start_end_token="#",
output_sep_token="",
path_sep_token=":",
target_col=:Word)JudiLing.write2df — Methodwrite2df(gpi::Vector{Gold_Path_Info_Struct})Write results into a dataframe for the gold paths' information optionally returned by learn_paths and build_paths.
Obligatory Arguments
gpi::Vector{Gold_Path_Info_Struct}: the gold paths' information
Examples
# write gold standard paths to df for training data
JudiLing.write2csv(gpi_train)
# write gold standard paths to df for validation data
JudiLing.write2csv(gpi_val)JudiLing.write2df — Methodwrite2df(ts::Threshold_Stat_Struct)Write results into a dataframe for threshold and tolerance proportion for each timestep.
Obligatory Arguments
ts::Threshold_Stat_Struct: the threshold and tolerance proportion
Examples
JudiLing.write2df(ts)JudiLing.write_comprehension_eval — Methodwrite_comprehension_eval(SChat, SC, data, target_col, filename)Write comprehension evaluation into a CSV file, include target and predicted ids and indentifiers and their correlations.
Obligatory Arguments
SChat::Matrix: the Shat/Chat matrixSC::Matrix: the S/C matrixdata::DataFrame: the datatarget_col::Symbol: the name of target columnfilename::String: the filename/filepath
Optional Arguments
k: top k candidatesroot_dir::String=".": dir path for project root diroutput_dir::String=".": output dir inside root dir
Examples
JudiLing.write_comprehension_eval(Chat, cue_obj.C, latin, :Word, "output.csv",
k=10, root_dir=@__DIR__, output_dir="out")JudiLing.write_comprehension_eval — Methodwrite_comprehension_eval(SChat, SC, SC_rest, data, data_rest, target_col, filename)Write comprehension evaluation into a CSV file for both training and validation datasets, include target and predicted ids and indentifiers and their correlations.
Obligatory Arguments
SChat::Matrix: the Shat/Chat matrixSC::Matrix: the S/C matrixSC_rest::Matrix: the rest S/C matrixdata::DataFrame: the datadata_rest::DataFrame: the rest datatarget_col::Symbol: the name of target columnfilename::String: the filename/filepath
Optional Arguments
k: top k candidatesroot_dir::String=".": dir path for project root diroutput_dir::String=".": output dir inside root dir
Examples
JudiLing.write_comprehension_eval(Shat_val, S_val, S_train, latin_val, latin_train,
:Word, "all_output.csv", k=10, root_dir=@__DIR__, output_dir="out")JudiLing.save_L_matrix — Methodsave_L_matrix(L, filename)Save lexome matrix into csv file.
Obligatory Arguments
L::L_Matrix_Struct: the lexome matrix structfilename::String: the filename/filepath
Examples
JudiLing.save_L_matrix(L, joinpath(@__DIR__, "L.csv"))JudiLing.load_L_matrix — Methodload_L_matrix(filename)Load lexome matrix from csv file.
Obligatory Arguments
filename::String: the filename/filepath
Optional Arguments
header::Bool=false: header in csv
Examples
L_load = JudiLing.load_L_matrix(joinpath(@__DIR__, "L.csv"))JudiLing.save_S_matrix — Methodsave_S_matrix(S, filename, data, target_col)Save S matrix into a csv file.
Obligatory Arguments
S::Matrix: the S matrixfilename::String: the filename/filepathdata::DataFrame: the datatarget_col::Symbol: the name of target column
Optional Arguments
sep::Bool=" ": separator in CSV file
Examples
JudiLing.save_S_matrix(S, joinpath(@__DIR__, "S.csv"), latin, :Word)JudiLing.load_S_matrix — Methodload_S_matrix(filename)Load S matrix from a csv file.
Obligatory Arguments
filename::String: the filename/filepath
Optional Arguments
header::Bool=false: header in csvsep::Bool=" ": separator in CSV file
Examples
JudiLing.load_S_matrix(joinpath(@__DIR__, "S.csv"))