Skip to content

Commit

Permalink
Update ArgIR tool
Browse files Browse the repository at this point in the history
Minor changes.
  • Loading branch information
ansegura7 committed Mar 10, 2022
1 parent c42d83e commit 7266e88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions code/ArgumentIR/src/es/uam/irg/ir/gui/DataModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public DataModel(String decimalFormat, String dateFormat) {
this.nRows = 0;

// Data loading and IR index creation
loadRelationTaxonomy();
loadData();
loadRelationTaxonomy();
createDocumentIndex();
loadLabels();
}
Expand Down Expand Up @@ -168,7 +168,7 @@ public String getQueryResult(String query, String reRankBy, String similarity, i
} else {
// Elapsed time variables
long start, finish;
int timeElapsed1 = 0, timeElapsed2 = 0;
int timeElapsed1, timeElapsed2;

// 1. Data querying, reranking and pagination
start = System.nanoTime();
Expand Down Expand Up @@ -245,6 +245,7 @@ public boolean saveArgument(Argument arg, String relevance, String quality) {

/**
*
* @param userName
* @return
*/
public boolean saveLabelsToFile(String userName) {
Expand Down Expand Up @@ -398,8 +399,7 @@ private void loadData() {
FunctionUtils.printWithDatestamp(" - Number of controversy scores: " + controversyScores.size());

} catch (Exception ex) {
Logger.getLogger(InfoRetriever.class
.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(InfoRetriever.class.getName()).log(Level.SEVERE, null, ex);
}
}

Expand Down
3 changes: 2 additions & 1 deletion code/ArgumentIR/src/es/uam/irg/ir/gui/ReportFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public String getCommentsInfoReport(DMCommentTree tree, Map<Integer, DMComment>
int nodeId = tree.getId();
int leftPadding = tree.getLevel() * 15;
DMComment currNode = comments.get(nodeId);
String commentBody = currNode.getText();
Argument arg = getArgumentByComment(currNode, arguments);
String btAnnotate = getAnnotationButton("COMMENT", nodeId);

Expand All @@ -123,7 +124,7 @@ public String getCommentsInfoReport(DMCommentTree tree, Map<Integer, DMComment>
report = report.replace("$VOTES$", "" + currNode.getNumVotes());
report = report.replace("$NUM_POSITIVE$", "" + currNode.getNumVotesUp());
report = report.replace("$NUM_NEGATIVE$", "" + currNode.getNumVotesDown());
report = report.replace("$TEXT$", btAnnotate + " " + highlightArgument(currNode.getText(), arg));
report = report.replace("$TEXT$", btAnnotate + " " + highlightArgument(commentBody, arg));

for (DMCommentTree node : tree.getChildren()) {
report += getCommentsInfoReport(node, comments, arguments, labels);
Expand Down

0 comments on commit 7266e88

Please sign in to comment.