|
18 | 18 |
|
19 | 19 | package pl.edu.icm.coansys.disambiguation.author;
|
20 | 20 |
|
| 21 | +import org.testng.Assert; |
21 | 22 | import org.testng.annotations.Test;
|
22 | 23 |
|
23 | 24 | import java.util.ArrayList;
|
|
36 | 37 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.CoAuthorsSnameDisambiguatorFullList;
|
37 | 38 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.CosineSimilarity;
|
38 | 39 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.Disambiguator;
|
| 40 | +import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.DisambiguatorFactory; |
39 | 41 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.Intersection;
|
40 | 42 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.IntersectionPerMaxval;
|
41 | 43 | import pl.edu.icm.coansys.disambiguation.author.features.disambiguators.IntersectionPerSum;
|
@@ -183,6 +185,19 @@ public void pig_extractor_DisambiguationExtractorFactory_ALL()
|
183 | 185 | }
|
184 | 186 | }
|
185 | 187 |
|
| 188 | + |
| 189 | + @org.testng.annotations.Test(groups = {"fast"}) |
| 190 | + public void features_disambiguator_factory() { |
| 191 | + String featureDescription = "Intersection#whatever#0.0#0"; |
| 192 | + List<FeatureInfo> filist = FeatureInfo.parseFeatureInfoString(featureDescription); |
| 193 | + FeatureInfo fi = filist.get(0); |
| 194 | + |
| 195 | + DisambiguatorFactory ff = new DisambiguatorFactory(); |
| 196 | + Disambiguator d = ff.create(fi); |
| 197 | + assert(d != null); |
| 198 | + } |
| 199 | + |
| 200 | + |
186 | 201 | @org.testng.annotations.Test(groups = {"fast"})
|
187 | 202 | public void features_disambiguator_calculateAffinity() {
|
188 | 203 | Disambiguator COAUTH = new CoAuthorsSnameDisambiguatorFullList(1,1);
|
@@ -290,7 +305,7 @@ public void pig_extractor_EXTRACT_CONTRIBDATA_GIVENDATA_getting_indicators() thr
|
290 | 305 | // test "climbing up" through inherited tree of extractor, note that EX_PERSON_COANSYS_ID extends EX_PERSON_ID
|
291 | 306 | new EXTRACT_CONTRIBDATA_GIVENDATA("-featureinfo Intersection#EX_PERSON_COANSYS_ID#1.0#1");
|
292 | 307 | }
|
293 |
| - |
| 308 | + |
294 | 309 | // Tools:
|
295 | 310 | private Tuple contribCreator(Object id, Object sname,
|
296 | 311 | Map<String,DataBag>features){
|
|
0 commit comments