diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e346415..c105b60 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,6 +20,8 @@ jobs:
run: mvn help:evaluate -Dexpression=major.minor.version -q -DforceStdout > version.log
- shell: bash
run: mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout > artifactid.log
+ - name: Set env version
+ run: echo "MM_VERSION=$(cat version.log)" >> $GITHUB_ENV
- name: Set env version
run: echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Set env name
@@ -38,8 +40,8 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./site
- destination_dir: ./
+ publish_dir: ./site/${{ env.MM_VERSION }}
+ destination_dir: ./${{ env.MM_VERSION }}
- run: mvn package -Dmaven.test.skip=true
- name: Create Release
id: create_release
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd8207b..a230bac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+# CHANGELOG version 2.0.1
+
+## General Changes
+
+## Added Features
+
+## Removed Features
+
+## Issues fixed
+
+* Concept creator threw error if domain/range of property is complex expression fixed.
+
# CHANGELOG version 2.0.0
## General Changes
diff --git a/docs/Getting-Started/index.md b/docs/Getting-Started/index.md
index 5364e93..9151f4e 100644
--- a/docs/Getting-Started/index.md
+++ b/docs/Getting-Started/index.md
@@ -15,6 +15,6 @@ sudo apt-get install java
To download LPBenchGen get the latest release [here](https://github.com/dice-group/LPBenchGen/releases/latest).
```bash
-wget https://github.com/dice-group/LPBenchGen/releases/{{ release_version }}/lpbenchgen-{{ version }}.jar
+wget https://github.com/dice-group/LPBenchGen/releases/download/v{{ release_version }}/lpbenchgen-{{ release_version }}.jar
```
diff --git a/pom.xml b/pom.xml
index de27f9a..d7af636 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
${major.version}.${minor.version}
2
0
- 0
+ 1
11
11
2.13.3
diff --git a/src/main/java/org/dice_group/lpbenchgen/dl/creator/OWLTBoxPositiveCreator.java b/src/main/java/org/dice_group/lpbenchgen/dl/creator/OWLTBoxPositiveCreator.java
index 6429408..b8325a3 100644
--- a/src/main/java/org/dice_group/lpbenchgen/dl/creator/OWLTBoxPositiveCreator.java
+++ b/src/main/java/org/dice_group/lpbenchgen/dl/creator/OWLTBoxPositiveCreator.java
@@ -1,6 +1,7 @@
package org.dice_group.lpbenchgen.dl.creator;
import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import org.dice_group.lpbenchgen.config.Configuration;
import org.dice_group.lpbenchgen.config.PosNegExample;
import org.dice_group.lpbenchgen.dl.ConceptLengthCalculator;
@@ -72,6 +73,7 @@ public OWLTBoxPositiveCreator(Configuration conf, IndividualRetriever retriever,
seed=conf.getSeed();
negationMutationRatio=conf.getNegationMutationRatio();
inferDirectSuperClasses=conf.getInferDirectSuperClasses();
+ negationMutationRandom = new Random(seed);
}
@@ -86,7 +88,6 @@ public List getAllowedTypes() {
@Override
public Collection createDistinctConcepts(int noOfConcepts){
- negationMutationRandom = new Random(seed);
Set ret = new HashSet<>();
int toSmallCount=0;
int noResults=0;
@@ -143,7 +144,11 @@ protected Double getConceptLength(OWLClassExpression concept) {
}
- private Collection createConcepts(){
+ /**
+ * Creates a list of class expressions
+ * @return a list of class expressions
+ */
+ public Collection createConcepts(){
List concepts = new ArrayList<>();
List allowedTypes = new ArrayList<>(this.allowedTypes);
for(String type: allowedTypes){
@@ -183,37 +188,41 @@ private Set getAxiomsForClass(OWLClass owlClass) {
}
- private Collection createConceptsFromClass(OWLClass owlClass){
+ /**
+ * Creates a list of class expressions starting at the owlClass
+ * @param owlClass start point of the class expressions
+ * @return list of class expressions
+ */
+ protected Collection createConceptsFromClass(OWLClass owlClass){
Collection ret = new ArrayList<>();
ret.add(owlClass);
addNegationMutation(ret, owlClass);
createConceptFromExpression(owlClass, ret);
getAxiomsForClass(owlClass).forEach(axiom ->{
if(axiom instanceof OWLObjectPropertyRangeAxiom){
- createConceptFromExpression(((OWLObjectPropertyRangeAxiom) axiom), ret);
+ createConceptFromExpression(owlClass, ((OWLObjectPropertyRangeAxiom) axiom), ret);
}
});
return ret;
}
- private void createConceptFromExpression(OWLObjectPropertyRangeAxiom ax, Collection ret) {
+ private void createConceptFromExpression(OWLClass start, OWLObjectPropertyRangeAxiom ax, Collection ret) {
if(1 <= maxDepth) {
OWLObjectPropertyExpression prop = ax.getProperty();
- OWLClassExpression owlClass2 = ax.getRange();
- OWLClassExpression propExpr = new OWLObjectSomeValuesFromImpl(prop, owlClass2);
+ OWLClassExpression propExpr = new OWLObjectSomeValuesFromImpl(prop, start);
if (getConceptLength(propExpr) <= maxConceptLength) {
ret.add(propExpr);
addNegationMutation(ret, propExpr);
- for (OWLClassExpression expr : createConceptFromExpression(owlClass2, getRangePropertiesForClass((OWLClass) owlClass2), 1 + 1)) {
+ for (OWLClassExpression expr : createConceptFromExpression(start, getRangePropertiesForClass(start), 1 + 1)) {
OWLClassExpression pexpr = new OWLObjectSomeValuesFromImpl(prop, expr);
if (getConceptLength(pexpr) <= maxConceptLength) {
addNegationMutation(ret, pexpr);
ret.add(pexpr);
}
}
- for (OWLClass inferredClass : res.getSubClasses(owlClass2).getFlattened()) {
+ for (OWLClass inferredClass : res.getSubClasses(start).getFlattened()) {
if (allowedTypes.contains(inferredClass.getIRI().toString())) {
OWLClassExpression negationPropExpr = new OWLObjectSomeValuesFromImpl(prop, inferredClass);
ret.add(negationPropExpr);
@@ -278,7 +287,6 @@ private Collection createConceptFromExpression(OWLClassExpre
}
-
private Collection getRangePropertiesForClass(OWLClass owlClass) {
Collection ret = new ArrayList<>();
getAxiomsForClass(owlClass).forEach(axiom -> {