Skip to content

Commit

Permalink
#512 - Check logging in TC
Browse files Browse the repository at this point in the history
  • Loading branch information
Horsmann committed Oct 2, 2018
1 parent ae827f4 commit e590f1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion dkpro-tc-core/src/main/java/org/dkpro/tc/core/Constants.java
Expand Up @@ -319,7 +319,13 @@ public interface Constants
* Name of the meta task file which holds the tc unit text and context for all test instances.
*/
String ID_CONTEXT_KEY = "id2context.txt";


/**
* Name of the file containing the mapping from the id number to the entire dimension set of an experiment.
*/
String FILE_CONFIGURATION_MAPPING = "configurationMapping.tsv";


/**
* This is the character for joining strings for pair ngrams.
*/
Expand Down
Expand Up @@ -122,7 +122,7 @@ private Properties addPredictedResults(Properties pa, String learningMode) throw
if (printResultsToSysout) {
System.out.println("\n[" + getContext().getId() + "]");
for (Entry<String, String> e : resultMap.entrySet()) {
System.out.println(e.getKey() + " " + e.getValue());
System.out.println("\t" + e.getKey() + ": " + e.getValue());
}
System.out.println("\n");
} else {
Expand Down
Expand Up @@ -147,9 +147,9 @@ private void writeOverallResults(String learningMode, StorageService store, Set<
r.writeResults(fscoreFile);

if (printResultsToSysout) {
System.out.println("\n\nAccumulated results of all folds in the CrossValidation run\n\t[" + id
System.out.println("\n\nRESULT SUMMARY CROSSVALIDATION\n[" + id
+ "/" + getMLSetup(id) + "]");
results.keySet().forEach(x -> System.out.println("\t\t" + x + "\t" + results.get(x)));
results.keySet().forEach(x -> System.out.println("\t\t" + x + ": " + results.get(x)));
System.out.println("\nAccumulated results per category:\n" + r.getResults());
System.out.println("\n");
} else {
Expand Down Expand Up @@ -247,7 +247,7 @@ private void writeId2DiscriminatorMapping(StorageService store, String learningM
}

FileUtils.writeStringToFile(
getContext().getFile("configurationMapping.tsv", AccessMode.READWRITE),
getContext().getFile(FILE_CONFIGURATION_MAPPING, AccessMode.READWRITE),
sb.toString(), "utf-8");

}
Expand Down

0 comments on commit e590f1f

Please sign in to comment.