Wiki

Clone wiki

DBtrends / Home

Welcome

DBtrends is about easy browse features, knowledge summarization and ranking.

There are several ranking and index algorithms available. In DBtrends we try to put them together in a lightweight library, so you can easily use them in your projects.

DBtrends do not run on service, it offers useful methods in an easy and self contained library.

There is no need for a database, third party libraries or configuration.

Download, plug & play.

To citate this work please use:

@inproceedings{dbtrends2016,
author = {Marx, Edgard and Zaveri, Amrapali and Mohammed, Mofeed and Rautenberg, Sandro and Lehmann, Jens and Ngomo, Axel-Cyrille Ngonga and Cheng, Gong},
booktitle = {13th Extended Semantic Web Conference (ESWC 2016), 2nd International Workshop on Summarizing and Presenting Entities and Ontologies}, series = {SUMPRE'16}, 
title = {{DBtrends} : {P}ublishing and {B}enchmarking {RDF} {R}anking {F}unctions}, year = 2016 }

API highlighting

###Classes There are three types of classes: Entity, Class and Property.

Each of the provided classes has its label and URI and its own ranks.

Except for the Entity class which also provides the Wikipage.

#!Java

Entity entity = new Entity();
entity.getPage();
###Methods

In DBtrends all methods are accessible over static functions.

It works like this.

#!Java

Entity leipzig = Knowledgebase.DBpedia39.getEntity("http://dbpedia.org/resource/Leipzig");
Class thing = Knowledgebase.DBpedia39.getClass("http://www.w3.org/2002/07/owl#Thing");
Property label = Knowledgebase.DBpedia39.getProperty("http://www.w3.org/2000/01/rdf-schema#label");

Wait, maybe you want to retrieve a list of entities...

#!Java

String[] entities = new String[2];
entities[0] = "http://dbpedia.org/resource/Leipzig";
entities[1] = "http://dbpedia.org/resource/Berlin";
List<Entity> entities = Knowledgebase.DBpedia39.getEntities(entities);

####You can also use useful ranking methods

You can sort Entities using a provided rank with the sort method,

#!Java

List<Entity> entities = ...
Knowledgebase.sort(entities, Entity.Comparator.DBRANK);

or maybe rank a list of entities given just a list of Entities URIs.

#!Java

String[] entities = new String[2];
entities[0] = "http://dbpedia.org/resource/Leipzig";
entities[1] = "http://dbpedia.org/resource/Berlin";
Knowledgebase.DBpedia39.sort(entities, Entity.Comparator.DBRANK);

####or browse Entities, Properties and Classes

#!Java

// return entities containing the string "Ayrton" with pagination starting from 0 to 10 sorting by label using no order.
List<Entity> entities = Knowledgebase.DBpedia39.getEntities("Ayrton", 0, 10, Entity.Field.LABEL, Order.NON);

#### as well as retrieve Entities, Classes or Properties by the occurrence of a particular term(s)

#!Java

// return entities containing the term "height".
List<Entity> entities = Knowledgebase.DBpedia39.getEntitiesByTerms("height");

#### or just iterate over it

#!Java

// return an iterable
Iterable<Entity> entities = Knowledgebase.DBpedia39.getEntities();
for(Entity e : entities) {
...
}

#### or get some terms occurrences

#!Java

// return an integer containing the number of resources (predicate, classes, entities) with the given term(s)
Integer occurrence = Knowledgebase.DBpedia39
                .getTermOccurrence("ayrton");

#### Using DBtrends on your project

1) Add the following dependency on your project:

<dependencies>
  <dependency>
    <groupId>org.dbtrends</groupId>
    <artifactId>dbtrends.core</artifactId>
    <version>0.1.3-beta2</version>
  </dependency>
...
</dependencies>

2) Add the internal AKSW repository on your pom file:

<repositories>
    <repository>
      <id>maven.aksw.internal</id>
      <name>University Leipzig, AKSW Maven2 Repository</name>
      <url>http://maven.aksw.org/archiva/repository/internal</url>
    </repository>
  ...
</repositories>

3) Rock it.. ;-)

If you still have doubts about the ranks, you can find useful information at http://dbtrends.org.

If you have doubts about the API, you can read the class documentation.

Have fun!

Updated