-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMineProcessTreeQuality.txt
More file actions
37 lines (33 loc) · 1.4 KB
/
Copy pathMineProcessTreeQuality.txt
File metadata and controls
37 lines (33 loc) · 1.4 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
System.out.println("Starting MinePTQuality script...");
// xesPath is your local directory containing xes files.
// treePath is your local directory containing the corresponding ptml files.
// this script computes the four quality dimensions for every process tree you have.
// Eventually, it writes the result in a .txt file. Every line is the result of a separate process tree.
xesPath = "C:\\test\\xes\\";
treePath = "C:\\test\\ptml\\";
//---------------------------------------------------
String baseDir = new File(xesPath).getParentFile().toString();
File dir = new File(xesPath);
File[] directoryListing = dir.listFiles();
String[] scores = new String[directoryListing.length];
counter = 0;
if (directoryListing != null) {
for (File xesFile : directoryListing) {
if(xesFile.isFile()){
System.out.println("file: "+counter.toString());
System.out.println("1) Opening log file: " + xesFile);
org.deckfour.xes.model.XLog log = open_xes_log_file(xesFile);
treeFile = xesFile.toString().replace("xes", "ptml");
tree = import_process_tree_from_ptml_file(treeFile);
result = evaluate_process_tree_returns_string(log, tree);
System.out.println(result);
scores[counter] = xesFile.toString()+";"+result;
}
counter++;
}
}
PrintWriter writer = new PrintWriter(baseDir + "\\PTQ_output.txt", "UTF-8");
for (String resultingLine : scores){
writer.println(resultingLine);
}
writer.close();