-
Notifications
You must be signed in to change notification settings - Fork 25
Frequently Asked Questions
- Q: For quality benchmarks, the Qanary components have to execute the same tasks many times. Can I speed up the process?
- Q: While starting a component, I received an error message. How can I solve it?
- Q: How can I skip building the Docker image?
- Q: How do I create a Docker image?
- Q: How do I push a Docker image to Dockerhub?
- Q: How can I identify the available components in a Qanary system?
- Q: Is there a simple UI to configure and run a Qanary system?
- Q: Why does the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion) not allow queries to the Qanary triplestore?
- Q: An answer query was stored in the Qanary triplestore. Why can’t I add it to a new Yasgui tab in the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion)?
-
Q: I want to use another triplestore than the current support triplestores. What do I need to do?
- A: To integrate support for another triplestore, implement the abstract class
QanaryTripleStoreConnector
inqanary.commons
package. - Q: What do I need to do if I want to use Openlink Virtuoso as the Qanary triplestore?
- Q: I integrated Openlink Virtuoso as the Qanary triplestore. Why do I receive the error
The function gethostbyname returned error 1 for host "www.w3.org".
.
- A: To integrate support for another triplestore, implement the abstract class
Q: For quality benchmarks, the Qanary components have to execute the same tasks many times. Can I speed up the process?
Several components support caching. It just needs to be configured. To do so, you need to define the environment parameter qanary.webservicecalls.cache.specs
. As in Qanary the Caffeine caching library is used, the configuration is done with the Caffeine syntax.
qanary.webservicecalls.cache.specs=maximumSize=33333,expireAfterAccess=360s
Here while configuring the Qanary QAnswer component:
version: "3.7"
services:
qb-qanswer:
image: qanary/qanary-component-qbe-qanswer:latest
ports:
- 11022:11022
restart: unless-stopped
environment:
- SERVER_PORT=11022
- SPRING_BOOT_ADMIN_URL=http://localhost:8080
- SERVER_HOST=http://localhost
- SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE-BASE-URL=http://localhost:11022
- QANARY.WEBSERVICECALLS.CACHE.SPECS=maximumSize=33333,expireAfterAccess=360s
network_mode: host
I developed a component, while starting it, the following error message is printed.
Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2017-02-10 20:50:36.978 INFO 8217 --- [ main] e.w.qanary.geospatialsearch.Application : No active profile set, falling back to default profiles: default
2017-02-10 20:50:42.541 INFO 8217 --- [ main] e.w.q.component.QanaryServiceController : qanaryComponent: eu.wdaqua.qanary.geospatialsearch.RelationDetection@84b1aae
2017-02-10 20:50:45.622 INFO 8217 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2017-02-10 20:50:46.219 ERROR 8217 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler ["http-nio-5555"]
While starting a component, it is bound to a port on your machine. If you run several components on your machine, you have to ensure that all components use different ports. To check this at a (Linux) shell, you can use the following command to check the currently used ports (execute in your main Qanary development directory):
grep -R --exclude-dir="target" "server\.port=" | sort
Building the Docker instances of the Qanary components takes some time and disk space. Can I skip the creation of the Docker images?
While building the Qanary components with Maven, you can add the switch -DskipDockerBuild
, e.g.:
mvn -DskipDockerBuild package
You can see the effect in the output:
[INFO] Skipping docker build
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Note: Only an executable JAR is created (see folder: /<componentname>/target
).
Note: If your component does not use Maven (i.e., components built with Python), you can find more detailed information here: How-do-I-get-Docker-images-for-Qanary-components?.
A: Look at the component’s configuration (mostly application.properties
) or the Web-based Qanary Pipeline admin interface.
Option 1: While running, each component provides an identifier to the Qanary system where it is registered (note: make sure it actually has registered itself). It is defined (and can be changed) in the file application.properties
(see also this note about configuration) of each component using the property spring.application.name
(e.g., here for the Qanary DBpedia Spotlight NER Component).
Option 2: While starting the Qanary Pipeline, a Web-based admin interface is provided at the pipeline’s port. For example, while running your Qanary Pipeline on port 8080 at your localhost (see exemplary configuration), the admin interface will be available at http://localhost:8080/. The admin interface provides a Web page containing a table representing the registered (hence, available) components and their names.
Note: These component names are required to define a Qanary Pipeline.
See <yourserver>:<yourport>/startquestionansweringwithtextquestion
to set up a simple Qanary pipeline using the currently available components.
While using the default configuration, this frontend would be available at http://localhost:8080/startquestionansweringwithtextquestion.
Q: Why does the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion) not allow queries to the Qanary triplestore?
When using the tab find computed query
the request returns Unauthorized (#401)
. The same happens for all tabs using the Qanary triplestore endpoint.
For more details, see the tutorial Setting-custom-headers-in-YASGUI-tabs.
Q: An answer query was stored in the Qanary triplestore. Why can’t I add it to a new Yasgui tab in the simple test frontend (locally available at http://localhost:8080/startquestionansweringwithtextquestion)?
Your Qanary process computed an answer query that was stored in the Qanary triplestore. However, while using the button Add the computed SPARQL query of your Question Answering process as a new SPARQL query tab
the created query does not appear (automatically) in one of the Yasgui tabs.
Q: I want to use another triplestore than the current support triplestores. What do I need to do?
A: To integrate support for another triplestore, implement the abstract class QanaryTripleStoreConnector
in qanary.commons
package.
There, just a couple of methods need to be implemented to provide specific support for your triplestore. Important: Just one triplestore provide is allowed to be activated while starting a Qanary system. Using the Spring annotation ConditionalOnProperty
has proven to be useful to ensure a direct connection between config parameters and one specific class (examples: here and here).
Q: What do I need to do if I want to use Openlink Virtuoso as the Qanary triplestore?
For details, see the documentation of triplestore configuration.
Q: I integrated Openlink Virtuoso as the Qanary triplestore. Why do I receive the error The function gethostbyname returned error 1 for host "www.w3.org".
.
The problem is caused by the Internet access configuration of your Openlink Virtuoso instance. Therefore, the Virtuoso cannot access the public endpoints where the ontology definitions are available. E.g., the following SPARQL query cannot be executed:
LOAD <http://www.w3.org/ns/oa.rdf> INTO GRAPH <urn:graph:...>
To solve the problem, add the following attributes to your virtuoso.ini
to enable access to the proxy server address in your network:
[HTTPServer]
HTTPProxyEnabled = 1
HTTPProxyServer = $INSERT-YOUR-PROXY-SERVER-ADDRESS$
HTTPProxyExceptions = localhost,127.0.0.1
Remark: Thanks to gyej7354 for providing the solution.
-
How to establish a Docker-based Qanary Question Answering system
-
How to implement a new Qanary component
... using Java?
... using Python (Qanary Helpers)?
... using Python (plain Flask service)?