diff options
| author | aarne <aarne@chalmers.se> | 2012-06-21 06:06:05 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2012-06-21 06:06:05 +0000 |
| commit | f8e74c50e277b06964f2d820da109197ecde5711 (patch) | |
| tree | bc87de828ed3aaf2bb6fbf5315016894b75644fd /examples/query/small/patentsQuery/Query.gf | |
| parent | 18c08fdac1b981b85b15a9f28584b0def9aa45a2 (diff) | |
factored Query by taking our Proton parts and introducing an interface
Diffstat (limited to 'examples/query/small/patentsQuery/Query.gf')
| -rw-r--r-- | examples/query/small/patentsQuery/Query.gf | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/examples/query/small/patentsQuery/Query.gf b/examples/query/small/patentsQuery/Query.gf new file mode 100644 index 000000000..83eb87892 --- /dev/null +++ b/examples/query/small/patentsQuery/Query.gf @@ -0,0 +1,50 @@ +abstract Query = {
+
+flags
+ startcat = Move ;
+
+-- general query language, which can be specialized with any lexicon
+
+cat
+ Move ; -- top-level utterance, e.g. "give me all Bulgarian persons that work at Google"
+ Query ;
+ Answer ;
+ Set ; -- the set requested, e.g. "all persons"
+ Relation ; -- something of something, e.g. "subregion of Bulgaria"
+ Kind ; -- type of things, e.g. "person"
+ Property ; -- property of things, e.g. "employed at Google"
+ Individual ; -- one entity, e.g. "Google"
+ Activity ; -- action property, e.g. "work at Google"
+ Name ; -- person, company... e.g. "Eric Schmidt"
+ Loc ;
+ Org ;
+ Pers ;
+ [Individual] {2} ; -- list of entities, e.g. "Larry Page, Sergey Brin"
+
+fun
+ MQuery : Query -> Move ;
+ MAnswer : Answer -> Move ;
+
+ QSet : Set -> Query ; -- (give me | what are | which are | ) (S | the names of S | S's names)
+ QWhere : Set -> Query ; -- where are S
+ QInfo : Set -> Query ; -- (give me | ) (information about | all about) S
+
+ AKind : Set -> Kind -> Answer ; -- S is a K
+ AProp : Set -> Property -> Answer ; -- S is P
+ AAct : Set -> Activity -> Answer ; -- S As
+
+ SAll : Kind -> Set ; -- all Ks | the Ks
+ SOne : Kind -> Set ; -- one K
+ SIndef : Kind -> Set ; -- a K
+ SPlural : Kind -> Set ; -- Ks
+ SOther : Kind -> Set ; -- other Ks
+ SInd : Individual -> Set ; -- X
+ SInds : [Individual] -> Set ; -- X and Y
+
+ KRelSet : Relation -> Set -> Kind ; -- R of S | S's R
+ KRelKind : Kind -> Relation -> Set -> Kind ; -- K that is R of S
+ KRelPair : Kind -> Relation -> Kind ; -- S's with their R's
+ KProp : Property -> Kind -> Kind ; -- P K | K that is P
+ KAct : Activity -> Kind -> Kind ; -- K that Ps
+ KRel : Relation -> Kind ; -- R ---??
+}
|
