Skip to content

Commit 5a2e9c1

Browse files
authored
change sonatype repo to https and fix double to float conversions (#12)
* change sonatype repo to https and fix double to float conversions * change sonatype repo to https and fix double to float conversions
1 parent 654d967 commit 5a2e9c1

File tree

4 files changed

+38
-37
lines changed

4 files changed

+38
-37
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<repositories>
6767
<repository>
6868
<id>oss.sonatype.org-snapshot</id>
69-
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
69+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
7070
<releases>
7171
<enabled>false</enabled>
7272
</releases>

src/main/java/org/scify/jedai/gui/utilities/DynamicMethodConfiguration.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public static IBlockBuilding configureBlockBuildingMethod(BlockBuildingMethod me
160160
);
161161
case EXTENDED_Q_GRAMS_BLOCKING:
162162
return new ExtendedQGramsBlocking(
163-
(double) parameters.get(1).getRight(),
163+
(float) parameters.get(1).getRight(),
164164
(int) parameters.get(0).getRight()
165165
);
166166
case EXTENDED_SORTED_NEIGHBORHOOD:
@@ -248,7 +248,7 @@ public static ISimilarityJoin configureSimilarityJoinMethod(String methodName,
248248
);
249249
case JedaiOptions.ALL_PAIRS_TOKEN_BASED:
250250
return new org.scify.jedai.similarityjoins.tokenbased.AllPairs(
251-
(double) parameters.get(0).getRight() // Threshold
251+
(float) parameters.get(0).getRight() // Threshold
252252
);
253253
case JedaiOptions.FAST_SS:
254254
return new FastSS(
@@ -260,7 +260,7 @@ public static ISimilarityJoin configureSimilarityJoinMethod(String methodName,
260260
);
261261
case JedaiOptions.PP_JOIN:
262262
return new PPJoin(
263-
(double) parameters.get(0).getRight() // Threshold
263+
(float) parameters.get(0).getRight() // Threshold
264264
);
265265
default:
266266
return null;
@@ -316,8 +316,8 @@ public static IBlockProcessing configureComparisonCleaningMethod(String methodNa
316316
break;
317317
case JedaiOptions.CANOPY_CLUSTERING:
318318
processingMethod = new CanopyClustering(
319-
(double) parameters.get(0).getRight(), // Inclusive threshold
320-
(double) parameters.get(1).getRight() // Exclusive threshold
319+
(float) parameters.get(0).getRight(), // Inclusive threshold
320+
(float) parameters.get(1).getRight() // Exclusive threshold
321321
);
322322
break;
323323
case JedaiOptions.CANOPY_CLUSTERING_EXTENDED:
@@ -347,17 +347,17 @@ public static IBlockProcessing configureBlockCleaningMethod(String methodName,
347347
switch (methodName) {
348348
case JedaiOptions.BLOCK_FILTERING:
349349
processingMethod = new BlockFiltering(
350-
(double) parameters.get(0).getRight()
350+
(float) parameters.get(0).getRight()
351351
);
352352
break;
353353
case JedaiOptions.SIZE_BASED_BLOCK_PURGING:
354354
processingMethod = new SizeBasedBlockPurging(
355-
(double) parameters.get(0).getRight()
355+
(float) parameters.get(0).getRight()
356356
);
357357
break;
358358
case JedaiOptions.COMPARISON_BASED_BLOCK_PURGING:
359359
processingMethod = new ComparisonsBasedBlockPurging(
360-
(double) parameters.get(0).getRight()
360+
(float) parameters.get(0).getRight()
361361
);
362362
break;
363363
}
@@ -418,41 +418,41 @@ public static IEntityClustering configureEntityClusteringMethod(String methodNam
418418
switch (methodName) {
419419
case JedaiOptions.CENTER_CLUSTERING:
420420
ecMethod = new CenterClustering(
421-
(double) parameters.get(0).getRight()
421+
(float) parameters.get(0).getRight()
422422
);
423423
break;
424424
case JedaiOptions.CONNECTED_COMPONENTS_CLUSTERING:
425425
ecMethod = new ConnectedComponentsClustering(
426-
(double) parameters.get(0).getRight()
426+
(float) parameters.get(0).getRight()
427427
);
428428
break;
429429
case JedaiOptions.CUT_CLUSTERING:
430430
ecMethod = new CutClustering(
431-
(double) parameters.get(1).getRight(), // 1st parameter of CutClustering, but 2nd in JedAI-core
432-
(double) parameters.get(0).getRight()
431+
(float) parameters.get(1).getRight(), // 1st parameter of CutClustering, but 2nd in JedAI-core
432+
(float) parameters.get(0).getRight()
433433
);
434434
break;
435435
case JedaiOptions.MARKOV_CLUSTERING:
436436
ecMethod = new MarkovClustering(
437-
(double) parameters.get(1).getRight(), // Cluster Threshold
438-
(double) parameters.get(2).getRight(), // Matrix Similarity Threshold
437+
(float) parameters.get(1).getRight(), // Cluster Threshold
438+
(float) parameters.get(2).getRight(), // Matrix Similarity Threshold
439439
(int) parameters.get(3).getRight(), // Similarity Checks Limit
440-
(double) parameters.get(0).getRight() // Similarity Threshold
440+
(float) parameters.get(0).getRight() // Similarity Threshold
441441
);
442442
break;
443443
case JedaiOptions.MERGE_CENTER_CLUSTERING:
444444
ecMethod = new MergeCenterClustering(
445-
(double) parameters.get(0).getRight()
445+
(float) parameters.get(0).getRight()
446446
);
447447
break;
448448
case JedaiOptions.RICOCHET_SR_CLUSTERING:
449449
ecMethod = new RicochetSRClustering(
450-
(double) parameters.get(0).getRight()
450+
(float) parameters.get(0).getRight()
451451
);
452452
break;
453453
case JedaiOptions.UNIQUE_MAPPING_CLUSTERING:
454454
ecMethod = new UniqueMappingClustering(
455-
(double) parameters.get(0).getRight()
455+
(float) parameters.get(0).getRight()
456456
);
457457
break;
458458
}
@@ -476,7 +476,7 @@ public static IEntityMatching configureEntityMatchingMethod(String emMethodName,
476476
switch (emMethodName) {
477477
case JedaiOptions.GROUP_LINKAGE:
478478
// Get similarity threshold, representation model & similarity metric
479-
double simThr = (parameters != null) ? (double) parameters.get(2).getRight() : 0.5;
479+
float simThr = (parameters != null) ? (float) parameters.get(2).getRight() : 0.5F;
480480
rep = (parameters != null) ?
481481
(RepresentationModel) parameters.get(0).getRight() : RepresentationModel.TOKEN_UNIGRAM_GRAPHS;
482482
simMetric = (parameters != null) ?

src/main/java/org/scify/jedai/gui/utilities/WorkflowManager.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.scify.jedai.utilities.datastructures.AbstractDuplicatePropagation;
2222
import org.scify.jedai.utilities.enumerations.BlockBuildingMethod;
2323

24+
import java.nio.channels.FileLock;
2425
import java.util.ArrayList;
2526
import java.util.List;
2627

@@ -403,7 +404,7 @@ private ClustersPerformance executeFullBlockingBasedWorkflow(Label statusLabel)
403404
*/
404405
private ClustersPerformance executeFullJoinBasedWorkflow(Label statusLabel) {
405406
// todo: make this method use addBlocksPerformance()...
406-
double overheadStart = System.currentTimeMillis();
407+
float overheadStart = System.currentTimeMillis();
407408
boolean isDirtyEr = erType.equals(JedaiOptions.DIRTY_ER);
408409

409410
// Similarity Join
@@ -429,7 +430,7 @@ private ClustersPerformance executeFullJoinBasedWorkflow(Label statusLabel) {
429430
entityClusters = ec.getDuplicates(simPairs);
430431

431432
// Create clusters performance
432-
double overheadEnd = System.currentTimeMillis();
433+
float overheadEnd = System.currentTimeMillis();
433434
ClustersPerformance clp = new ClustersPerformance(entityClusters, duplicatePropagation);
434435
clp.setStatistics();
435436
clp.printStatistics(overheadEnd - overheadStart, ec.getMethodName(), ec.getMethodConfiguration());
@@ -475,7 +476,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
475476

476477
// Print performance
477478
double totalTime = overheadEnd - overheadStart;
478-
blp.printStatistics(totalTime, bb.getMethodConfiguration(), bb.getMethodName());
479+
blp.printStatistics((float) totalTime, bb.getMethodConfiguration(), bb.getMethodName());
479480

480481
// Save the performance of block building
481482
this.addBlocksPerformance(bb.getMethodName(), totalTime, blp);
@@ -526,7 +527,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
526527
// Get original recall
527528
ClustersPerformance clp = new ClustersPerformance(originalClusters, duplicatePropagation);
528529
clp.setStatistics();
529-
clp.printStatistics(overheadEnd - overheadStart, ec.getMethodName(), ec.getMethodConfiguration());
530+
clp.printStatistics((float) (overheadEnd - overheadStart), ec.getMethodName(), ec.getMethodConfiguration());
530531
originalRecall = clp.getRecall();
531532
}
532533

@@ -605,7 +606,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
605606
Comparison comparison = prioritization.next();
606607

607608
// Calculate the similarity
608-
double similarity = entityMatching.executeComparison(comparison);
609+
float similarity = entityMatching.executeComparison(comparison);
609610
comparison.setUtilityMeasure(similarity);
610611

611612
sims.addComparison(comparison);
@@ -631,7 +632,7 @@ private ClustersPerformance executeFullProgressiveWorkflow(Label statusLabel) {
631632

632633
// Print clustering performance
633634
if (clp != null) {
634-
clp.printStatistics(overheadEnd - overheadStart, ec.getMethodName(),
635+
clp.printStatistics((float) (overheadEnd - overheadStart), ec.getMethodName(),
635636
ec.getMethodConfiguration());
636637

637638
// Add prioritization performance step for workbench
@@ -790,7 +791,7 @@ private List<AbstractBlock> runBlockProcessing(AbstractDuplicatePropagation duPr
790791
blp = new BlocksPerformance(blocks, duProp);
791792
blp.setStatistics();
792793

793-
double totalTime = overheadEnd - overheadStart;
794+
float totalTime = (float) (overheadEnd - overheadStart);
794795
blp.printStatistics(totalTime, currentMethod.getMethodConfiguration(),
795796
currentMethod.getMethodName());
796797

@@ -900,7 +901,7 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
900901
blp = new BlocksPerformance(blocks, duplicatePropagation);
901902
blp.setStatistics();
902903
if (finalRun) {
903-
double totalTime = overheadEnd - overheadStart;
904+
float totalTime =(float) (overheadEnd - overheadStart);
904905

905906
// Print performance
906907
blp.printStatistics(totalTime, bb.getMethodConfiguration(), bb.getMethodName());
@@ -963,7 +964,7 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
963964
ClustersPerformance clp = new ClustersPerformance(entityClusters, duplicatePropagation);
964965
clp.setStatistics();
965966
if (finalRun)
966-
clp.printStatistics(overheadEnd - overheadStart, ec.getMethodName(),
967+
clp.printStatistics((float)(overheadEnd - overheadStart), ec.getMethodName(),
967968
ec.getMethodConfiguration());
968969

969970
return clp;
@@ -976,10 +977,10 @@ private ClustersPerformance runBlockingBasedWorkflow(Label statusLabel, ISchemaC
976977
* @return Number of comparisons
977978
*/
978979
private double getTotalComparisons(List<AbstractBlock> blocks) {
979-
double originalComparisons = 0;
980+
float originalComparisons = 0;
980981
originalComparisons = blocks.stream()
981982
.map(AbstractBlock::getNoOfComparisons)
982-
.reduce(originalComparisons, Double::sum);
983+
.reduce(originalComparisons, Float::sum);
983984
System.out.println("Original comparisons\t:\t" + originalComparisons);
984985
return originalComparisons;
985986
}
@@ -1143,7 +1144,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
11431144

11441145
blp = new BlocksPerformance(blocks, duplicatePropagation);
11451146
blp.setStatistics();
1146-
blp.printStatistics(totalTimeMillis, bb.getMethodConfiguration(),
1147+
blp.printStatistics((float)totalTimeMillis, bb.getMethodConfiguration(),
11471148
bb.getMethodName());
11481149
this.addBlocksPerformance(bb.getMethodName(), totalTimeMillis, blp);
11491150

@@ -1187,7 +1188,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
11871188

11881189
blp = new BlocksPerformance(cleanedBlocks, duplicatePropagation);
11891190
blp.setStatistics();
1190-
blp.printStatistics(totalTimeMillis, bp.getMethodConfiguration(), bp.getMethodName());
1191+
blp.printStatistics((float)totalTimeMillis, bp.getMethodConfiguration(), bp.getMethodName());
11911192
this.addBlocksPerformance(bp.getMethodName(), totalTimeMillis, blp);
11921193

11931194
// Increment index
@@ -1211,7 +1212,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
12111212

12121213
blp = new BlocksPerformance(finalBlocks, duplicatePropagation);
12131214
blp.setStatistics();
1214-
blp.printStatistics(totalTimeMillis, comparisonCleaningMethod.getMethodConfiguration(),
1215+
blp.printStatistics((float)totalTimeMillis, comparisonCleaningMethod.getMethodConfiguration(),
12151216
comparisonCleaningMethod.getMethodName());
12161217
this.addBlocksPerformance(comparisonCleaningMethod.getMethodName(), totalTimeMillis, blp);
12171218

@@ -1335,7 +1336,7 @@ private ClustersPerformance runStepByStepWorkflow(Label statusLabel, boolean ran
13351336
final ClustersPerformance clp = new ClustersPerformance(entityClusters, duplicatePropagation);
13361337
clp.setStatistics();
13371338
// todo: Could set the entire configuration details instead of entity clustering method name & config.
1338-
clp.printStatistics(totalTimeMillis, ec.getMethodName(), ec.getMethodConfiguration());
1339+
clp.printStatistics((float)totalTimeMillis, ec.getMethodName(), ec.getMethodConfiguration());
13391340

13401341
return clp;
13411342
}

src/main/java/org/scify/jedai/gui/wizard/MethodMapping.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ public static ISimilarityJoin getSimilarityJoinMethodByName(String methodName) {
124124
case JedaiOptions.ALL_PAIRS_CHAR_BASED:
125125
return new AllPairs(1);
126126
case JedaiOptions.ALL_PAIRS_TOKEN_BASED:
127-
return new org.scify.jedai.similarityjoins.tokenbased.AllPairs(1.);
127+
return new org.scify.jedai.similarityjoins.tokenbased.AllPairs(1.F);
128128
case JedaiOptions.FAST_SS:
129129
return new FastSS(1);
130130
case JedaiOptions.PASS_JOIN:
131131
return new PassJoin(1);
132132
case JedaiOptions.PP_JOIN:
133-
return new PPJoin(1.);
133+
return new PPJoin(1.F);
134134
default:
135135
return null;
136136
}

0 commit comments

Comments
 (0)