-
Notifications
You must be signed in to change notification settings - Fork 16
AVATAR
AVATAR provides entity summarization and its verbalization.
Supposed we want to summarize the information about Albert Einstein, a famous theoretical physicist, and use DBpedia as knowledge base. The summarization would be as follows
Albert Einstein is a scientist. His death date is April 16, 1955. This scientists' birth places are Ulm, Baden - Württemberg, German Empire and Kingdom of Württemberg. His birth date is March 12, 1879. His field is Physics.
To install AVATAR you need to download it via Git and install it via Maven.
git clone https://github.com/AKSW/SemWeb2NL.git
cd SemWeb2NL
mvn clean install
Afterwards you have to add the dependency to your pom.xml
<dependency>
<groupId>org.aksw.semweb2nl</groupId>
<artifactId>AVATAR</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
1. Add AKSW Maven repository to your pom.xml
<repository>
<id>maven.aksw.snapshot</id>
<name>University Leipzig, AKSW Maven2 Repository</name>
<url>http://maven.aksw.org/archiva/repository/snapshots</url>
</repository>
<repository>
<id>maven.aksw.internal</id>
<name>University Leipzig, AKSW Maven2 Internal Repository</name>
<url>http://maven.aksw.org/archiva/repository/internal</url>
</repository>
2. Add dependency to your pom.xml
<dependency>
<groupId>org.aksw.semweb2nl</groupId>
<artifactId>AVATAR</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
From Java
// set up the SPARQL endpoint, in our case it's DBpedia
SparqlEndpoint endpoint = SparqlEndpoint.getEndpointDBpedia();
// create the verbalizer used to generate the textual summarization
Verbalizer verbalizer = new Verbalizer(endpoint);
// define the entity to summarize
OWLIndividual ind = new OWLNamedIndividualImpl(
IRI.create("http://dbpedia.org/resource/Albert_Einstein"));
// compute summarization of the entity and verbalize it
String summary = verbalizer.summarize(ind);
Alternatively, you can use the main class org.aksw.avatar.Verbalizer
with the following options:
Option (* = required) Description
--------------------- -----------
-?, -h show help
-c, --class <URI> Optionally, you can specify a class
which is supposed to be the most
common type of the entity to
summarize.
--cache Path to cache directory. If not set,
the operating system temporary
directory will be used. (default:
/tmp)
* -e, --endpoint <URL> SPARQL endpoint URL to be used.
-g, --graph URI of default graph for queries on
SPARQL endpoint.
* -i, --individual <URI> The URI of the entity to summarize.
-p, --persontypes Optionally, you can specify the
classes that denote persons in your
knowledge base.
e.g. to summarize the entity http://dbpedia.org/resource/Albert_Einstein
from DBpedia, you can use
-e http://dbpedia.org/sparql
-g http://dbpedia.org
-i http://dbpedia.org/resource/Albert_Einstein
-c http://dbpedia.org/ontology/Scientist
-p http://dbpedia.org/ontology/Person