Skip to content

Commit d583a23

Browse files
committedJul 16, 2014
tests fixed
1 parent 9e9b99d commit d583a23

File tree

1 file changed

+5
-5
lines changed
  • disambiguation-author/disambiguation-author-logic/src/test/java/pl/edu/icm/coansys/disambiguation/author

1 file changed

+5
-5
lines changed
 

‎disambiguation-author/disambiguation-author-logic/src/test/java/pl/edu/icm/coansys/disambiguation/author/DisambiguationTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import pl.edu.icm.coansys.disambiguation.features.FeatureInfo;
5555

5656
// TODO:
57-
/* EXTRACTORS test build example author for it like this:
57+
/* EXTRACTORS tests. Building metadata (author) example:
5858
//
5959
import pl.edu.icm.coansys.models.DocumentProtos.Author;
6060
Author.Builder ab = Author.newBuilder();
@@ -69,7 +69,8 @@
6969
public class DisambiguationTest {
7070

7171
// Follow name scheme of tests: package_class[_method]
72-
72+
// TODO: split tests into correct packages, rename
73+
7374
@org.testng.annotations.Test(groups = {"fast"})
7475
public void pig_normalizers_ALL() {
7576
String text = "é{(Zaaaażółć 'gęślą', \"jaź(ń)\"}]# æ 1234567890 !@#$%^&*() _+=?/>.<,-";
@@ -215,7 +216,7 @@ public void features_disambiguator_calculateAffinity() {
215216
assert( IPM.calculateAffinity(a, b) == 5.0 );
216217
assert( IPM2.calculateAffinity(a, b) == 5.0 / 10.0 * 3.0 );
217218
assert( I.calculateAffinity(a, b) == 5.0 );
218-
assert( COAUTH.calculateAffinity(a, b) == 4.0 );
219+
assert( COAUTH.calculateAffinity(a, b) == 4.0 / 15.0 );
219220
}
220221

221222
@org.testng.annotations.Test(groups = {"fast"})
@@ -417,8 +418,7 @@ public void pig_ANDs_exec_0() throws Exception {
417418
"true",
418419
"false");
419420

420-
String apr_out = "{({(0,0,[1#{(1),(2),(3)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}]),(1,1,[1#{(1),(2),(3)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}]),(2,2,[1#{(4),(5),(6)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}]),(5,5,[1#{(4),(5),(6)},0#{(1),(2),(3)},7#{(7),(8),(9)},6#{(7),(8),(9)}]),(3,3,[1#{(7),(8),(9)},0#{(7),(8),(9)},7#{(7),(8),(9)},6#{(7),(8),(9)}]),(4,4,[1#{(7),(8),(9)},0#{(7),(8),(9)},7#{(7),(8),(9)},6#{(7),(8),(9)}])},{(1,0,2.0),(2,0,1.0),(3,2,0.0),(4,3,0.0),(5,3,0.0),(4,0,-2.0),(5,0,-2.0),(3,0,-1.0),(4,1,-2.0),(5,1,-2.0),(3,1,-1.0),(4,2,-2.0),(5,2,-2.0)})}";
421-
421+
String apr_out = "{({(0,0,[1#{(1),(2),(3)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}]),(1,1,[1#{(1),(2),(3)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}]),(2,2,[1#{(4),(5),(6)},0#{(1),(2),(3)},7#{(1),(2),(3)},6#{(1),(2),(3)}])},{(1,0,1.6666666),(2,0,0.6666667)}),({(3,3,[1#{(7),(8),(9)},0#{(7),(8),(9)},7#{(7),(8),(9)},6#{(7),(8),(9)}]),(4,4,[1#{(7),(8),(9)},0#{(7),(8),(9)},7#{(7),(8),(9)},6#{(7),(8),(9)}]),(5,5,[1#{(4),(5),(6)},0#{(1),(2),(3)},7#{(7),(8),(9)},6#{(7),(8),(9)}])},{(1,0,1.6666666),(2,0,0.0)})}";
422422
assert( aproximate.exec(input).toString().equals( apr_out ) );
423423

424424
// EXHAUSTIVE

0 commit comments

Comments
 (0)
Please sign in to comment.