Skip to content

Commit

Permalink
removed debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mrj4001 committed Jan 20, 2025
1 parent 930e10e commit 69f356e
Showing 1 changed file with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions src/main/java/reciter/controller/ReCiterController.java
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,10 @@ public ResponseEntity runFeatureGenerator(@RequestParam(value = "uid") String ui
stopWatch.start("Feature generation for UID");

final double totalScore;
System.out.println("authorshipLikelihoodScore :"+authorshipLikelihoodScore);
System.out.println("totalArticleScoreStandardizedDefault :"+totalArticleScoreStandardizedDefault);
if(authorshipLikelihoodScore == null) {
totalScore = totalArticleScoreStandardizedDefault; // Configuring the totalScore in multiple of 10's in application.properties file
} else {
totalScore = authorshipLikelihoodScore; // Configuring the totalScore in multiple of 10's in application.properties file
}
System.out.println("totalScore*************"+totalScore);
EngineOutput engineOutput;
EngineParameters parameters;
List<ReCiterArticleFeature> originalFeatures = new ArrayList<ReCiterArticleFeature>();
Expand Down Expand Up @@ -513,24 +509,13 @@ public ResponseEntity runFeatureGenerator(@RequestParam(value = "uid") String ui
//Count pending pubs
if(analysis.getReCiterFeature()!=null && analysis.getReCiterFeature().getReCiterArticleFeatures()!=null)
{
/*analysis.getReCiterFeature().setCountPendingArticles(analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
analysis.getReCiterFeature().setCountPendingArticles(analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
.filter(reCiterArticleFeature -> (reCiterArticleFeature.getAuthorshipLikelihoodScore() >= totalScore
&&
reCiterArticleFeature.getUserAssertion() == PublicationFeedback.NULL))
.count());*/
.count());
analysis.getReCiterFeature().setCountPendingArticles(
analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
.filter(reCiterArticleFeature -> {
// Print the AuthorshipLikelihoodScore
System.out.println("reCiterArticleFeature.getAuthorshipLikelihoodScore()" + reCiterArticleFeature.getAuthorshipLikelihoodScore() +
"totalScore"+ totalScore);

// Return the condition for the filter
return reCiterArticleFeature.getAuthorshipLikelihoodScore() >= totalScore &&
reCiterArticleFeature.getUserAssertion() == PublicationFeedback.NULL;
})
.count());
}
else if(analysis.getReCiterFeature()!=null)
{
Expand All @@ -541,7 +526,7 @@ else if(analysis.getReCiterFeature()!=null)
{
if(filterByFeedback == FilterFeedbackType.ALL || filterByFeedback == null) {
/*analysis.getReCiterFeature().setReCiterArticleFeatures(analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
analysis.getReCiterFeature().setReCiterArticleFeatures(analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
.filter(reCiterArticleFeature -> (reCiterArticleFeature.getAuthorshipLikelihoodScore() >= totalScore
&&
reCiterArticleFeature.getUserAssertion() == PublicationFeedback.NULL)
Expand All @@ -550,22 +535,8 @@ else if(analysis.getReCiterFeature()!=null)
||
reCiterArticleFeature.getUserAssertion() == PublicationFeedback.REJECTED
)
.collect(Collectors.toList()));*/
.collect(Collectors.toList()));
analysis.getReCiterFeature().setReCiterArticleFeatures(
analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
.peek(reCiterArticleFeature ->
System.out.println("AuthorshipLikelihoodScore: " + reCiterArticleFeature.getAuthorshipLikelihoodScore() + "totalScore :"+totalScore)

)
.filter(reCiterArticleFeature ->
(reCiterArticleFeature.getAuthorshipLikelihoodScore() >= totalScore &&
reCiterArticleFeature.getUserAssertion() == PublicationFeedback.NULL)
|| reCiterArticleFeature.getUserAssertion() == PublicationFeedback.ACCEPTED
|| reCiterArticleFeature.getUserAssertion() == PublicationFeedback.REJECTED
)
.collect(Collectors.toList())
);
//List<Long> selectedArticles = analysis.getReCiterFeature().getReCiterArticleFeatures().stream().map(article -> article.getPmid()).collect(Collectors.toList());
List<ReCiterArticle> reCiterFeatureArticles = analysis.getReCiterFeature().getReCiterArticleFeatures().stream()
Expand Down

0 comments on commit 69f356e

Please sign in to comment.