From 15bae02aa12a1e7c89cab6c728ec976774535aa4 Mon Sep 17 00:00:00 2001 From: Bernd Kiefer Date: Fri, 19 Jul 2024 17:05:37 +0200 Subject: [PATCH] Fix problem with RDF sythetic top type --- compiler/pom.xml | 2 +- library/pom.xml | 4 ++-- .../java/de/dfki/mlt/rudimant/agent/nlp/DiaHierarchy.java | 5 ++++- pom.xml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/pom.xml b/compiler/pom.xml index 2f52d049..773433d0 100644 --- a/compiler/pom.xml +++ b/compiler/pom.xml @@ -11,7 +11,7 @@ de.dfki.mlt vonda-top - 3.3 + 3.3.1 .. diff --git a/library/pom.xml b/library/pom.xml index cb753a49..ecb90a83 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -11,7 +11,7 @@ de.dfki.mlt vonda-top - 3.3 + 3.3.1 .. @@ -19,7 +19,7 @@ de.dfki.lt.hfc hfc - [1.5.2,) + [1.5.7,) diff --git a/library/src/main/java/de/dfki/mlt/rudimant/agent/nlp/DiaHierarchy.java b/library/src/main/java/de/dfki/mlt/rudimant/agent/nlp/DiaHierarchy.java index 3e00a5be..e0acdba6 100644 --- a/library/src/main/java/de/dfki/mlt/rudimant/agent/nlp/DiaHierarchy.java +++ b/library/src/main/java/de/dfki/mlt/rudimant/agent/nlp/DiaHierarchy.java @@ -19,6 +19,7 @@ package de.dfki.mlt.rudimant.agent.nlp; +import de.dfki.lt.hfc.db.rdfProxy.RdfClass; import de.dfki.lt.hfc.db.rdfProxy.RdfHierarchy; import de.dfki.lt.hfc.db.rdfProxy.RdfProxy; import de.dfki.lt.tr.dialogue.cplan.DagNode; @@ -39,7 +40,9 @@ public class DiaHierarchy implements Hierarchy { /** Initialize the hierarchy based on the RDF class hierarchy */ public DiaHierarchy(RdfProxy proxy) { _hier = proxy.getHierarchy(); - assert(_hier.getVertex(DagNode.TOP_TYPE) == DagNode.TOP_ID); + RdfClass top = proxy.fetchClass(DagNode.TOP_TYPE); + assert top != null; + assert(_hier.getVertex(top.toString()) == DagNode.TOP_ID); } /** Return a code for the given feature name */ diff --git a/pom.xml b/pom.xml index 12e4f39d..7f8cfe18 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ de.dfki.mlt vonda-top - 3.3 + 3.3.1 pom