是否有可能在java中实现Alexa技能,导入和读取owl文件并执行SPARQL查询? 我已经尝试过,但我面临很多问题和图书馆冲突。
最后一个结果,我实现了它并执行查询但它只能检索本体的类值而不是它们的实例!
以下是maven文件pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>smartrecipesF</groupId>
<artifactId>recipes</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>smartrecipesF</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>alexa-skills-kit-repo</id>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.9.40</version>
</dependency>
<dependency>
<groupId>com.amazon.alexa</groupId>
<artifactId>alexa-skills-kit</artifactId>
<version>1.8.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>edu.stanford.protege</groupId>
<artifactId>org.protege.editor.owl.codegeneration</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-distribution</artifactId>
<version>3.4.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>3.0.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>Launcher</mainClass>
<systemProperties>
<systemProperty>
<key>com.amazon.speech.speechlet.servlet.
disableRequestSignatureCheck</key>
<value>${disableRequestSignatureCheck}</value>
</systemProperty>
<systemProperty>
<key>com.amazon.speech.speechlet.servlet.supportedApplicationIds</key>
<value>${supportedApplicationIds}</value>
</systemProperty>
<systemProperty>
<key>com.amazon.speech.speechlet.servlet.timestampTolerance</key>
<value>${timestampTolerance}</value>
</systemProperty>
</systemProperties>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
希望有人帮忙