From: <dm...@us...> - 2008-08-09 09:01:23
|
> Do you know how can I measure the time it takes to run a query in the > Cyc console? > Thank you, regards, > Paul Fodor > (time ...) CYC(31): (time (sleep 3)) ;; real time 3.0 seconds [Time: 3.0 secs] 3.0 CYC(32): (time (clet (x) (with-timeout (3 x) (sleep 20)))) ;; real time 3.0 seconds [Time: 3.0 secs] 3.0 Hard to know how accurate it is but it did see the .004 seconds here CYC(39): (time (clet (x) (with-timeout (22 x) (sleep 20)))) ;; real time 20.004 seconds [Time: 20.004 secs] 20.004 ----- Original Message ----- From: "Paul Fodor" <pf...@cs...> To: <dm...@us...>; "OpenCyc developers" <ope...@li...> Sent: Friday, August 08, 2008 7:59 AM Subject: Re: [OpenCyc-devel] Query for all instances of a predicate > On Mon, Aug 4, 2008 at 8:41 PM, <dm...@us...> wrote: >> Change >> (NEW-CYC-QUERY >> (LIST #$isa ?X #$SpatialThing) #$PeopleDataMt >> (LIST :MAX-NUMBER 1)) >> to >> >> (NEW-CYC-QUERY >> (LIST #$isa '?X #$SpatialThing) #$PeopleDataMt >> (LIST :MAX-NUMBER 1)) >> Thats a single QUOTE on ?X > > Thank you very much for the code example. > Do you know how can I measure the time it takes to run a query in the > Cyc console? > Thank you, regards, > Paul Fodor > >> Here are some other legal forms: >> >> (NEW-CYC-QUERY >> '(#$isa ?X #$SpatialThing) #$PeopleDataMt >> (LIST :MAX-NUMBER 1)) >> >> (NEW-CYC-QUERY >> (QUOTE (#$isa ?X #$SpatialThing)) #$PeopleDataMt ;; identical to the >> above >> (LIST :MAX-NUMBER 1)) >> >> (NEW-CYC-QUERY >> `(#$isa ?X #$SpatialThing) #$PeopleDataMt ;;; Backquote reader >> (LIST :MAX-NUMBER 1)) >> Here is probly the most prefered: >> >> (NEW-CYC-QUERY >> '(#$isa ?X #$SpatialThing) #$PeopleDataMt >> '(:MAX-NUMBER 1)) >> Here is a backquoted "`" way the backquote means to take the item >> litteral >> the "," in front of COL mean (EVAL COL) -> #$SpatialThing >> >> (CLET ((COL #$SpatialThing)(NUM 1)) >> (NEW-CYC-QUERY >> `(#$isa ?X ,COL) #$PeopleDataMt >> `(:MAX-NUMBER ,NUM))) >> >> >> >> >> >> >> >> >> ----- Original Message ----- >> From: Paul Fodor >> To: OpenCyc developers >> Sent: Monday, August 04, 2008 4:17 PM >> Subject: [OpenCyc-devel] Query for all instances of a predicate >> Dear Sir, >> >> I am a OpenCyc newbie and I have some questions that I could not figure >> out >> yet. If anyone has time and can respond to my questions, please let me >> know. >> >> Question 1: I access OpenCyc from Java and I wonder how can I query for >> all >> instances of a predicate or class. I want to collect a list of all >> results. >> For instance, I want to collect all spatial things: (#$isa ?X >> #$SpatialThing) >> >> or, I want to collect all pairs of people liking other people: >> (#$likesAsFriend ?X ?Y) >> >> For example, >> >> (NEW-CYC-QUERY >> (LIST #$isa #$BillClinton #$SpatialThing) #$PeopleDataMt >> (LIST :MAX-NUMBER 1)) >> >> works, but >> >> (NEW-CYC-QUERY >> (LIST #$isa ?X #$SpatialThing) #$PeopleDataMt >> (LIST :MAX-NUMBER 1)) >> >> tells me that ?X is unbound. >> >> Question 2: How do I collect this list in Java? >> >> Thank you, >> Paul. >> >> ________________________________ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> ________________________________ >> >> _______________________________________________ >> OpenCyc-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opencyc-devel >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> OpenCyc-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opencyc-devel >> >> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > OpenCyc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencyc-devel |