-
Notifications
You must be signed in to change notification settings - Fork 16
OWL2NL
Lorenz Bühmann edited this page Apr 12, 2016
·
3 revisions
OWL2NL allows for converting OWL axioms into natural language.
Suppose we have the following axioms in Description Logic syntax:
∃ hasDegree.⊤ ⊑ Person
Parent ≡ Animal ⊓ (≥ 1 hasChildren.⊤)
Student ≡ Person ⊓ (∃ hasHabitat.University) ⊓ (∃ isHardWorking.{true})
OWL2NL will convert the first axiom into
Everything that has a degree is a person.
the second one into
Every parent is an animal that has at least 1 child.
and the last one into
Every student is a person that has as habitat an university and that is hard working.
To install Triple2NL 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</groupId>
<artifactId>OWL2NL</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
1. Add AKSW Maven repository to your pom.xml
<repository>
<id>maven.aksw.internal</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>OWL2NL</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
// the ontology we're working on
OWLOntology ontology = ...
// the axiom we want to convert
OWLAxiom axiom = ...
// create the axiom converter
OWLAxiomConverter converter = new OWLAxiomConverter(ontology);
// convert the axiom into natural language
String text = converter.convert(axiom);