From ea7e8f44b8ac00d39e26aac01a2e1e39a35783a2 Mon Sep 17 00:00:00 2001 From: Vikas Gupta Date: Tue, 30 May 2023 14:34:40 +0530 Subject: [PATCH] constant INCREMENT = 1 defined --- .../main/java/zingg/common/core/executor/LabelUpdater.java | 4 ++-- .../src/main/java/zingg/common/core/executor/Labeller.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/core/src/main/java/zingg/common/core/executor/LabelUpdater.java b/common/core/src/main/java/zingg/common/core/executor/LabelUpdater.java index 25af63457..2f99d0a6d 100644 --- a/common/core/src/main/java/zingg/common/core/executor/LabelUpdater.java +++ b/common/core/src/main/java/zingg/common/core/executor/LabelUpdater.java @@ -76,8 +76,8 @@ public ZFrame processRecordsCli(ZFrame lines) throws ZinggClientEx String matchType = LabelMatchType.get(matchFlag).msg; postMsg = String.format("\tThe above pair is labeled as %s\n", matchType); selectedOption = displayRecordsAndGetUserInput(getDSUtil().select(currentPair, displayCols), preMsg, postMsg); - getTrainingDataModel().updateLabellerStat(selectedOption, +1); - getTrainingDataModel().updateLabellerStat(matchFlag, -1); + getTrainingDataModel().updateLabellerStat(selectedOption, INCREMENT); + getTrainingDataModel().updateLabellerStat(matchFlag, -1*INCREMENT); getLabelDataViewHelper().printMarkedRecordsStat( getTrainingDataModel().getPositivePairsCount(), getTrainingDataModel().getNegativePairsCount(), diff --git a/common/core/src/main/java/zingg/common/core/executor/Labeller.java b/common/core/src/main/java/zingg/common/core/executor/Labeller.java index c6509c6dc..cb136a4e1 100644 --- a/common/core/src/main/java/zingg/common/core/executor/Labeller.java +++ b/common/core/src/main/java/zingg/common/core/executor/Labeller.java @@ -16,6 +16,7 @@ public abstract class Labeller extends ZinggBase { public static final Integer QUIT_LABELING = 9; + public static final Integer INCREMENT = 1; private static final long serialVersionUID = 1L; protected static String name = "zingg.common.core.executor.Labeller"; public static final Log LOG = LogFactory.getLog(Labeller.class); @@ -106,7 +107,7 @@ public ZFrame processRecordsCli(ZFrame lines) throws ZinggClientE //String msgHeader = msg1 + msg2; selectedOption = displayRecordsAndGetUserInput(getDSUtil().select(currentPair, displayCols), msg1, msg2); - getTrainingDataModel().updateLabellerStat(selectedOption, 1); + getTrainingDataModel().updateLabellerStat(selectedOption, INCREMENT); getLabelDataViewHelper().printMarkedRecordsStat( getTrainingDataModel().getPositivePairsCount(), getTrainingDataModel().getNegativePairsCount(),