Examples of knowledge representations in FCG
print "
Declaration of relation types plus some of their connections to concepts
"; [any thing, descr <= a description, //any thing can be abstracted/represented descr_in<= a descr_container, //e.g. in a file, an hologram, a software part <= a thing, //any thing can have at least 1 part chrc <= a characteristic //and characteristic(s), e.g. a length ]. [any characteristic, measure <= a measure, //any characteristic can be measured chrc of <= a thing //and can be the characteristic of things ]. [any measure, quantity: a number, //(note: the measure of an object's unit: a measure_unit, // characteristic may be unknown) measure of: a characteristic ]. [any description, //in Logic, it is called a "proposition" descr of : a thing, //a description is about something descr_medium : a descr_medium, //it uses symbols or a language descr_container: a descr_container,//it is stored, e.g. in a file author : 1 entity, //any description has a unique author believer <= a cognitive_agent, //it may have some believers modality <= a modality, //it may be put in context logical_relation <=a description,//and connected to other descriptions rhetorical_relation<=a description //by logical or rhetorical relations ]. [any descr_container, descr_support: a physical_entity, descr_in of: a thing]. [any descr_medium, descr_medium of: a thing]. [ [a thing *t, descr_in: a descr_container *c], <=> [*t, descr: (a description, descr_container: *c)] ]. [any situation, s_succ of: a situation, //any situation follows (an)other one(s) s_succ : a situation, //and is followed by (an)other one(s) location : a spatial_entity, //a situation occurs somewhere time : a temporal_entity, //and at a time (even an imaginary situation) situationChrc<= a situation_characteristic ]. [any temporal_entity, time of <= a situation, duration of <= a situation, temporal_order_relation <= a temporal_entity ]. [any process, triggering_event<= an event, ending_event <= an event, ending <= a state, ending of <= a state, precondition <= a state, postcondition <= a state, agent <= an entity, initiator <= a goal_directed_agent, instrument <= an entity, object <= a thing, experiencer<= a conscious_agent, recipient <= an agent, result <= a thing, sub_process<= a process, method <= a description, manner <= a situation_characteristic, source <= a spatial_entity, destination<= a spatial_entity, path <= a spatial_entity ]. [any collection, subset <= a collection, element<= a thing, count: a natural]. [any physical_entity, physChrc <= a physical_characteristic]. [any goal_directed_entity, physChrc <= a psychological_characteristic]. print '
Ordering of relation types via the predefined relation "subtype", plus declaration of the relation types which had not yet been declared
'; [Result, domain: Process, range: Thing, subtype: Output]. [Object, domain: Process, range: Thing, subtype: {Input,Input_output}]. [Input, domain: Process, range: Thing, subtype: {Material, Parameter, Static_input, Dynamic_input}]. [Input_output, domain: Process, range: Thing, subtype: {Object_to_modify, Object_to_mute}]. [Logical_relation, subtype: {Or,Xor}]. [Order_relation, domain: Thing, range: Thing, subtype: {Meet,In,Near,Before,After,Above,Under}]. [On, subtype of: {Meet,Above}]. print '
Declaration of additional concept types for the examples below
'; //When the type of an undeclared concept cannot be infered via the //signature of a relation connected to it (e.g. if there is no relation //or the relation is also undeclared), print an error message and abort. //Otherwise, the type of the concept or the relation must be inferred. [Living_thing, subtype: {Animal,Plant}]. [Animal, subtype: {Person, Cat, Dog}]. [Person, partition: {{Man,Woman}}]. [Pet, subtype of: Entity_playing_a_role]. [Pet_dog, subtype of: {Pet, Dog}]. [Part, chrc: transitive]. print "
Simple FCGs (and declaration of individuals)
"; [Mary, agent of: (a liking, object: Mary, object: (the cat, name: "Tom"))]. [a person *p, creator of: the home_page http://www.w3.org/~lassila]. [*p, name: "Ora Lassila"]. [Joe, type: Smoker]. [a cat *c!=Tom, on: a mat]. [the cat Tom, on: a mat]. [the person Mary, agent of: (a liking, object: Mary) ]. [the good cat Tom, on: a big mat]. [a person *p, agent of: (a liking, object: *p) ]. //coreference via a variable print "
Collections
"; [*g the group of *e {Fred,Wilma,a man}, approver of: a resolution]. [the persons *e, approver of: a resolution]. [{Fred,Wilma, a person}, approver of: a resolution]. [{[Tom, on: a mat] | [Tom, on: the floor]}]. [the files "http://foo.org*", author: Foo]. [most of the resolutions *r, approver: at least 3 persons {Fred,*}]. [Tom, agent of: (a run, time: 14 to 15 minutes)]. [Tom, agent of: (a run, time: from 14 to 15 hour__time_of_day)]. [a travel, agent: John, destination: (an office, owner: John), time: 13.5 to 14 hour]. [most of (travel, agent: John, destination: (an office, owner: John)), duration: {20 min | 40 min}]. [every (person, in: *o), approver of: a resolution]. [at least 2 % of persons, agent of: (a liking, object: most of cats)]. [any characteristic, chrc of <= a thing]. [the pages {http://foo.org/foo.html, http://bar.org/bar.html}, creator: Ora_Lassila]. [the resolution, approver: (a committee, member: {Fred,Wilma}) ]. [together {John, Mary}, owner of: a house]. [2 professors, agent of: (a teaching, object: 3 courses) ]. [3 courses, object of: (a teaching, agent: 2 professors) ]. [together at least 2 of {John, Mary}, agent of: (an owning, object: a house)]. [X11_source_code, distributionSite: {ftp://ftp.x.org | ftp://ftp.eu.net}]. [a cat, between: {a mouse *m, (a den, owner: *m)}]. print "
Collections and types
"; [Tom, type:{Smoker,Driver}]. [{Tom,Bianca,Yojo}, type: Smoker]. [{Tom,Bianca,Yojo}, type:Smoker]. [Joe, type:Smoker, type:Driver]. [any person, part: at most 2 legs]. [any parisian, lover of: {Paris, Lyon}]. [most cats, owner: a person]. [any file "http://foo.org/doc*", copyright: "Foo"]. [2 files "http://foo.org/doc*", copyright: "Foo"]. print "
Contexts
"; [Tom, believer of: [*s [Mary,agent of: (a liking,object:Tom)], time:1999], believer of: [~*s, before: 1999] ]. [a representation, agent: spamOnly@phmartin.info, language: FE, ontology: http://www.webkb.org/kb/webkb1/KADS1ontology.html, creationDate: "21/01/1999", expirationDate: "22/7/9999", source: [http://www.webkb.org/kb/webkb1/KADS1.html, part: the title], object: $( KADS-I models in CGs )$, result: $( KADS-I has for part several models object of a representation which has for language CG. )$ ]. ["http://www.w3.org/Home/Lassila", creator: Ora_Lassila](speaker: Ralph_Swick). [ ["http://www.w3.org/Home/Lassila", creator: Ora_Lassila], speaker: Ralph_Swick]. [a telling, time:Yesterday, agent:Paul, recipient:Mary, object: (Denise, agent of: (a knowledge, object: [Denise,chrc:a great naiveness])) ](author: x). [a telling, time:Yesterday, agent:I, recipient:Peter, object: *p [Denise, agent of: [a work, city:Toronto] ](time:last_year) ]. [a thinking, agent:I, object: ~[*p]]. [ [Denise, psyChrc:pragmatic], situationChrc:fortunate]. print "
Implications
"; [ [an airport *x, departure of: (a flight, destination: an airport *y)], => [*x, flightTo: *y] ]. [ [an airport *x, flightTo: (an airport, flightTo: an airport *y)], => [*x, flightTo: *y] ]. [ [a type *x, subtype: a type *y], => [*y, subtype of: *x] ]. [ [a person *p, uncle: a person *u], => [*p,parent:(a man,brother:*u) ] ]. [ [a person *p, part: a thing *p1], => [*p, parent: (a man, part: a thing *p2!=*p1)] ]. [ [a person *p, ancestors: *v1 {*}], <=> [*p, son: (a person, ancestors: ({*}, subset of: *v1) ) ] ]. [ [a thing *x, gte: (a thing *y, gte: a thing *z) ], => [*x, gte: *z] ]. print "
Second-order statements
"; [ [a relationType *rt, range: a conceptType *ct], => [ [a thing *x, *rt: a thing *y], => [*y, type: *ct] ] ]. print "
FCGs representing complex sentences
"; [a group of several (official, instance of: Columbian), destination of: (a reception, object: a group of millions of dollars, source: (a cartel, location: Cali, psyChrc: infamous, agent of: (a selling, object: some cocaine) ) ) ](period: past_period). [a group of Yakuza, agent of: (a making, object: {[an alliance, subset: several Yakuza *y, subset: (several triads *t, member: several chineses), subset: (several cartels *c, member: several columbian, agent of: (a selling, object: some drug) ) ], [the group of {*y,*t,*c}, agent of: a work]} ) ](period: past_period). print "
Examples of queries without path specifications
"; spec Entity; spec [an entity]; spec [a spatial_entity, order_relation: a spatial_entity]; spec [a cat, above: a spatial_entity]; spec [a cat, on: a mat]; spec [a process, time:Yesterday, agent: a person]; print "
Examples of queries with path specifications (parsed but not taken into account)
"; spec [a process, (relation: a thing)+ agent of: a process]; spec [a process, (agent of:)1 | (object: an entity)* chrc: a great naiveness]; spec [a person, (agent of:)1 object: a person]; spec [a cat, (relation<=)* above: a spatial_entity];