# KEHOME/help/DynamicConceptLoading.txt # Feb/28/2007 # Dynamic Concept Loading example: # find Michael Jordan in TAP knowledge base # # Three possible solutions: # (1) guess concept name -- see below # (2) search input mKR file -- see below # (3) search external BOOT table -- see below #=====================================================================# #=====================================================================# #=====================================================================# Running /cygdrive/c/Documents and Settings/rhm/.bash_profile rhm@rhm8200 ~ $ ke -q -m -rdf # INFO: myopen: command line: ke -q -m -rdf # INFO: new_knit: view=spo, top=Resource, mkrfiles=kb/spo.rdf # context Resource / Class // Container /// Alt /// Bag /// Seq // file /// i:errout /// i:input /// i:input.log /// i:kb/spo.rdf /// i:output / Property // subClassOf // type / Statement // s1 :: subject property value. // s2 :: subject property object. /// s2a :: individual type class. /// s2b :: species subClassOf genus. Loading rdf definition ... # INFO: update_knit: view=rdf, oldview=spo, mkrfiles=[xml/rdf.ku,xml/rdfs.ku] # INFO: new_knit: view=rdf, top=Resource, mkrfiles=[] # INFO: update_knit: rdf context copied from spo # context Resource / Class // Container /// Alt /// Bag //// i:ClassBag /// Seq //// List ///// i:nil // file /// i:errout /// i:input /// i:input.log /// i:kb/spo.rdf /// i:output /// i:xml/rdf.ku /// i:xml/rdfs.ku // xmlword /// i:rdf:Description /// i:rdf:ID /// i:rdf:RDF /// i:rdf:about /// i:rdf:bagID /// i:rdf:datatype /// i:rdf:li /// i:rdf:nodeID /// i:rdf:parseType /// i:rdf:resource /// i:xml:base /// i:xml:lang / Property // ContainerMembershipProperty /// _n /// member //// _n // Literal /// XMLLiteral // _n // comment // domain // label // range // seeAlso /// isDefinedBy // subClassOf // subPropertyOf // i:type // i:first // i:object // i:predicate // i:rest // i:subject // i:type // i:value / Statement // s1 :: subject property value. // s2 :: subject property object. /// s2a :: individual type class. /// s2b :: species subClassOf genus. ##### knowledge base ##### # INFO: kbmode = mke # INFO: kedb = C:\Documents and Settings\rhm/db # INFO: kbworld = &null # INFO: kbdata = &null # INFO: kbfile = &null ke$ do hload from knowledge/tap/tap.mkr done; # INFO: hload: (integer) <71605> concepts loaded into BOOT ke$ Person isa* ?; # ERROR: add_member: same concept(string[17]) Person \ Agent \\ Resource ke$ Person isc* ?; Person ke$ JordanMichael isa* ?; JordanMichael ke$ do read from kb/spo.tap done; ke$ Person isc* ?; Person / Artist / Athlete / Politician ke$ AthleteJordanMichael isa* ?; AthleteJordanMichael ke$ exit; ##### 1 errors found in input before/after last group cps ##### ##### exit ##### rhm@rhm8200 ~ $ #=====================================================================# #=====================================================================# #=====================================================================# rhm@rhm8200 /home/ke/help $ ke -q -m -tap # INFO: myopen: command line: ke -q -m -tap # INFO: new_knit: view=spo, top=Resource, mkrfiles=kb/spo.tap # context Resource / Agent // Person /// Artist /// Athlete /// Politician Loading tap definition ... # INFO: update_knit: view=tap, oldview=spo, mkrfiles=[xml/rdf.ku,xml/rdfs.ku] # INFO: new_knit: view=tap, top=Resource, mkrfiles=[] # INFO: update_knit: tap context copied from spo # context # INFO: hload: (integer) <71605> concepts loaded into BOOT # ERROR: add_member: same concept(string[17]) Resource / Agent // Person /// Artist /// Athlete /// Politician / Class // Container /// Alt /// Bag /// Seq // xmlword /// i:rdf:Description /// i:rdf:ID /// i:rdf:RDF /// i:rdf:about /// i:rdf:bagID /// i:rdf:datatype /// i:rdf:li /// i:rdf:nodeID /// i:rdf:parseType /// i:rdf:resource /// i:xml:base /// i:xml:lang / Literal // String // XMLLiteral / Property // ContainerMembershipProperty /// _n /// member // Literal /// String /// XMLLiteral // _n // comment // i:domain // label // i:range // seeAlso /// isDefinedBy // i:subClassOf // i:subPropertyOf // i:description // i:domain // i:ebayMap // i:first // i:object // i:plural // i:predicate // i:propertyTypeCardinality // i:range // i:rest // i:subPropertyOf // i:subject // i:type // i:value / Statement ##### knowledge base ##### # INFO: kbmode = mke # INFO: kedb = C:\Documents and Settings\rhm/db # INFO: kbworld = &null # INFO: kbdata = &null # INFO: kbfile = &null ke$ ! pwd done; /home/ke/help ke$ ! grep 'Michael Jordan' ../knowledge/tap/tap.mkr done; MovieMichael_Jordan_to_the_Max has label += "Michael Jordan to the Max"; "AthleteJordan,_Michael" has label += "Michael Jordan"; ke$ . is "AthleteJordan,_Michael"; ke$ do hget od . done; ke$ . has ?; "AthleteJordan,_Michael" has classname = "AthleteJordan,_Michael"\Athlete\Person\Agent\Resource, gtype = person, label = "Michael Jordan", plays = SportBasketball, playsForTeam = SportsTeamWashingtonWizards, qualname = "AthleteJordan,_Michael", rootname = Resource/Agent/Person/Athlete/"AthleteJordan,_Michael", shortname = "AthleteJordan,_Michael", xmlname = "AthleteJordan,_Michael", xmlns = [] ; ke$ exit; #=====================================================================# #=====================================================================# #=====================================================================# rhm@rhm8200 /home/ke/help $ ke -q -m -tap # INFO: myopen: command line: ke -q -m -tap # INFO: new_knit: view=spo, top=Resource, mkrfiles=kb/spo.tap # context Resource / Agent // Person /// Artist /// Athlete /// Politician Loading tap definition ... # INFO: update_knit: view=tap, oldview=spo, mkrfiles=[xml/rdf.ku,xml/rdfs.ku] # INFO: new_knit: view=tap, top=Resource, mkrfiles=[] # INFO: update_knit: tap context copied from spo # context # INFO: hload: (integer) <71605> concepts loaded into BOOT # ERROR: add_member: same concept(string[17]) Resource / Agent // Person /// Artist /// Athlete /// Politician / Class // Container /// Alt /// Bag /// Seq // xmlword /// i:rdf:Description /// i:rdf:ID /// i:rdf:RDF /// i:rdf:about /// i:rdf:bagID /// i:rdf:datatype /// i:rdf:li /// i:rdf:nodeID /// i:rdf:parseType /// i:rdf:resource /// i:xml:base /// i:xml:lang / Literal // String // XMLLiteral / Property // ContainerMembershipProperty /// _n /// member // Literal /// String /// XMLLiteral // _n // comment // i:domain // label // i:range // seeAlso /// isDefinedBy // i:subClassOf // i:subPropertyOf // i:description // i:domain // i:ebayMap // i:first // i:object // i:plural // i:predicate // i:propertyTypeCardinality // i:range // i:rest // i:subPropertyOf // i:subject // i:type // i:value / Statement ##### knowledge base ##### # INFO: kbmode = mke # INFO: kedb = C:\Documents and Settings\rhm/db # INFO: kbworld = &null # INFO: kbdata = &null # INFO: kbfile = &null ke$ do find od *Jordan*Michael* in BOOT done; "AthleteJordan,_Michael" ke$ . is "AthleteJordan,_Michael"; ke$ do hget od . done; ke$ . has ?; "AthleteJordan,_Michael" has classname = "AthleteJordan,_Michael"\Athlete\Person\Agent\Resource, gtype = person, label = "Michael Jordan", plays = SportBasketball, playsForTeam = SportsTeamWashingtonWizards, qualname = "AthleteJordan,_Michael", rootname = Resource/Agent/Person/Athlete/"AthleteJordan,_Michael", shortname = "AthleteJordan,_Michael", xmlname = "AthleteJordan,_Michael", xmlns = [] ; ke$ exit;