有可能用星狗推理器解爱因斯坦之谜(又名斑马之谜)吗?即,以下查询未产生预期结果einsteins_riddle_en:Old_Gold
stardog query myDatabase --reasoning "SELECT ?o WHERE {einsteins_riddle_en:Englishman einsteins_riddle_en:smokes ?o}"
+-------+
| o |
+-------+
+-------+
在执行推理时,您可能需要将数据库配置为使用DL,默认为SL,它对应于ALHIO。
要将标准日志配置为使用DL,请将数据库选项reasoning.type
设置为DL
。
为了完整起见:按照Michael的建议,我最终得到了预期的推断结果
nano database.properties
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
reasoning.schema.graphs = default , http://www.example.org/mySchema
reasoning.punning.enabled = false
reasoning.type=DL
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stardog-admin db drop -n myDB
stardog-admin db create -n myDB --config database.properties einsteins_riddle.ttl
stardog query myDB --reasoning "SELECT ?p ?o WHERE {einsteins_riddle_en:Englishman ?p ?o}"
+------------------------------+------------------------------+
| p | o |
+------------------------------+------------------------------+
| rdf:type | owl:Thing |
| rdf:type | einsteins_riddle_en:Man |
| einsteins_riddle_en:lives_in | einsteins_riddle_en:house-3 |
| einsteins_riddle_en:smokes | einsteins_riddle_en:Old_Gold |
| einsteins_riddle_en:drinks | einsteins_riddle_en:milk |
| einsteins_riddle_en:owns | einsteins_riddle_en:snails |
+------------------------------+------------------------------+
Query returned 6 results in 00:00:10.482
非常感谢!