From: <lor...@us...> - 2013-05-09 14:04:57
|
Revision: 3969 http://sourceforge.net/p/dl-learner/code/3969 Author: lorenz_b Date: 2013-05-09 14:04:53 +0000 (Thu, 09 May 2013) Log Message: ----------- Refactored pattern eval. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/pattern/OWLAxiomPatternUsageEvaluation.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/pattern/OWLAxiomPatternUsageEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/pattern/OWLAxiomPatternUsageEvaluation.java 2013-05-09 13:41:45 UTC (rev 3968) +++ trunk/scripts/src/main/java/org/dllearner/scripts/pattern/OWLAxiomPatternUsageEvaluation.java 2013-05-09 14:04:53 UTC (rev 3969) @@ -81,6 +81,7 @@ import com.google.common.base.Joiner; import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; +import com.google.common.collect.Sets; import com.google.common.hash.HashCode; import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; @@ -127,6 +128,7 @@ private boolean sampling = true; private double sampleThreshold = 0.8; private int sampleSize = 100; + private Set<String> entites2Ignore = Sets.newHashSet("subject", "Concept", "wikiPage"); public OWLAxiomPatternUsageEvaluation() { } @@ -321,8 +323,13 @@ } } } - } else if(superClass.toString().contains("Concept") || superClass.toString().contains("subject")){ - iter.remove(); + } else { + String classString = superClass.toString(); + for (String s : entites2Ignore) { + if(classString.contains(s)){ + iter.remove(); + } + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |