Ask Your Question
0

I have a Problem in parsing OWL to Prolog Triples

asked 2012-11-16 10:09:20 -0600

آمال gravatar image

updated 2012-11-24 07:38:23 -0600

Hi all,

(((1)))I do not have more experience in KnowRob, so I now try to run command and see its effects and so on I was trying to parse Owl file into Prolog so I use this command

 owl_parse('home/amal/pizza.owl', false, false, true).

I get this error

   bash: syntax error near unexpected token `'home/amal/pizza.owl','

1- What is the Problem

2- I do not Understand Why false false true in the command ?!


(((2))) It always give me false, I flow this tutorial (Reasoning about objects at knowrob wiki) and also get false, so what is the problem


Terminal:

amal@amal-HP-G62-Notebook-PC:~$ roscd knowrob_tutorial
amal@amal-HP-G62-Notebook-PC:~/ros/pkgs/tum-ros-pkg/knowledge/knowrob_tutorial$ rosrun rosprolog rosprolog knowrob_tutorial
% library(swi_hooks) compiled into pce_swi_hooks 0.00 sec, 2,224 bytes
%     library(error) compiled into error 0.00 sec, 10,220 bytes
%    library(lists) compiled into lists 0.00 sec, 25,320 bytes
%   library(shlib) compiled into shlib 0.00 sec, 37,148 bytes
%   library(option) compiled into swi_option 0.00 sec, 8,468 bytes
%  library(process) compiled into process 0.00 sec, 55,748 bytes
% /opt/ros/fuerte/stacks/knowrob/rosprolog/prolog/init.pl compiled 0.00 sec, 60,268 bytes
%     library(jpl) compiled into jpl 0.02 sec, 171,488 bytes
%         library(sgml) compiled into sgml 0.01 sec, 25,072 bytes
%           library(quintus) compiled into quintus 0.00 sec, 11,676 bytes
%          rewrite compiled into rewrite 0.00 sec, 19,736 bytes
%          library(uri) compiled into uri 0.00 sec, 8,060 bytes
%          library(record) compiled into record 0.00 sec, 19,532 bytes
%         rdf_parser compiled into rdf_parser 0.01 sec, 87,476 bytes
%          library(gensym) compiled into gensym 0.00 sec, 2,580 bytes
%         rdf_triple compiled into rdf_triple 0.00 sec, 22,132 bytes
%        library(rdf) compiled into rdf 0.02 sec, 154,404 bytes
%         library(debug) compiled into prolog_debug 0.01 sec, 12,180 bytes
%         library(assoc) compiled into assoc 0.00 sec, 19,484 bytes
%        library(sgml_write) compiled into sgml_write 0.01 sec, 68,120 bytes
%        library(nb_set) compiled into nb_set 0.00 sec, 3,400 bytes
%         library(utf8) compiled into utf8 0.00 sec, 7,108 bytes
%        library(url) compiled into url 0.01 sec, 63,416 bytes
%        rdf_cache compiled into rdf_cache 0.01 sec, 9,016 bytes
%       library(semweb/rdf_db) compiled into rdf_db 0.05 sec, 398,008 bytes
%      comp_similarity compiled into comp_similarity 0.06 sec, 414,548 bytes
%     /opt/ros/fuerte/stacks/knowrob/ias_prolog_addons/prolog/init.pl compiled 0.06 sec, 415,236 bytes
%      library(broadcast) compiled into broadcast 0.00 sec, 4,156 bytes
%     library(semweb/rdf_edit) compiled into rdf_edit 0.01 sec, 48,796 bytes
%     library(semweb/rdfs) compiled into rdfs 0.00 sec, 14,256 bytes
%     library(semweb/owl) compiled into t20_owl 0.01 sec, 37,936 bytes
%       library(socket) compiled into socket 0.00 sec, 7,060 bytes
%       library(base64) compiled into base64 0.00 sec, 9,640 bytes
%      library(http/http_open.pl) compiled into http_open 0.01 ...
(more)
edit retag flag offensive close merge delete

Comments

1

I want to edit the Q, but does not want to do this and say "Could not post, because your karma is insufficient to publish links " I does not add links it is just a copy from my terminal, I was can do this in normal but does not know what is the problem now ?! so why?!

آمال gravatar imageآمال ( 2012-11-16 10:53:17 -0600 )edit

What I want to edit I run 'roswtf' .... No package or stack in context,Static checks summary: No errors or warnings, ROS Master does not appear to be running. Online graph checks will not be run. ROS_MASTER_URI is [http://localhost:11311]

آمال gravatar imageآمال ( 2012-11-16 10:55:20 -0600 )edit

also I try http://ias.cs.tum.edu/kb/wiki/index.php/Reasoning_about_actions It work except this instruction '?- owl_parse('owl/pancake-making.owl', false, false, true).' ... I get this error "ERROR: toplevel: Undefined procedure: owl_parse/4 (DWIM could not correct goal)" ... also It is really exist!

آمال gravatar imageآمال ( 2012-11-16 10:58:13 -0600 )edit

also I try http://ias.cs.tum.edu/kb/wiki/index.php/Reasoning_about_actions It work except this instruction '?- owl_parse('owl/pancake-making.owl', false, false, true).' ... I get this error "ERROR: toplevel: Undefined procedure: owl_parse/4 (DWIM could not correct goal)" ... also It is really exist!

آمال gravatar imageآمال ( 2012-11-16 10:58:14 -0600 )edit

@Ricky I get false, I think I have to read at SWI-Prolog, I Will start from HOWTO collection and , then try again. Do you recommend any else ?! Thanks

آمال gravatar imageآمال ( 2012-11-18 10:08:45 -0600 )edit

I don't understand why you have to read SWI-Prolog? After running rosrun rosprolog rosprolog mod_vis you'll see the prompt that enables you to use owl_parse(). See this:http://i.imgur.com/CBTMP.png

Po-Jen Lai gravatar imagePo-Jen Lai ( 2012-11-18 14:59:02 -0600 )edit

OK Thanks It is worked

آمال gravatar imageآمال ( 2012-11-19 05:30:45 -0600 )edit

Good~ : )

Po-Jen Lai gravatar imagePo-Jen Lai ( 2012-11-19 06:19:13 -0600 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2012-11-17 13:42:34 -0600

The command

owl_parse('home/amal/pizza.owl', false, false, true).

should be used after you started the knowrob system by

rosrun rosprolog rosprolog mod_vis

The function you called is defined in owl_parser.pl of the package "thea"

owl_parse(URL, RDF_Load_Mode, OWL_Parse_Mode,Imports) :-
    (   RDF_Load_Mode=complete,!,rdf_retractall(_,_,_); true),
    retractall(rdf_db:rdf_source(_,_,_,_)),
    rdf_load_stream(URL,[URL],Imports),
    owl_parse(OWL_Parse_Mode).

It's some options, I don't understand the meaning of these arguments.If you are really interested in this, a way to understand them is to see where they are used. For example, you can understand the meaning of "OWL_Parse_Mode" by tracing this

owl_parse(OWL_Parse_Mode).
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-11-16 10:09:20 -0600

Seen: 683 times

Last updated: Nov 24 '12