Re: [DIG-users] examples
Brought to you by:
dturi
From: Daniele T. <dt...@cs...> - 2006-03-06 10:20:47
|
I am afraid the DIG specification does not allow you to do much more at the moment. The examples on sourceforge, together with the DIG 1.1 specification http://dl-web.man.ac.uk/dig/2003/02/interface.pdf cover all it can be done at the moment. When you ask for the equivalents of a concept DIG willl return only the known concept names (ie atoms), not arbitrary complex ones. You can ask for the equivalents of man who drives a car and you will obtain driver, but if you ask for the equivalents of driver you will only get driver itself back, unless you have other atomic concepts equivalent to it. Daniele Marcin Barnak wrote: >Hello > >Could you tell me where I can find some examples of usuage DIG interface in java applications? The only thing I found (http://dig.sourceforge.net/#examples) is very short and it has explained me how to do only a few things on my knowledge base. >For example if i have defined: > ><defconcept name="man" /> ><defconcept name="driver" /> ><defconcept name="car" /> ><defrole name="drives" /> ><equalc> > <catom name="driver" /> > <and> > <catom name="man" /> > <some> > <ratom name="drives" /> > <catom name="car" /> > </some> > </and> ></equalc> > >Then if I will write in my java program: > >ConceptId driver = ConceptId.Factory.newInstance(); >Named d = driver.addNewCatom(); >driver.setId("qDri"); >d.setName("driver"); >Set equivalents = reasoner.parentsNames(driver, kbURI); > >then i will get the answer that shows me that driver is a man, but I have no idea how to ask to get the information that he drives a car. Of course, the problem with driver is a simple one, but I would like to ask about more complex structures as well. >Tell me if I can find somewhere examples, that explain me how to do it? > >Regards >Marcin Barnak > > >---------------------------------------------------- >Syriana: cel uświęca środki. >W kinach od 3 marca. >http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fsyriana.html&sid=686 > > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >DIG-users mailing list >DIG...@li... >https://lists.sourceforge.net/lists/listinfo/dig-users > > -- Dr Daniele Turi School of Computer Science The University of Manchester ESNW 1.17 Kilburn Building, Oxford Road Manchester, M13 9PL, UK. Tel +44 (0) 161 275 0675 Fax 6204 http://www.cs.man.ac.uk/~dturi |