Revision 52803
Added by Claudio Atzori over 5 years ago
ProjectEnrichmentReducer.java | ||
---|---|---|
96 | 96 |
final String otherId = other.getEntity().getId(); |
97 | 97 |
if (!currentId.equals(otherId)) { |
98 | 98 |
|
99 |
final float trust = similarity(current, other); |
|
100 |
events.addAll(ProjectEventFactory.process(context, current, other, trust)); |
|
99 |
final double similarity = similarity(current, other); |
|
100 |
|
|
101 |
if (similarity >= dedupConf.getWf().getThreshold()) { |
|
102 |
|
|
103 |
final float trust = scale(similarity); |
|
104 |
|
|
105 |
events.addAll(ProjectEventFactory.process(context, current, other, trust)); |
|
106 |
} else { |
|
107 |
context.getCounter(counterGroup(), "d < " + dedupConf.getWf().getThreshold()).increment(1); |
|
108 |
} |
|
109 |
|
|
101 | 110 |
} |
102 | 111 |
} |
103 | 112 |
} |
Also available in: Unified diff
avoid to emit enrichment events when the similarity score is below the threshold