Package de.fuberlin.wiwiss.pubby.VocabularyStore

Examples of de.fuberlin.wiwiss.pubby.VocabularyStore.CachedPropertyCollection


    if (squash && " ".equals(s)) return "";
    return s;
  }
 
  private void learnHighDegreeProperties(boolean isInverse, int limit) {
    CachedPropertyCollection knownHighProps = isInverse
        ? config.getVocabularyStore().getHighIndegreeProperties()
        : config.getVocabularyStore().getHighOutdegreeProperties();
    Map<Property, Integer> highCounts = isInverse
        ? highIndegreeProperties
        : highOutdegreeProperties;
    StmtIterator it = isInverse
        ? model.listStatements(null, null, resource)
        : resource.listProperties();
    Map<Property, Integer> valueCounts = new HashMap<Property, Integer>();
    while (it.hasNext()) {
      Property p = it.next().getPredicate();
      if (!valueCounts.containsKey(p)) {
        valueCounts.put(p, 0);
      }
      valueCounts.put(p, valueCounts.get(p) + 1);
    }
    for (Property p: valueCounts.keySet()) {
      if (valueCounts.get(p) <= limit) continue;
      knownHighProps.reportAdditional(p);
      if (isInverse) {
        model.removeAll(null, p, resource);
      } else {
        resource.removeAll(p);
      }
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.pubby.VocabularyStore.CachedPropertyCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.