Revision 57655
Added by Michele De Bonis over 4 years ago
AbstractEnrichmentReducer.java | ||
---|---|---|
17 | 17 |
import eu.dnetlib.data.mapreduce.hbase.broker.model.EventWrapper; |
18 | 18 |
import eu.dnetlib.data.proto.OafProtos.Oaf; |
19 | 19 |
import eu.dnetlib.pace.config.DedupConfig; |
20 |
import eu.dnetlib.pace.distance.PaceDocumentDistance; |
|
21 |
import eu.dnetlib.pace.distance.eval.ScoreResult; |
|
22 | 20 |
import eu.dnetlib.pace.model.MapDocument; |
23 | 21 |
import eu.dnetlib.pace.model.ProtoDocumentBuilder; |
22 |
import eu.dnetlib.pace.tree.support.TreeProcessor; |
|
24 | 23 |
import org.apache.commons.lang.StringUtils; |
25 | 24 |
import org.apache.commons.math.util.MathUtils; |
26 | 25 |
import org.apache.hadoop.hbase.client.HTable; |
... | ... | |
160 | 159 |
final MapDocument a = ProtoDocumentBuilder.newInstance(oa.getEntity().getId(), oa.getEntity(), dedupConf.getPace().getModel()); |
161 | 160 |
final MapDocument b = ProtoDocumentBuilder.newInstance(ob.getEntity().getId(), ob.getEntity(), dedupConf.getPace().getModel()); |
162 | 161 |
|
163 |
final ScoreResult sr = new PaceDocumentDistance().between(a, b, dedupConf);
|
|
164 |
return sr.getScore();
|
|
162 |
TreeProcessor tree = new TreeProcessor(dedupConf);
|
|
163 |
return tree.computeScore(a, b);
|
|
165 | 164 |
} |
166 | 165 |
|
167 | 166 |
protected float scale(final double d) { |
Also available in: Unified diff
modification to fit with the tree-dedup