diff options
Diffstat (limited to 'examples/query/small')
| -rw-r--r-- | examples/query/small/Makefile | 10 | ||||
| -rw-r--r-- | examples/query/small/Query.gf | 106 | ||||
| -rw-r--r-- | examples/query/small/QueryEng.gf | 180 | ||||
| -rw-r--r-- | examples/query/small/QueryFin.gf | 144 | ||||
| -rw-r--r-- | examples/query/small/QueryFre.gf | 150 | ||||
| -rw-r--r-- | examples/query/small/QueryGer.gf | 150 | ||||
| -rw-r--r-- | examples/query/small/QueryIta.gf | 150 | ||||
| -rw-r--r-- | examples/query/small/QuerySwe.gf | 174 | ||||
| -rw-r--r-- | examples/query/small/README | 11 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/LexQueryPats.gf | 111 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/LexQueryPatsEng.gf | 136 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/LexQueryPatsFre.gf | 159 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/QueryPats.gf | 194 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/QueryPatsEng.gf | 387 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/QueryPatsFre.gf | 386 | ||||
| -rw-r--r-- | examples/query/small/patentsQuery/QueryProton.gf | 59 | ||||
| -rw-r--r-- | examples/query/small/tests.gfs | 36 | ||||
| -rw-r--r-- | examples/query/small/treebank.txt | 299 |
18 files changed, 0 insertions, 2842 deletions
diff --git a/examples/query/small/Makefile b/examples/query/small/Makefile deleted file mode 100644 index 351850274..000000000 --- a/examples/query/small/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -all: pgf treebank - -pgf: - gf -make -optimize-pgf Query???.gf - -treebank: - gf --run Query.pgf <tests.gfs >treebank.txt - - - diff --git a/examples/query/small/Query.gf b/examples/query/small/Query.gf deleted file mode 100644 index 14bca9e53..000000000 --- a/examples/query/small/Query.gf +++ /dev/null @@ -1,106 +0,0 @@ -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
- QCalled : Individual -> Query ; -- how is X (also | otherwise) (called | named | known) ;
-
- 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 ---??
-
- IName : Name -> Individual ;
-
- NLoc : Loc -> Name ;
- NOrg : Org -> Name ;
- NPers : Pers -> Name ;
-
- ACalled : [Individual] -> Activity ;
-
--- the test lexicon
-
-cat
- JobTitle ;
-fun
- Located : Loc -> Property ;
- Employed : Org -> Property ;
-
- Work : Org -> Activity ;
- HaveTitle : JobTitle -> Activity ;
- HaveTitleOrg : JobTitle -> Org -> Activity ;
-
- Organization : Kind ;
- Place : Kind ;
- Person : Kind ;
-
- Location : Relation ;
- Region : Relation ;
- Subregion : Relation ;
-
- RName : Relation ;
- RNickname : Relation ;
-
--- JobTitles
- JobTitle1 : JobTitle ;
- JobTitle2 : JobTitle ;
- JobTitle3 : JobTitle ;
- JobTitle4 : JobTitle ;
-
--- Locations
- Location1 : Loc ;
- Location2 : Loc ;
- Location3 : Loc ;
- Location4 : Loc ;
-
--- Organizations
- Organization1 : Org ;
- Organization2 : Org ;
- Organization3 : Org ;
- Organization4 : Org ;
-
--- Persons
- Person1 : Pers ;
- Person2 : Pers ;
- Person3 : Pers ;
- Person4 : Pers ;
-}
diff --git a/examples/query/small/QueryEng.gf b/examples/query/small/QueryEng.gf deleted file mode 100644 index 207e56483..000000000 --- a/examples/query/small/QueryEng.gf +++ /dev/null @@ -1,180 +0,0 @@ ---# -path=.:alltenses - -concrete QueryEng of Query = open - ParadigmsEng, - IrregEng, - SyntaxEng, - ExtraEng, - (L = GrammarEng), - Prelude -in { - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; ---- mkText (mkPhr q) questMarkPunct ; - MAnswer a = a ; ---- mkText (mkPhr a) fullStopPunct ; - - QSet s = - let - ss : NP = s - | mkNP (mkNP thePl_Det name_N) (mkAdv possess_Prep s) - ---- s's names - in - mkUtt (mkImp (mkVP give_V3 (mkNP i_Pron) ss)) - | mkUtt (mkQS (mkQCl (L.CompIP whatSg_IP) ss)) - | mkUtt (mkQS (mkQCl (L.CompIP (L.IdetIP (mkIDet which_IQuant))) ss)) - | mkUtt ss ; - - QWhere s = mkUtt (mkQS (mkQCl where_IAdv s)) ; - QInfo s = - let - info : NP = mkNP all_Predet (mkNP (mkNP information_N) (mkAdv about_Prep s)) ; - in - mkUtt (mkImp (mkVP give_V3 (mkNP i_Pron) info)) - | mkUtt info ; - - QCalled i = mkUtt (mkQS (mkQCl how_IAdv (mkCl i (mkVP also_AdV (mkVP called_A))))) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; ---- a, fun of s - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP aPl_Det k) | mkNP thePl_Det k ; - SOne k = mkNP n1_Numeral k ; - SIndef k = mkNP a_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = - mkCN r.cn (mkAdv r.prep s) ; - ---- | S's R - ----- KRelsSet r q s = ----- mkCN r.cn (mkAdv r.prep s) ; - - KRelKind k r s = - mkCN k (mkRS (mkRCl that_RP (mkVP (mkNP aPl_Det (mkCN r.cn (mkAdv r.prep s)))))) ; - - KRelPair k r = mkCN k (mkAdv with_Prep (mkNP (mkQuant they_Pron) plNum r.cn)) ; - KProp p k = - mkCN p k - | mkCN k (mkRS (mkRCl that_RP (mkVP p))) ; - KAct p k = - mkCN k (mkRS (mkRCl that_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A []) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper --- structural words - about_Prep = mkPrep "about" ; - all_NP = mkNP (mkPN "all") ; --- - also_AdV = mkAdV "also" | mkAdV "otherwise" ; - as_Prep = mkPrep "as" ; - at_Prep = mkPrep "at" ; - called_A = mkA "called" | mkA "named" ; - give_V3 = mkV3 give_V ; - information_N = mkN "information" ; - other_A = mkA "other" ; - name_N = mkN "name" ; - --- lexical constructors - mkName : Str -> NP = - \s -> mkNP (mkPN s) ; - mkRelation : Str -> {cn : CN ; prep : Prep} = - \s -> {cn = mkCN (mkN s) ; prep = possess_Prep} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - Located i = - mkAP (mkA2 (mkA "located") in_Prep) i - | mkAP (mkA2 (mkA "situated") in_Prep) i ; - - Employed i = - mkAP (mkA2 (mkA "employed") by8agent_Prep) i - | mkAP (mkA2 (mkA "paid") by8agent_Prep) i - | mkAP (mkA2 (mkA "active") at_Prep) i - | mkAP (mkA2 (mkA "professionally active") at_Prep) i ; - - Work i = - mkVP (mkV2 (mkV "work") at_Prep) i - | mkVP (mkV2 (mkV "collaborate") in_Prep) i ; - - HaveTitle t = - mkVP (mkAP (mkA2 (mkA "employed") as_Prep) (mkNP t)) - | mkVP (mkV2 (mkV "work") as_Prep) (mkNP t) ; - - HaveTitleOrg t i = - mkVP (mkVP (mkAP (mkA2 (mkA "employed") as_Prep) (mkNP t))) (mkAdv at_Prep i) - | mkVP (mkVP (mkV2 (mkV "work") as_Prep) (mkNP t)) (mkAdv at_Prep i) ; --- | mkVP (mkVP have_V2 (mkNP the_Det (mkCN (mkN2 (mkN "title")) (mkNP t)))) (mkAdv at_Prep i) ; - - Organization = mkCN (mkN "organization") ; - Place = mkCN (mkN "place") ; - Person = - mkCN (mkN "person" "people") - | mkCN (mkN "person") ; - - Location = mkRelation "location" ; - Region = mkRelation "region" ; - Subregion = mkRelation "subregion" ; - RName = mkRelation "name" ; - RNickname = mkRelation "nickname" ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName "'Location1" ; - Location2 = mkName "'Location2" ; - Location3 = mkName "'Location3" ; - Location4 = mkName "'Location4" ; - --- Organizations - Organization1 = mkName "'Organization1" ; - Organization2 = mkName "'Organization2" ; - Organization3 = mkName "'Organization3" ; - Organization4 = mkName "'Organization4" ; - --- Persons - Person1 = mkName "'Person1" ; - Person2 = mkName "'Person2" ; - Person3 = mkName "'Person3" ; - Person4 = mkName "'Person4" ; - -oper - mkCountry : Str -> Str -> {np : NP ; a : A} = - \n,a -> {np = mkNP (mkPN n) ; a = mkA a} ; - -} diff --git a/examples/query/small/QueryFin.gf b/examples/query/small/QueryFin.gf deleted file mode 100644 index b7b5c7b4d..000000000 --- a/examples/query/small/QueryFin.gf +++ /dev/null @@ -1,144 +0,0 @@ ---# -path=.:alltenses - -concrete QueryFin of Query = open - ParadigmsFin, - SyntaxFin, - ExtraFin, - (G = GrammarFin), - SymbolicFin, - Prelude -in { - -flags coding = utf8 ; - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; - MAnswer a = a ; - - QSet s = mkUtt (mkImp (mkV2 (mkV "näyttää")) s) ; - - QWhere s = mkUtt (mkQS (ICompExistNP (mkIComp where_IAdv) s)) ; - QInfo s = mkUtt (mkImp (mkVP (mkV2 (mkV "antaa")) - (mkNP all_Predet (mkNP thePl_Det (mkCN (mkN "tieto") (mkAdv about_Prep s)))))) ; - - QCalled i = mkUtt (mkQS (mkQCl what_IP (mkNP (GenNP i) (mkCN (mkA "toinen") (mkN "nimi" "nimiä"))))) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; ---- a, fun of s - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP thePl_Det k) ; - SOne k = mkNP n1_Numeral k ; - SIndef k = mkNP someSg_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = GenCN s r.cn ; - - KRelKind k r s = mkCN k (mkRS (mkRCl that_RP (mkVP (mkNP aPl_Det (GenCN s r.cn))))) ; - - KRelPair k r = G.ConjCN and_Conj (G.BaseCN k (GenCN these_NP r.cn)) ; - KProp p k = mkCN p k ; - KAct p k = mkCN k (mkRS (mkRCl that_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A (casePrep translative)) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper --- structural words - about_Prep = casePrep elative ; - all_NP = mkNP (mkPN (mkN "kaikki" "kaiken" "kaikkia")) ; --- - also_AdV = ss "myös" ; - as_Prep = casePrep essive ; - at_Prep = casePrep adessive ; - called_A = mkA "kutsuttu" ; - give_V3 = mkV3 (mkV "antaa") (casePrep allative) (casePrep nominative) ; - information_N = mkN "tieto" ; - other_A = mkA "muu" ; - that_RP = which_RP ; - --- lexical constructors - mkName : N -> Str -> NP = - \n,s -> mkNP the_Det (mkCN n (symb s)) ; - mkRelation : N -> {cn : CN ; prep : Prep} = - \s -> {cn = mkCN s ; prep = possess_Prep} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - NCountry c = c.np ; - PCountry c = mkAP c.a ; - - Located i = mkAP (mkA2 (mkA "sijaitseva") in_Prep) i ; - - Employed i = mkAP (mkA2 (mkA (mkN "työssä" (mkN "oleva"))) in_Prep) i ; - - Work i = mkVP (mkV2 (mkV "työskennellä") in_Prep) i ; - - HaveTitle t = mkVP have_V2 (mkNP the_Det (mkCN (mkN "asema") (mkNP the_Det t))) ; - HaveTitleOrg t i = mkVP (mkVP have_V2 (mkNP the_Det (mkCN (mkN "asema") (mkNP the_Det t)))) (mkAdv in_Prep i) ; - - Organization = mkCN (mkN "organisaatio" "organisaatioita") ; - Place = mkCN (mkN "paikka") ; - Person = mkCN (mkN "henkilö" "henkilöitä") ; - - Location = mkRelation (mkN "sijainti") ; - Region = mkRelation (mkN "alue") ; - Subregion = mkRelation (mkN "osa") ; - RName = mkRelation (mkN "nimi" "nimiä") ; - RNickname = mkRelation (mkN "lisänimi" "lisänimiä") ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName (mkN "paikka") "'Location1" ; - Location2 = mkName (mkN "paikka") "'Location2" ; - Location3 = mkName (mkN "paikka") "'Location3" ; - Location4 = mkName (mkN "paikka") "'Location4" ; - --- Organizations - Organization1 = mkName (mkN "organisaatio") "'Organization1" ; - Organization2 = mkName (mkN "organisaatio") "'Organization2" ; - Organization3 = mkName (mkN "organisaatio") "'Organization3" ; - Organization4 = mkName (mkN "organisaatio") "'Organization4" ; - --- Persons - Person1 = mkName (mkN "henkilö") "'Person1" ; - Person2 = mkName (mkN "henkilö") "'Person2" ; - Person3 = mkName (mkN "henkilö") "'Person3" ; - Person4 = mkName (mkN "henkilö") "'Person4" ; - - -} diff --git a/examples/query/small/QueryFre.gf b/examples/query/small/QueryFre.gf deleted file mode 100644 index d0451832e..000000000 --- a/examples/query/small/QueryFre.gf +++ /dev/null @@ -1,150 +0,0 @@ ---# -path=.:alltenses - -concrete QueryFre of Query = open - ParadigmsFre, - SyntaxFre, - ExtraFre, - (G = GrammarFre), - SymbolicFre, - Prelude -in { - -flags coding = utf8 ; - --- for a baseline: just change these lexical entries -oper - about_Prep = on_Prep ; - also_AdV = lin AdV (ss "aussi") ; - as_Prep = mkPrep "comme" ; - at_Prep = mkPrep "chez" ; - called_A = mkA "appelé" ; - give_V = mkV "montrer" ; - information_N = mkN "information" ; - other_A = prefixA (mkA "autre") ; - name_N = mkN "nom" ; - nickname_N = mkN "surnom" ; - located_A = mkA "situé" ; - employed_A = mkA "employé" ; - work_V = mkV "travailler" ; - position_N = mkN "poste" masculine ; - organization_N = mkN "organisation" ; - place_N = mkN "endroit" ; - person_N = mkN "personne" ; - location_N = mkN "position" ; - region_N = mkN "région" ; - subregion_N = mkN "sous-région" ; - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; - MAnswer a = a ; - - QSet s = mkUtt (mkVP (mkV2 give_V) s) ; - - QWhere s = mkUtt (mkQS (mkQCl where_IAdv s)) ; - QInfo s = mkUtt (mkVP (mkV2 give_V) - (mkNP all_Predet (mkNP thePl_Det (mkCN information_N (mkAdv on_Prep s))))) ; - - QCalled i = mkUtt (mkQS (mkQCl (mkIP whichSg_IDet (mkCN other_A name_N)) i have_V2)) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP thePl_Det k) ; - SOne k = mkNP n1_Numeral k ; - SIndef k = mkNP someSg_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = mkCN r.cn (mkAdv r.prep s) ; - KRelKind k r s = mkCN k (mkRS (mkRCl which_RP (mkVP (mkNP aPl_Det (mkCN r.cn (mkAdv r.prep s)))))) ; - - KRelPair k r = mkCN k (mkAdv with_Prep (mkNP (mkQuant they_Pron) plNum r.cn)) ; - KProp p k = mkCN p k ; - KAct p k = mkCN k (mkRS (mkRCl which_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A (mkPrep "")) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper - --- lexical constructors - mkName : Str -> NP = - \s -> mkNP (mkPN s) ; - mkRelation : N -> {cn : CN ; prep : Prep} = - \s -> {cn = mkCN s ; prep = possess_Prep} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - Located i = mkAP (mkA2 located_A in_Prep) i ; - Employed i = mkAP (mkA2 employed_A at_Prep) i ; - Work i = mkVP (mkV2 work_V at_Prep) i ; - - HaveTitle t = mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t)))) ; - HaveTitleOrg t i = mkVP (mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t))))) (mkAdv in_Prep i) ; - - Organization = mkCN organization_N ; - Place = mkCN place_N ; - Person = mkCN person_N ; - - Location = mkRelation location_N ; - Region = mkRelation region_N ; - Subregion = mkRelation subregion_N ; - RName = mkRelation name_N ; - RNickname = mkRelation nickname_N ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName "'Location1" ; - Location2 = mkName "'Location2" ; - Location3 = mkName "'Location3" ; - Location4 = mkName "'Location4" ; - --- Organizations - Organization1 = mkName "'Organization1" ; - Organization2 = mkName "'Organization2" ; - Organization3 = mkName "'Organization3" ; - Organization4 = mkName "'Organization4" ; - --- Persons - Person1 = mkName "'Person1" ; - Person2 = mkName "'Person2" ; - Person3 = mkName "'Person3" ; - Person4 = mkName "'Person4" ; - - -} diff --git a/examples/query/small/QueryGer.gf b/examples/query/small/QueryGer.gf deleted file mode 100644 index 72c77ed68..000000000 --- a/examples/query/small/QueryGer.gf +++ /dev/null @@ -1,150 +0,0 @@ ---# -path=.:alltenses - -concrete QueryGer of Query = open - ParadigmsGer, - SyntaxGer, - ExtraGer, - (G = GrammarGer), - SymbolicGer, - Prelude -in { - -flags coding = utf8 ; - --- for a baseline: just change these lexical entries -oper - about_Prep = on_Prep ; - also_AdV = lin AdV (ss "auch") ; - as_Prep = mkPrep "als" nominative ; - at_Prep = mkPrep "bei" dative ; - called_A = mkA "gekannt" ; - give_V = mkV "zeigen" ; - information_N = mkN "Information" ; - other_A = mkA "ander" ; - name_N = mkN "Name" "Namen" masculine ; - nickname_N = mkN "Spitzname" "Spitznamen" masculine ; - located_A = mkA "situiert" ; - employed_A = mkA "beschäftigt" ; - work_V = mkV "arbeiten" ; - position_N = mkN "Position" ; - organization_N = mkN "Organisation" ; - place_N = mkN "Stelle" ; - person_N = mkN "Persone" ; - location_N = mkN "Lage" ; - region_N = mkN "Region" ; - subregion_N = mkN "Teilbereich" "Teilbereiche" masculine ; - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; - MAnswer a = a ; - - QSet s = mkUtt politeImpForm (mkImp (mkVP (mkV2 give_V) s)) ; - - QWhere s = mkUtt (mkQS (mkQCl where_IAdv s)) ; - QInfo s = mkUtt politeImpForm (mkImp (mkVP (mkV2 give_V) - (mkNP all_Predet (mkNP aPl_Det (mkCN information_N (mkAdv (mkPrep "über" accusative) s)))))) ; - - QCalled i = mkUtt (mkQS (mkQCl (mkIP whichSg_IDet (mkCN other_A name_N)) i have_V2)) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP aPl_Det k) ; - SOne k = mkNP a_Det k ; - SIndef k = mkNP someSg_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = mkCN r.cn (mkAdv r.prep s) ; - KRelKind k r s = mkCN k (mkRS (mkRCl which_RP (mkVP (mkNP aPl_Det (mkCN r.cn (mkAdv r.prep s)))))) ; - - KRelPair k r = mkCN k (mkAdv with_Prep (mkNP (mkQuant they_Pron) plNum r.cn)) ; - KProp p k = mkCN p k ; - KAct p k = mkCN k (mkRS (mkRCl which_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A (mkPrep "" nominative)) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper - --- lexical constructors - mkName : Str -> NP = - \s -> mkNP (mkPN s) ; - mkRelation : N -> {cn : CN ; prep : Prep} = - \s -> {cn = mkCN s ; prep = possess_Prep} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - Located i = mkAP (mkA2 located_A in_Prep) i ; - Employed i = mkAP (mkA2 employed_A at_Prep) i ; - Work i = mkVP (mkV2 work_V at_Prep) i ; - - HaveTitle t = mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t)))) ; - HaveTitleOrg t i = mkVP (mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t))))) (mkAdv in_Prep i) ; - - Organization = mkCN organization_N ; - Place = mkCN place_N ; - Person = mkCN person_N ; - - Location = mkRelation location_N ; - Region = mkRelation region_N ; - Subregion = mkRelation subregion_N ; - RName = mkRelation name_N ; - RNickname = mkRelation nickname_N ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName "'Location1" ; - Location2 = mkName "'Location2" ; - Location3 = mkName "'Location3" ; - Location4 = mkName "'Location4" ; - --- Organizations - Organization1 = mkName "'Organization1" ; - Organization2 = mkName "'Organization2" ; - Organization3 = mkName "'Organization3" ; - Organization4 = mkName "'Organization4" ; - --- Persons - Person1 = mkName "'Person1" ; - Person2 = mkName "'Person2" ; - Person3 = mkName "'Person3" ; - Person4 = mkName "'Person4" ; - - -} diff --git a/examples/query/small/QueryIta.gf b/examples/query/small/QueryIta.gf deleted file mode 100644 index dd5cd14b5..000000000 --- a/examples/query/small/QueryIta.gf +++ /dev/null @@ -1,150 +0,0 @@ ---# -path=.:alltenses - -concrete QueryIta of Query = open - ParadigmsIta, - SyntaxIta, - ExtraIta, - (G = GrammarIta), - SymbolicIta, - Prelude -in { - -flags coding = utf8 ; - --- for a baseline: just change these lexical entries -oper - about_Prep = on_Prep ; - also_AdV = lin AdV (ss "anche") ; - as_Prep = mkPrep "come" ; - at_Prep = mkPrep "presso" ; - called_A = mkA "chiamato" ; - give_V = mkV "mostrare" ; - information_N = mkN "informazione" feminine ; - other_A = prefixA (mkA "altro") ; - name_N = mkN "nome" ; - nickname_N = mkN "soprannome" ; - located_A = mkA "situato" ; - employed_A = mkA "impiegato" ; - work_V = mkV "lavorare" ; - position_N = mkN "posto" ; - organization_N = mkN "organizzazione" feminine ; - place_N = mkN "luogo" ; - person_N = mkN "persona" ; - location_N = mkN "posizione" feminine ; - region_N = mkN "regione" feminine ; - subregion_N = mkN "sottoregione" feminine ; - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; - MAnswer a = a ; - - QSet s = mkUtt (mkVP (mkV2 give_V) s) ; - - QWhere s = mkUtt (mkQS (mkQCl where_IAdv s)) ; - QInfo s = mkUtt (mkVP (mkV2 give_V) - (mkNP all_Predet (mkNP thePl_Det (mkCN information_N (mkAdv on_Prep s))))) ; - - QCalled i = mkUtt (mkQS (mkQCl (mkIP whichSg_IDet (mkCN other_A name_N)) i have_V2)) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP thePl_Det k) ; - SOne k = mkNP a_Det k ; - SIndef k = mkNP someSg_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = mkCN r.cn (mkAdv r.prep s) ; - KRelKind k r s = mkCN k (mkRS (mkRCl which_RP (mkVP (mkNP aPl_Det (mkCN r.cn (mkAdv r.prep s)))))) ; - - KRelPair k r = mkCN k (mkAdv with_Prep (mkNP (mkQuant they_Pron) plNum r.cn)) ; - KProp p k = mkCN p k ; - KAct p k = mkCN k (mkRS (mkRCl which_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A (mkPrep "")) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper - --- lexical constructors - mkName : Str -> NP = - \s -> mkNP (mkPN s) ; - mkRelation : N -> {cn : CN ; prep : Prep} = - \s -> {cn = mkCN s ; prep = possess_Prep} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - Located i = mkAP (mkA2 located_A in_Prep) i ; - Employed i = mkAP (mkA2 employed_A at_Prep) i ; - Work i = mkVP (mkV2 work_V at_Prep) i ; - - HaveTitle t = mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t)))) ; - HaveTitleOrg t i = mkVP (mkVP have_V2 (mkNP the_Det (mkCN position_N (mkAdv possess_Prep (mkNP t))))) (mkAdv in_Prep i) ; - - Organization = mkCN organization_N ; - Place = mkCN place_N ; - Person = mkCN person_N ; - - Location = mkRelation location_N ; - Region = mkRelation region_N ; - Subregion = mkRelation subregion_N ; - RName = mkRelation name_N ; - RNickname = mkRelation nickname_N ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName "'Location1" ; - Location2 = mkName "'Location2" ; - Location3 = mkName "'Location3" ; - Location4 = mkName "'Location4" ; - --- Organizations - Organization1 = mkName "'Organization1" ; - Organization2 = mkName "'Organization2" ; - Organization3 = mkName "'Organization3" ; - Organization4 = mkName "'Organization4" ; - --- Persons - Person1 = mkName "'Person1" ; - Person2 = mkName "'Person2" ; - Person3 = mkName "'Person3" ; - Person4 = mkName "'Person4" ; - - -} diff --git a/examples/query/small/QuerySwe.gf b/examples/query/small/QuerySwe.gf deleted file mode 100644 index f56ee6b53..000000000 --- a/examples/query/small/QuerySwe.gf +++ /dev/null @@ -1,174 +0,0 @@ ---# -path=.:alltenses - -concrete QuerySwe of Query = open - ParadigmsSwe, - IrregSwe, - SyntaxSwe, - ExtraSwe, - (M = MakeStructuralSwe), - (L = GrammarSwe), - Prelude -in { - -flags coding = utf8 ; - -lincat - Move = Utt ; ---- Text ; - Query = Utt ; - Answer = Utt ; - Set = NP ; - Relation = {cn : CN ; prep : Prep} ; - Kind = CN ; - Property = AP ; ---- {vp : VP ; typ : PropTyp} ; - Individual = NP ; - Activity = VP ; - Name = NP ; - Loc = NP ; - Org = NP ; - Pers = NP ; - [Individual] = [NP] ; - -lin - MQuery q = q ; ---- mkText (mkPhr q) questMarkPunct ; - MAnswer a = a ; ---- mkText (mkPhr a) fullStopPunct ; - - QSet s = - let - ss : NP = s - | mkNP (mkNP thePl_Det name_N) (mkAdv on_Prep s) - ---- s's names - in - mkUtt (mkImp (mkVP give_V3 (mkNP i_Pron) ss)) - | mkUtt (mkQS (mkQCl (L.CompIP whatSg_IP) ss)) - | mkUtt (mkQS (mkQCl (L.CompIP (L.IdetIP (mkIDet which_IQuant))) ss)) - | mkUtt ss ; - - QWhere s = mkUtt (mkQS (mkQCl where_IAdv s)) ; - QInfo s = - let - info : NP = mkNP all_Predet (mkNP (mkNP information_N) (mkAdv about_Prep s)) ; - in - mkUtt (mkImp (mkVP give_V3 (mkNP i_Pron) info)) - | mkUtt info ; - - QCalled i = mkUtt (mkQS (mkQCl (mkIP whichSg_IDet (mkCN other_A name_N)) i have_V2)) ; - - AKind s k = mkUtt (mkCl s (mkNP aPl_Det k)) ; ---- a, fun of s - AProp s p = mkUtt (mkCl s p) ; - AAct s p = mkUtt (mkCl s p) ; - - SAll k = mkNP all_Predet (mkNP aPl_Det k) | mkNP thePl_Det k ; - SOne k = mkNP n1_Numeral k ; - SIndef k = mkNP a_Det k ; - SPlural k = mkNP aPl_Det k ; - SOther k = mkNP aPl_Det (mkCN other_A k) ; - SInd i = i ; - SInds is = mkNP and_Conj is ; - - KRelSet r s = - mkCN r.cn (mkAdv r.prep s) ; - ---- | S's R - ----- KRelsSet r q s = ----- mkCN r.cn (mkAdv r.prep s) ; - - KRelKind k r s = - mkCN k (mkRS (mkRCl that_RP (mkVP (mkNP aPl_Det (mkCN r.cn (mkAdv r.prep s)))))) ; - - KRelPair k r = mkCN k (mkAdv with_Prep (mkNP (mkQuant they_Pron) plNum r.cn)) ; - KProp p k = - mkCN p k - | mkCN k (mkRS (mkRCl that_RP (mkVP p))) ; - KAct p k = - mkCN k (mkRS (mkRCl that_RP p)) ; - KRel r = r.cn ; - - IName n = n ; - NLoc n = n ; - NOrg n = n ; - NPers n = n; - - ACalled is = mkVP also_AdV (mkVP (mkAP (mkA2 called_A for_Prep) (mkNP or_Conj is))) ; - - BaseIndividual = mkListNP ; - ConsIndividual = mkListNP ; - -oper --- structural words - about_Prep = mkPrep "om" ; - all_NP = mkNP (mkPN "allt" neutrum) ; --- - also_AdV = mkAdV "också" | mkAdV "annars" ; - as_Prep = mkPrep "som" ; - at_Prep = mkPrep "på" ; - called_A = mkA "kallad" "kallat" "kallade" ; - give_V3 = mkV3 giva_V ; - information_N = mkN "information" "informationer" ; - other_A = compoundA (mkA "annan" "annat" "andra" "andra" "andra") ; - that_RP = which_RP ; - name_N = mkN "namn" "namn" ; - --- lexical constructors - mkName : Str -> NP = - \s -> mkNP (mkPN s) ; - mkRelation : N -> Prep -> {cn : CN ; prep : Prep} = - \s,p -> {cn = mkCN s ; prep = p} ; - --- lexicon - -lincat - JobTitle = CN ; -lin - Located i = mkAP (mkA2 (mkA "belägen" "beläget") in_Prep) i ; - - Employed i = mkAP (mkA2 (mkA "anställd") by8agent_Prep) i ; - - Work i = - mkVP (mkV2 (mkV "jobba") at_Prep) i - | mkVP (mkV2 (mkV "arbeta") in_Prep) i ; - - HaveTitle t = - mkVP (mkAP (mkA2 (mkA "anställd") as_Prep) (mkNP t)) - | mkVP (mkV2 (mkV "jobba") as_Prep) (mkNP t) ; - - HaveTitleOrg t i = - mkVP (mkVP (mkAP (mkA2 (mkA "anställd") as_Prep) (mkNP t))) (mkAdv at_Prep i) - | mkVP (mkVP (mkV2 (mkV "jobba") as_Prep) (mkNP t)) (mkAdv at_Prep i) ; --- | mkVP (mkVP have_V2 (mkNP the_Det (mkCN (mkN2 (mkN "titel" "titlar") po) (mkNP t)))) (mkAdv at_Prep i) ; - - Organization = mkCN (mkN "organisation" "organisationer") ; - Place = mkCN (mkN "plats" "platser") ; - Person = - mkCN (mkN "person" "personer") ; --- | mkCN (mkN "person" "folk") ; - - Location = mkRelation (mkN "läge" "lägen") possess_Prep ; - Region = mkRelation (mkN "region" "regioner") in_Prep ; - Subregion = mkRelation (mkN "delregion" "delregioner") in_Prep ; - RName = mkRelation (mkN "namn" "namn") on_Prep ; - RNickname = mkRelation (mkN "tilläggsnamn" "tilläggsnamn") on_Prep ; - --- JobTitles - JobTitle1 = mkCN (mkN "'JobTitle1") ; - JobTitle2 = mkCN (mkN "'JobTitle2") ; - JobTitle3 = mkCN (mkN "'JobTitle3") ; - JobTitle4 = mkCN (mkN "'JobTitle4") ; - --- Locations - Location1 = mkName "'Location1" ; - Location2 = mkName "'Location2" ; - Location3 = mkName "'Location3" ; - Location4 = mkName "'Location4" ; - --- Organizations - Organization1 = mkName "'Organization1" ; - Organization2 = mkName "'Organization2" ; - Organization3 = mkName "'Organization3" ; - Organization4 = mkName "'Organization4" ; - --- Persons - Person1 = mkName "'Person1" ; - Person2 = mkName "'Person2" ; - Person3 = mkName "'Person3" ; - Person4 = mkName "'Person4" ; - -} diff --git a/examples/query/small/README b/examples/query/small/README deleted file mode 100644 index 9e3997e00..000000000 --- a/examples/query/small/README +++ /dev/null @@ -1,11 +0,0 @@ -Query language for MOLTO KRI. -(c) Aarne Ranta 2011 for the gf files - -To compile and test: make - -To build a new language, use QueryGer or QueryIta as starting point: -they are the simplest and cleanest implementations. As baseline, just change -the lexical oper's in the beginning of the file. - - - diff --git a/examples/query/small/patentsQuery/LexQueryPats.gf b/examples/query/small/patentsQuery/LexQueryPats.gf deleted file mode 100644 index 466e924c3..000000000 --- a/examples/query/small/patentsQuery/LexQueryPats.gf +++ /dev/null @@ -1,111 +0,0 @@ -interface LexQueryPats = open Syntax, QueryPats, Query in -{ - -oper - --------------------------------------------------------------- --- structural words and extra grammar constructs - - about_Prep : Prep ; - - all_NP : NP ; - - vpAP : VP -> AP ; - - what_IQuant : IQuant ; - - massInfoSg : CN -> NP ; - - massInfoPl : CN -> NP ; - - PatsAdvVPSlash : VPSlash -> Adv -> VPSlash ; - - selectIP : NP -> IP ; -- selecting the right agreement : what are the ingredients ? / what is the expiration date ? (not obvious in English, but will make a difference in other languages) - - --------------------------------------------------------------- --- kinds - - patent_number_CN : Kind ; - - claim_N : Kind ; - - --------------------------------------------------------------- --- activities - - expire_V : Adv -> Activity ; - - simp_expire_V : Activity ; - - apply_V : NP -> Activity ; - - compound_CN : Activity ; - - use_V2 : Set -> Activity ; - - approve_V2 : Adv -> Activity ; - - mention_V2 : NP -> Activity ; - - contain_V2 : NP -> Activity ; - - --------------------------------------------------------------- --- properties - - approve_prop_V2 : Adv -> Property ; - - use_prop_V2 : Set -> Property ; - --------------------------------------------------------------- --- relations - - active_ingredient_CN : Relation ; - - dosage_form_CN : Relation ; - - route_of_administration_CN : Relation ; - - patent_number_Rel : Relation ; - - patent_N : Relation ; - - patent_with_N : Relation ; - - expiration_date_CN : Relation ; - - use_code_CN : Relation ; - - application_number_CN : Relation ; - - application_number_no_CN : Relation ; - - applicant_CN : Relation ; - - applicant_no_CN : Relation ; - - approval_date_CN : Relation ; - - chemical_composition_CN : Relation ; - - chemical_substance_CN : Relation ; - - drug_N : Relation ; - - use_N : Relation ; - - method_N : Relation ; - - drug_with_usage_form_CN : Relation ; - - drug_preparation_CN : Relation ; - - strength_N : Relation ; - - name_N : Relation ; - - usage_form_CN : Relation ; - - -}
\ No newline at end of file diff --git a/examples/query/small/patentsQuery/LexQueryPatsEng.gf b/examples/query/small/patentsQuery/LexQueryPatsEng.gf deleted file mode 100644 index 09206388e..000000000 --- a/examples/query/small/patentsQuery/LexQueryPatsEng.gf +++ /dev/null @@ -1,136 +0,0 @@ -instance LexQueryPatsEng of LexQueryPats = open - SyntaxEng, - (M=MakeStructuralEng), - ParadigmsEng, - ExtraEng, - IrregEng, - LangEng, - ResEng, - QueryEng - in -{ - -oper --------------------------------------------------------------- --- structural words and extra grammar constructs - - about_Prep : Prep = mkPrep "about" ; - - all_NP : NP = SyntaxEng.mkNP (mkPN "all") ; - - vpAP : VP -> AP = PartVP ; - - what_IQuant : IQuant = M.mkIQuant "what" "what" ; - - massInfoSg : CN -> NP = \cn -> SyntaxEng.mkNP cn ; - - massInfoPl : CN -> NP = \cn -> SyntaxEng.mkNP aPl_Det cn ; - - PatsAdvVPSlash : VPSlash -> Adv -> VPSlash = LangEng.AdvVPSlash ; - - selectIP : NP -> IP = \np -> case np.a of - {AgP3Sg _ => whatSg_IP ; - _ => whatPl_IP - }; - - --------------------------------------------------------------- --- kinds - - patent_number_CN : Kind = lin Kind (mkCN (mkN "patent" (mkN "number"))) ; - - claim_N : Kind = lin Kind (mkCN (mkN "claim")) ; - - --------------------------------------------------------------- --- activities - - expire_V : Adv -> Activity = \pdate -> - lin Activity (mkVP (mkVP (mkV "expire")) pdate) ; - - simp_expire_V : Activity = - lin Activity (mkVP (mkV "expire")) ; - - apply_V : NP -> Activity = \pat -> lin Activity ( mkVP (mkVP (mkV "apply" "applies" "applied" "applied" "applying")) (SyntaxEng.mkAdv for_Prep pat)) ; - - compound_CN : Activity = let vp : VP = mkVP (mkCN (mkN "compound")) - in lin Activity vp ; - - use_V2 : Set -> Activity = \s -> lin Activity (mkVP (passiveVP (mkV2 (mkV "use" "uses" "used" "used" "using"))) (SyntaxEng.mkAdv in_Prep s)); - - approve_V2 : Adv -> Activity = \pdate -> lin Activity (mkVP (passiveVP (mkV2 (mkV "approve" "approves" "approved" "approved" "approving"))) pdate) ; - - mention_V2 : NP -> Activity = \drug -> - lin Activity ( mkVP (mkVPSlash (mkV2 (mkV "mention" "mentions" "mentioned" "mentioned" "mentioning"))) drug) ; - - contain_V2 : NP -> Activity = \chem -> - lin Activity (mkVP (mkVPSlash (mkV2 (mkV "contain" "contains" "contained" "contained" "containing"))) chem) ; - - --------------------------------------------------------------- --- properties - - approve_prop_V2 : Adv -> Property = \pdate -> lin Property (vpAP (mkVP (passiveVP (mkV2 (mkV "approve" "approves" "approved" "approved" "approving"))) pdate)) ; - - use_prop_V2 : Set -> Property = \s -> lin Property (vpAP (mkVP (passiveVP (mkV2 (mkV "use" "uses" "used" "used" "using"))) (SyntaxEng.mkAdv in_Prep s))) ; - - - --------------------------------------------------------------- --- relations - - active_ingredient_CN : Relation = makeRelation (mkCN (mkA "active") (mkN "ingredient")) ; - - dosage_form_CN : Relation = makeRelation (mkCN (mkN "dosage" (mkN "form"))) ; - - route_of_administration_CN : Relation = makeRelation (mkCN (mkN "route") (SyntaxEng.mkAdv (mkPrep "of") (SyntaxEng.mkNP (mkN "administration")))) ; - - patent_number_Rel : Relation = makeRelation (mkCN (mkN "patent" (mkN "number"))) ; - - patent_N : Relation = lin Relation {cn = mkCN (mkN "patent") ; prep = for_Prep } ; - - patent_with_N : Relation = lin Relation {cn = mkCN (mkN "patent"); prep = with_Prep} ; - - expiration_date_CN : Relation = makeRelation (mkCN (mkN "expiration" (mkN "date"))) ; - - use_code_CN : Relation = makeRelation (SyntaxEng.mkCN (mkN "use" (mkN "code"))) ; - - application_number_CN : Relation = makeRelation ((mkCN (mkN "application" (mkN "number"))) | (mkCN (mkN ["patent application"] (mkN "number")))) ; - - - application_number_no_CN : Relation = lin Relation {cn = ((mkCN (mkN "application" (mkN "number"))) | (mkCN (mkN ["patent application"] (mkN "number")))); prep = noPrep} ; - - applicant_CN : Relation = lin Relation { cn = mkCN (mkN "applicant") ; prep = for_Prep } ; - - - applicant_no_CN : Relation = lin Relation {cn = mkCN (mkN "applicant"); prep = noPrep} ; - - approval_date_CN : Relation = makeRelation (mkCN (mkN "approval" (mkN "date"))) ; - - - chemical_composition_CN : Relation = makeRelation (mkCN (mkA "chemical") (mkN "composition")) ; - - chemical_substance_CN : Relation = lin Relation {cn = (mkCN (mkA "chemical") (mkN "substance")) ; prep = from_Prep | part_Prep } ; - - drug_N : Relation = lin Relation {cn = mkCN (mkN "drug") ; prep = with_Prep} ; - - use_N : Relation = makeRelation (mkCN (mkN "use")) ; - - method_N : Relation = makeRelation (mkCN (mkN "method")) ; - - drug_with_usage_form_CN : Relation = lin Relation {cn = mkCN (mkN "drug") ; prep = noPrep } ; - - drug_preparation_CN : Relation = lin Relation {cn = mkCN (mkN "drug" (mkN "preparation")) ; prep = for_Prep} ; - - strength_N : Relation = makeRelation (mkCN (mkN "strength")) ; - - name_N : Relation = makeRelation (mkCN (mkN "name")) ; - - usage_form_CN = makeRelation (mkCN (mkN "usage" (mkN "form"))) ; - ----------------------------------------------------------------------------- -oper makeRelation : CN -> Relation = - \s -> lin Relation {cn = s ; prep = possess_Prep} ; - - -}
\ No newline at end of file diff --git a/examples/query/small/patentsQuery/LexQueryPatsFre.gf b/examples/query/small/patentsQuery/LexQueryPatsFre.gf deleted file mode 100644 index 7577e1d66..000000000 --- a/examples/query/small/patentsQuery/LexQueryPatsFre.gf +++ /dev/null @@ -1,159 +0,0 @@ -instance LexQueryPatsFre of LexQueryPats = open - SyntaxFre, - ParadigmsFre, - ExtraFre, - IrregFre, - DiffFre, - StructuralFre, - (CR=CommonRomance), - ParamX, - QueryFre, - Prelude - in -{ - -oper --------------------------------------------------------------- --- structural words and extra grammar constructs - - about_Prep : Prep = mkPreposition ["à propos de"] ; - - all_NP : NP = mkNP (mkPN "tout") ; - - vpAP : VP -> AP = variants {} ; - - what_IQuant : IQuant = which_IQuant ; - - massInfoSg : CN -> NP = \cn -> - let g = cn.g ; - n = Sg - in lin NP { - s = \\c => {comp,ton = cn.s ! n ; c1,c2 = []} ; - a = CR.agrP3 g n ; - hasClit = False ; - isPol = False - } ; - - massInfoPl : CN -> NP = \cn -> SyntaxFre.mkNP aPl_Det cn ; - - PatsAdvVPSlash : VPSlash -> Adv -> VPSlash = \vp, adv -> lin VPSlash - { - s = vp.s ; - agr = vp.agr ; - clit1 = vp.clit1 ; - clit2 = vp.clit2 ; - clit3 = vp.clit3 ; - neg = vp.neg ; - comp = \\a => vp.comp ! a ++ adv.s ; - ext = vp.ext ; - c2 = vp.c2 ; - } ; - - selectIP : NP -> IP = \np -> case np.a.n of - {Sg => whatSg_IP ; - _ => whatPl_IP - }; - - --------------------------------------------------------------- --- kinds - - patent_number_CN : Kind = - let pn : CN = mkCN (mkCN (mkN "numéro")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "brevet"))) - in lin Kind pn ; - - claim_N : Kind = lin Kind (mkCN (mkN "revendication")) ; - - --------------------------------------------------------------- --- activities - - expire_V : Adv -> Activity = \pdate -> - lin Activity (mkVP (mkVP (mkV "expire")) pdate) ; - - simp_expire_V : Activity = - lin Activity (mkVP (regV "expirer")) ; - - apply_V : NP -> Activity = \pat -> lin Activity ( mkVP (mkVP (regV "appliquer")) (SyntaxFre.mkAdv for_Prep pat)) ; - - compound_CN : Activity = let vp : VP = mkVP (mkCN (mkN "composé")) - in lin Activity vp ; - - use_V2 : Set -> Activity = \s -> lin Activity (mkVP (passiveVP (dirV2 (regV "utiliser"))) (SyntaxFre.mkAdv in_Prep s)); - - approve_V2 : Adv -> Activity = \pdate -> lin Activity (mkVP (passiveVP (dirV2 (regV "approuver"))) pdate) ; - - mention_V2 : NP -> Activity = \drug -> - lin Activity ( mkVP (mkVPSlash (dirV2 (regV "mentionner"))) drug) ; - - contain_V2 : NP -> Activity = \chem -> - lin Activity (mkVP (mkVPSlash IrregFre.contenir_V2) chem) ; - - --------------------------------------------------------------- --- properties - - approve_prop_V2 : Adv -> Property = \pdate -> lin Property (vpAP (mkVP (passiveVP (dirV2 (regV "approuver"))) pdate)) ; - - use_prop_V2 : Set -> Property = \s -> lin Property (vpAP (mkVP (passiveVP (dirV2 (regV "utiliser"))) (SyntaxFre.mkAdv in_Prep s))) ; - - - --------------------------------------------------------------- --- relations - - active_ingredient_CN : Relation = makeRelation (mkCN (mkA "actif") (mkN "ingrédient")) ; - - dosage_form_CN : Relation = makeRelation (mkCN (mkA "posologique") (mkN "forme")) ; - - route_of_administration_CN : Relation = makeRelation (mkCN (mkCN (mkN "voie")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "administration")))) ; - - patent_number_Rel : Relation = makeRelation (mkCN (mkCN (mkN "numéro")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "brevet")))) ; - - patent_N : Relation = lin Relation {cn = mkCN (mkN "brevet") ; prep = for_Prep } ; - - patent_with_N : Relation = lin Relation {cn = mkCN (mkN "brevet"); prep = with_Prep} ; - - expiration_date_CN : Relation = makeRelation (mkCN (mkCN (mkN "date")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "expiration")))) ; - - use_code_CN : Relation = makeRelation (mkCN (mkCN (mkN "code")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "utilisation")))) ; - - application_number_CN : Relation = makeRelation (mkCN (mkCN (mkN "numéro")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "demande")))) ; - - - application_number_no_CN : Relation = lin Relation {cn = (mkCN (mkCN (mkN "numéro")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "demande")))); prep = mkPrep ""} ; - - applicant_CN : Relation = lin Relation { cn = mkCN (mkN "demandeur") ; prep = for_Prep } ; - - - applicant_no_CN : Relation = lin Relation {cn = mkCN (mkN "demandeur"); prep = mkPrep ""} ; - - approval_date_CN : Relation = makeRelation (mkCN (mkCN (mkN "date")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "approbation")))) ; - - - chemical_composition_CN : Relation = makeRelation (mkCN (mkA "chemique") (mkN "composition")) ; - - chemical_substance_CN : Relation = lin Relation {cn = (mkCN (mkA "chimique") (mkN "substance")) ; prep = from_Prep | part_Prep } ; - - drug_N : Relation = lin Relation {cn = mkCN (mkN "médicament") ; prep = with_Prep} ; - - use_N : Relation = makeRelation (mkCN (mkN "utilisation")) ; - - method_N : Relation = makeRelation (mkCN (mkN "méthode")) ; - - drug_with_usage_form_CN : Relation = lin Relation {cn = mkCN (mkN "médicament") ; prep = mkPrep "" } ; - - drug_preparation_CN : Relation = lin Relation {cn = mkCN (mkN "préparation") ; prep = for_Prep} ; - - strength_N : Relation = makeRelation (mkCN (mkN "dosage")) ; - - name_N : Relation = makeRelation (mkCN (mkN "nom")) ; - - usage_form_CN = makeRelation ( mkCN (mkCN (mkN "formulaire")) (SyntaxFre.mkAdv possess_Prep (mkNP (mkN "utilisation")))) ; - ----------------------------------------------------------------------------- -oper makeRelation : CN -> Relation = - \s -> lin Relation {cn = s ; prep = possess_Prep} ; - - -} diff --git a/examples/query/small/patentsQuery/QueryPats.gf b/examples/query/small/patentsQuery/QueryPats.gf deleted file mode 100644 index b66950d20..000000000 --- a/examples/query/small/patentsQuery/QueryPats.gf +++ /dev/null @@ -1,194 +0,0 @@ ---# -path=.:..:alltenses - -abstract QueryPats = Query ** open Syntax in { -------------------------------------------------------------------------------------- --- additions to the general Query grammar - - -fun - - SThe : Kind -> Set ; -- the route of administration - - SMassSg : Kind -> Set ; -- route of administration - - QWho : Activity -> Query ; -- who applied for the patent ? - --- QWhen : Set -> Activity -> Query ; -- when was the patent approved ? - - QMass : Set -> Query ; -- expiration date of the patent - - QExist : Kind -> Query ; -- what dosage forms of DRUG are there ? - -- maybe merge with QSet - - - - -------------------------------------------------------------------------------------- --- categories and example functions for the Patent Query grammar - -cat - Drug ; - Patent ; - ChemicalSubstance ; - DrugUsageForm ; - PatentNumber ; - Applicant ; - ApplicationNumber ; - PatsDate ; - SimpDate ; - --------------------------------------------------------------------------------- --- simple coercions - -fun DrugToSet : Drug -> Set ; -fun PatentToSet : Patent -> Set ; -fun ChemToSet : ChemicalSubstance -> Set ; -fun UsageToSet : DrugUsageForm -> Set ; -fun PatNumToSet : PatentNumber -> Set ; -fun AppToSet : Applicant -> Set ; -fun AppNumToSet : ApplicationNumber -> Set ; ---fun DateToSet : PatsDate -> Set ; - - -fun - OnDate : SimpDate -> PatsDate ; - BeforeDate : SimpDate -> PatsDate ; - AfterDate : SimpDate -> PatsDate ; - FromSimpDate : SimpDate -> PatsDate ; - - -------------------------------------------------------------------------------------- --- main functions for the Patents Query grammar - -fun - - PQInfo : Drug -> Query ; -- what information do you have about DRUG | give me all information about DRUG ... - - PQActive : Drug -> Query ; -- what active ingredients are in DRUG - - PQDosage : Drug -> Query ; -- what are the dosage forms of DRUG - - PQRoute : Drug -> Query ; -- what is the route of administration of DRUG - - PQPatentNo : Query ; -- give me all the patent numbers - - PQPatentDrug : Drug -> Query ; -- give me the patent number of DRUG - - PQPatentPat : Patent -> Query ; -- give me the patent number for PATENT - - PQExpPat : Patent -> Query ; -- when does PATENT expire - - PQExpDrug : Drug -> Query ; -- when does the patent for DRUG expire - - PQUseCode : Patent -> Query ; -- what is the use code of PATENT - - PQAppNumber : Patent -> Query ; -- what is the application number for PATENT - - PQApplicant : Patent -> Query ; -- who applied for PATENT - - PQAppDayDrug : Drug -> Query ; -- what is the approval date of the patent for DRUG - - PQAppDayPat : Patent -> Query ; -- what is the approval date of PATENT - - PQAppDayPatApp : Patent -> Applicant -> Query ; -- what is the approval date of PATENT with APPLICANT - - PQAppDayNo : ApplicationNumber -> Query ; -- what is the approval date for the patent with APPLICATION_NUMBER - - PQChemComp : Drug -> Query ; -- what is the chemical composition of DRUG - - PQCompounds : Query ; -- what are the drugs that are compounds - - PQPrep : Query ; -- what drug preparations are there - - PQDrugPrep : Drug -> Query ; -- the drug preparation for DRUG - - PQPrepDate : Drug -> PatsDate -> Query ; -- the drug preparation for DRUG with a patent that expires after DATE - - PQName : Drug -> Query ; -- the name of DRUG - - PQNameDate : Drug -> PatsDate -> Query ; -- the name of drug with approval date DATE - - PQNameApp : Applicant -> Query ; -- the name of drug with a patent from applicant APPLICANT - - PQMethods : Patent -> Query ; -- what methods are used for PATENT - - PQDateMeth : PatsDate -> Query ; -- what methods are used in patents with approval date before DATE - - PQMethNo : PatentNumber -> Query ; -- what methods are used in the patent with patent number PATENT_NUMBER - - PQUse : Patent -> Query ; -- what is the use of PATENT - - PQUseDate : PatsDate -> Query ; -- what is the use of PATENT approved before DATE - - PQUseExp : Patent -> PatsDate -> Query ; -- what is the use of PATENT that expires on DATE - - PQDateUse : PatsDate -> Query ; -- give me all patents approved on DATE - - PQUseDrug : Drug -> Query ; -- what is the use of DRUG - - PQUseChem : ChemicalSubstance -> Query ; -- what is the use of drugs that contain CHEMICAL_SUBSTANCE - - PQUseForm : DrugUsageForm -> Query ; -- what is the use of drugs with usage form DRUG_USAGE_FORM - - PQStrength : Drug -> Query ; -- what is the strength of DRUG - - PQStrengthChem : ChemicalSubstance -> Query ; -- what is the strenght of drugs that contain CHEMICAL_SUBSTANCE - - PQClaims : Drug -> Query ; -- what are the claims that mention DRUG - - - -fun ---------------------- - Aspirin : Drug ; ---------------------- --- put all other drug names here ! - - ---------------------- - Pats1230 : Patent ; ---------------------- --- put all other patent names here ! - - ---------------------- - Hydrogen : ChemicalSubstance ; ---------------------- --- put all chemical substances here ! - - --------------------- - Inhalation : DrugUsageForm ; --------------------- --- put all drug usage forms here ! - - - -------------------- - P123 : PatentNumber ; -------------------- --- put all patent numbers here ! - - - -------------------- - JohnDoe : Applicant ; -------------------- --- put all applicants here ! - - - -------------------- - A123 : ApplicationNumber ; ------------------- --- put all application numbers here - - -------------------- - Today : PatsDate ; - A20June : SimpDate ; -------------------- --- put all dates here (maybe use Date grammar instead) - - -}
\ No newline at end of file diff --git a/examples/query/small/patentsQuery/QueryPatsEng.gf b/examples/query/small/patentsQuery/QueryPatsEng.gf deleted file mode 100644 index f3800d9fd..000000000 --- a/examples/query/small/patentsQuery/QueryPatsEng.gf +++ /dev/null @@ -1,387 +0,0 @@ ---# -path=.:..:alltenses - -concrete QueryPatsEng of QueryPats = QueryEng ** open - LexQueryPatsEng, - ParadigmsEng, - IrregEng, - SyntaxEng, - ExtraEng, - (L=LangEng), - (M=MakeStructuralEng), - Prelude -in { - - --------------------------------------------------------- --- additions to the original query grammar - -lin - - SThe k = SyntaxEng.mkNP the_Det k ; - - SMassSg k = SyntaxEng.mkNP k ; - - QWho a = mkUtt (mkQCl whoSg_IP a) ; - --- QWhen : Set -> Activity -> Query ; - - QMass s = mkUtt s ; - - QExist s = mkUtt (L.ExistIP (L.IdetCN (L.IdetQuant what_IQuant L.NumPl) s)) - | mkUtt (mkNP all_NP (SyntaxEng.mkAdv about_Prep (mkNP s))) ; - - ---------------------------------------------------------- --- from the patent query grammar - -lincat - Drug = NP ; - Patent = NP ; - ChemicalSubstance = NP ; - DrugUsageForm = NP ; - PatentNumber = NP ; - Applicant = NP ; - ApplicationNumber = NP ; - PatsDate = Adv ; - SimpDate = Adv ; - - -lin -PQInfo drug = QInfo (DrugToSet drug) ; - -PQActive drug = - let ai : Kind = KRelSet active_ingredient_CN (DrugToSet drug) - in - basicPlur ai ; - - -PQDosage drug = - let df : Kind = KRelSet dosage_form_CN (DrugToSet drug) - in - basicBoth df | QExist df ; - - -PQRoute drug = - let df : Kind = KRelSet route_of_administration_CN (DrugToSet drug) - in - basicBoth df | QExist df ; - - -PQPatentNo = - let bu : Query = basicPlur patent_number_CN - in - bu | QExist patent_number_CN ; - - -PQPatentDrug drug = - let df : Kind = KRelSet patent_number_Rel (DrugToSet drug) - in - basicSing df ; - - - -PQPatentPat patent = - let ai : Kind = KRelSet patent_number_Rel (PatentToSet patent) - in - basicSing ai ; - - -PQExpPat patent = - let - ai : Kind = KRelSet expiration_date_CN (PatentToSet patent) ; - bu : Query = basicSing ai - in - bu ; - -- KAct when_IAdv (mkCl patent (mkVP expire_V))) ; - - -PQExpDrug drug = - let - ai : Kind = KRelSet expiration_date_CN (SThe (KRelSet patent_N (DrugToSet drug))) - in - basicSing ai ; --- | mkUtt (mkQCl when_IAdv (mkCl (mkNP the_Art ai) (mkVP expire_V))); - - -PQUseCode patent = - let df : Kind = KRelSet use_code_CN (PatentToSet patent) - in - basicBoth df ; - - -PQAppNumber patent = - let df : Kind = KRelSet application_number_CN (PatentToSet patent) - in - basicSing df ; - - -PQApplicant patent = - let df : Kind = KRelSet applicant_CN (PatentToSet patent) ; - bu : Query = basicSing df - in - bu ; --- | mkUtt (mkQS (mkQCl whoSg_IP (mkVP (mkVP apply_V) (SyntaxEng.mkAdv for_Prep patent)))) --- | mkUtt (mkQS pastTense (mkQCl whoSg_IP (mkVP (mkVP apply_V) (SyntaxEng.mkAdv for_Prep patent)))); - - -PQAppDayDrug drug = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_N (DrugToSet drug))) - in - basicSing df ; - - -PQAppDayPat patent = - let df : Kind = KRelSet approval_date_CN (PatentToSet patent) - in - basicSing df ; - - -PQAppDayPatApp patent applicant = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_with_N (SThe (KRelSet applicant_CN (AppToSet applicant))))) - in - basicSing df ; - - -PQAppDayNo appno = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_with_N (SThe (KRelSet application_number_CN (AppNumToSet appno))))) - in - basicSing df ; - - -PQChemComp drug = - let - df : Kind = KRelSet chemical_substance_CN (DrugToSet drug) ; - cc : Kind = KRelSet chemical_composition_CN (DrugToSet drug) - in - basicPlur df | basicSing cc ; - - -PQCompounds = - let cc : Kind = KAct compound_CN (KRel drug_N) - in - basicPlur cc ; - - -PQPrep = - basicPlur (KRel drug_preparation_CN) - | QExist (KRel drug_preparation_CN) ; - - -PQDrugPrep drug = - let df : Kind = KRelSet drug_preparation_CN (DrugToSet drug) - in - basicSing df ; - ------ - -PQName drug = - let - df : CN = KRelSet name_N (DrugToSet drug) - in - basicSing df ; - - -PQNameApp applicant = - let pt2 : Set = SIndef (KRelSet patent_with_N (SThe (KRelSet applicant_CN applicant))) ; - df : Kind = KRelSet drug_N pt2 - in - basicSing df ; - ----- - -PQMethods patent = - let pt1 : Kind = KProp (use_prop_V2 (PatentToSet patent)) (KRel method_N) ; - pt2 : Kind = KRelSet method_N (PatentToSet patent) ; - pt : Kind = pt1 | pt2 - in - basicPlur pt ; - - -PQDateMeth date = - let pdate : Set = SAll (KAct (expire_V date) (KRel patent_N)) ; - pt1 : Kind = KAct (use_V2 pdate) (KRel method_N) ; - pt2 : Kind = KProp (use_prop_V2 pdate) (KRel method_N) ; - pt3 : Kind = KRelSet method_N pdate ; - pt : Kind = pt1 | pt2 | pt3 - in - basicPlur pt ; - - -PQMethNo appno = - let pdate : Set = SThe (KRelSet patent_with_N (SThe (KRelSet application_number_no_CN appno))) ; - pt1 : Kind = KProp (use_prop_V2 (SThe (KRel patent_N))) (KRel method_N) ; - pt2 : Kind = KRelSet method_N (SThe (KRel patent_N)) ; - pt : Kind = pt1 | pt2 - in - basicPlur pt ; - ----- - -PQUse patent = - let df : Kind = KRelSet use_N (PatentToSet patent) - in - basicSing df ; - - -PQUseDate date = - let pdate : Set = SThe (KAct (approve_V2 date) (KRel patent_N)) ; - pt : Kind = KRelSet use_N pdate - in - basicSing pt ; - -PQDateUse date = - let patent : Kind = KRel patent_N ; - pdate : Set = SAll (KProp (approve_prop_V2 date) patent) ; - pt : Kind = KRelSet use_N pdate - - in - basicPlur pt ; - - -PQUseDrug drug = - let df : Kind = KRelSet use_N (DrugToSet drug) - in - basicSing df ; - - -PQUseChem chem = - let drug : Kind = KAct (contain_V2 chem) (KRel drug_N) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet use_N drugs - in - basicSing df ; - - -PQUseForm uform = - let drug : Kind = KRelSet usage_form_CN (UsageToSet uform) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet use_N drugs - in - basicSing df ; - ---- - -PQStrength drug = - let df : Kind = KRelSet strength_N (DrugToSet drug) - in - basicSing df ; - - -PQStrengthChem chem = - let drug : Kind = KAct (contain_V2 chem) (KRel drug_N) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet strength_N (DrugToSet drugs) - in - basicSing df ; - ---- - -PQClaims drug = - let cc : Kind = KAct (mention_V2 drug) (mkCN claim_N) - in - basicPlur cc ; - - - --------------------------------------------------------------------------------- - oper basicSing : CN -> Utt = - \df -> - let sg_df : NP = SThe df ; - massdf : NP = SMassSg df - in - QSet sg_df - | QMass massdf - | QMass sg_df ; - - -oper basicPlur : CN -> Utt = - \df -> - let sg_df : NP = SAll df ; - massdf : NP = SPlural df - in - QInfo sg_df - | QMass massdf - | QMass sg_df ; - - -oper basicBoth : CN -> Utt = - \df -> - let sg_df : NP = SThe df ; - the_df : NP = SAll df ; - mass_sg_df : NP = SMassSg df ; - mass_pl_df : NP = SPlural df - in - QInfo the_df - | QInfo sg_df - | QMass mass_sg_df - | QMass sg_df - | QMass mass_pl_df - | QMass the_df ; - --------------------------------------------------------------------------- --- coercions - -lin DrugToSet d = d ; -lin PatentToSet d = d ; -lin ChemToSet d = d ; -lin UsageToSet d = d ; -lin PatNumToSet d = d ; -lin AppToSet d = d ; -lin AppNumToSet d = d ; ---lin DateToSet : PatsDate -> Set ; - - - - OnDate d = mkPatsDate on_Prep ; - BeforeDate d = mkPatsDate before_Prep ; - AfterDate d = mkPatsDate after_Prep ; - - oper mkPatsDate : Prep -> Adv = \prep -> SyntaxEng.mkAdv prep (mkNP (mkPN "DATE")) ; - - - - --- lexicon - -oper mkDrug : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkPatents : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkChemicalSubstance : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkDrugUsageForm : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkPatentNumber : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkApplicant : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p) ; - -oper mkApplicationNumber : Str -> NP = - \p -> SyntaxEng.mkNP (mkPN p); - - - - -lin - -Aspirin = mkDrug "DRUG" ; - -Pats1230 = mkPatents "PATENT" ; - -Hydrogen = mkChemicalSubstance "CHEMICAL_SUBSTANCE" ; - -Inhalation = mkDrugUsageForm "DRUG_USAGE_FORM" ; - -P123 = mkPatentNumber "PATENT_NUMBER" ; - -JohnDoe = mkApplicant "APPLICANT" ; - -A123 = mkApplicationNumber "APPLICATION_NUMBER" ; - - -}
\ No newline at end of file diff --git a/examples/query/small/patentsQuery/QueryPatsFre.gf b/examples/query/small/patentsQuery/QueryPatsFre.gf deleted file mode 100644 index f4808fbf1..000000000 --- a/examples/query/small/patentsQuery/QueryPatsFre.gf +++ /dev/null @@ -1,386 +0,0 @@ ---# -path=.:..:alltenses - -concrete QueryPatsFre of QueryPats = QueryFre ** open - LexQueryPatsFre, - ParadigmsFre, - IrregFre, - SyntaxFre, - ExtraFre, - (L=LangFre), - Prelude -in { - - --------------------------------------------------------- --- additions to the original query grammar - -lin - - SThe k = SyntaxFre.mkNP the_Det k ; - - SMassSg k = SyntaxFre.mkNP k ; - - QWho a = mkUtt (mkQCl whoSg_IP a) ; - --- QWhen : Set -> Activity -> Query ; - - QMass s = mkUtt s ; - - QExist s = mkUtt (L.ExistIP (L.IdetCN (L.IdetQuant what_IQuant L.NumPl) s)) - | mkUtt (mkNP all_NP (SyntaxFre.mkAdv about_Prep (mkNP s))) ; - - ---------------------------------------------------------- --- from the patent query grammar - -lincat - Drug = NP ; - Patent = NP ; - ChemicalSubstance = NP ; - DrugUsageForm = NP ; - PatentNumber = NP ; - Applicant = NP ; - ApplicationNumber = NP ; - PatsDate = Adv ; - SimpDate = Adv ; - - -lin -PQInfo drug = QInfo (DrugToSet drug) ; - -PQActive drug = - let ai : Kind = KRelSet active_ingredient_CN (DrugToSet drug) - in - basicPlur ai ; - - -PQDosage drug = - let df : Kind = KRelSet dosage_form_CN (DrugToSet drug) - in - basicBoth df | QExist df ; - - -PQRoute drug = - let df : Kind = KRelSet route_of_administration_CN (DrugToSet drug) - in - basicBoth df | QExist df ; - - -PQPatentNo = - let bu : Query = basicPlur patent_number_CN - in - bu | QExist patent_number_CN ; - - -PQPatentDrug drug = - let df : Kind = KRelSet patent_number_Rel (DrugToSet drug) - in - basicSing df ; - - - -PQPatentPat patent = - let ai : Kind = KRelSet patent_number_Rel (PatentToSet patent) - in - basicSing ai ; - - -PQExpPat patent = - let - ai : Kind = KRelSet expiration_date_CN (PatentToSet patent) ; - bu : Query = basicSing ai - in - bu ; - -- KAct when_IAdv (mkCl patent (mkVP expire_V))) ; - - -PQExpDrug drug = - let - ai : Kind = KRelSet expiration_date_CN (SThe (KRelSet patent_N (DrugToSet drug))) - in - basicSing ai ; --- | mkUtt (mkQCl when_IAdv (mkCl (mkNP the_Art ai) (mkVP expire_V))); - - -PQUseCode patent = - let df : Kind = KRelSet use_code_CN (PatentToSet patent) - in - basicBoth df ; - - -PQAppNumber patent = - let df : Kind = KRelSet application_number_CN (PatentToSet patent) - in - basicSing df ; - - -PQApplicant patent = - let df : Kind = KRelSet applicant_CN (PatentToSet patent) ; - bu : Query = basicSing df - in - bu ; --- | mkUtt (mkQS (mkQCl whoSg_IP (mkVP (mkVP apply_V) (SyntaxFre.mkAdv for_Prep patent)))) --- | mkUtt (mkQS pastTense (mkQCl whoSg_IP (mkVP (mkVP apply_V) (SyntaxFre.mkAdv for_Prep patent)))); - - -PQAppDayDrug drug = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_N (DrugToSet drug))) - in - basicSing df ; - - -PQAppDayPat patent = - let df : Kind = KRelSet approval_date_CN (PatentToSet patent) - in - basicSing df ; - - -PQAppDayPatApp patent applicant = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_with_N (SThe (KRelSet applicant_CN (AppToSet applicant))))) - in - basicSing df ; - - -PQAppDayNo appno = - let df : Kind = KRelSet approval_date_CN (SThe (KRelSet patent_with_N (SThe (KRelSet application_number_CN (AppNumToSet appno))))) - in - basicSing df ; - - -PQChemComp drug = - let - df : Kind = KRelSet chemical_substance_CN (DrugToSet drug) ; - cc : Kind = KRelSet chemical_composition_CN (DrugToSet drug) - in - basicPlur df | basicSing cc ; - - -PQCompounds = - let cc : Kind = KAct compound_CN (KRel drug_N) - in - basicPlur cc ; - - -PQPrep = - basicPlur (KRel drug_preparation_CN) - | QExist (KRel drug_preparation_CN) ; - - -PQDrugPrep drug = - let df : Kind = KRelSet drug_preparation_CN (DrugToSet drug) - in - basicSing df ; - ------ - -PQName drug = - let - df : CN = KRelSet name_N (DrugToSet drug) - in - basicSing df ; - - -PQNameApp applicant = - let pt2 : Set = SIndef (KRelSet patent_with_N (SThe (KRelSet applicant_CN applicant))) ; - df : Kind = KRelSet drug_N pt2 - in - basicSing df ; - ----- - -PQMethods patent = - let pt1 : Kind = KProp (use_prop_V2 (PatentToSet patent)) (KRel method_N) ; - pt2 : Kind = KRelSet method_N (PatentToSet patent) ; - pt : Kind = pt1 | pt2 - in - basicPlur pt ; - - -PQDateMeth date = - let pdate : Set = SAll (KAct (expire_V date) (KRel patent_N)) ; - pt1 : Kind = KAct (use_V2 pdate) (KRel method_N) ; - pt2 : Kind = KProp (use_prop_V2 pdate) (KRel method_N) ; - pt3 : Kind = KRelSet method_N pdate ; - pt : Kind = pt1 | pt2 | pt3 - in - basicPlur pt ; - - -PQMethNo appno = - let pdate : Set = SThe (KRelSet patent_with_N (SThe (KRelSet application_number_no_CN appno))) ; - pt1 : Kind = KProp (use_prop_V2 (SThe (KRel patent_N))) (KRel method_N) ; - pt2 : Kind = KRelSet method_N (SThe (KRel patent_N)) ; - pt : Kind = pt1 | pt2 - in - basicPlur pt ; - ----- - -PQUse patent = - let df : Kind = KRelSet use_N (PatentToSet patent) - in - basicSing df ; - - -PQUseDate date = - let pdate : Set = SThe (KAct (approve_V2 date) (KRel patent_N)) ; - pt : Kind = KRelSet use_N pdate - in - basicSing pt ; - -PQDateUse date = - let patent : Kind = KRel patent_N ; - pdate : Set = SAll (KProp (approve_prop_V2 date) patent) ; - pt : Kind = KRelSet use_N pdate - - in - basicPlur pt ; - - -PQUseDrug drug = - let df : Kind = KRelSet use_N (DrugToSet drug) - in - basicSing df ; - - -PQUseChem chem = - let drug : Kind = KAct (contain_V2 chem) (KRel drug_N) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet use_N drugs - in - basicSing df ; - - -PQUseForm uform = - let drug : Kind = KRelSet usage_form_CN (UsageToSet uform) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet use_N drugs - in - basicSing df ; - ---- - -PQStrength drug = - let df : Kind = KRelSet strength_N (DrugToSet drug) - in - basicSing df ; - - -PQStrengthChem chem = - let drug : Kind = KAct (contain_V2 chem) (KRel drug_N) ; - drugs : Set = SAll drug ; - df : Kind = KRelSet strength_N (DrugToSet drugs) - in - basicSing df ; - ---- - -PQClaims drug = - let cc : Kind = KAct (mention_V2 drug) (mkCN claim_N) - in - basicPlur cc ; - - - --------------------------------------------------------------------------------- - oper basicSing : CN -> Utt = - \df -> - let sg_df : NP = SThe df ; - massdf : NP = SMassSg df - in - QSet sg_df - | QMass massdf - | QMass sg_df ; - - -oper basicPlur : CN -> Utt = - \df -> - let sg_df : NP = SAll df ; - massdf : NP = SPlural df - in - QInfo sg_df - | QMass massdf - | QMass sg_df ; - - -oper basicBoth : CN -> Utt = - \df -> - let sg_df : NP = SThe df ; - the_df : NP = SAll df ; - mass_sg_df : NP = SMassSg df ; - mass_pl_df : NP = SPlural df - in - QInfo the_df - | QInfo sg_df - | QMass mass_sg_df - | QMass sg_df - | QMass mass_pl_df - | QMass the_df ; - --------------------------------------------------------------------------- --- coercions - -lin DrugToSet d = d ; -lin PatentToSet d = d ; -lin ChemToSet d = d ; -lin UsageToSet d = d ; -lin PatNumToSet d = d ; -lin AppToSet d = d ; -lin AppNumToSet d = d ; ---lin DateToSet : PatsDate -> Set ; - - - - OnDate d = mkPatsDate on_Prep ; - BeforeDate d = mkPatsDate before_Prep ; - AfterDate d = mkPatsDate after_Prep ; - - oper mkPatsDate : Prep -> Adv = \prep -> SyntaxFre.mkAdv prep (mkNP (mkPN "DATE")) ; - - - - --- lexicon - -oper mkDrug : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkPatents : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkChemicalSubstance : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkDrugUsageForm : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkPatentNumber : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkApplicant : Str -> NP = - \p -> mkNP (mkPN p) ; - -oper mkApplicationNumber : Str -> NP = - \p -> mkNP (mkPN p); - - - - -lin - -Aspirin = mkDrug "DRUG" ; - -Pats1230 = mkPatents "PATENT" ; - -Hydrogen = mkChemicalSubstance "CHEMICAL_SUBSTANCE" ; - -Inhalation = mkDrugUsageForm "DRUG_USAGE_FORM" ; - -P123 = mkPatentNumber "PATENT_NUMBER" ; - -JohnDoe = mkApplicant "APPLICANT" ; - -A123 = mkApplicationNumber "APPLICATION_NUMBER" ; - - -}
\ No newline at end of file diff --git a/examples/query/small/patentsQuery/QueryProton.gf b/examples/query/small/patentsQuery/QueryProton.gf deleted file mode 100644 index 4c1bd7237..000000000 --- a/examples/query/small/patentsQuery/QueryProton.gf +++ /dev/null @@ -1,59 +0,0 @@ -abstract QueryProton = Query ** { - -fun - QCalled : Individual -> Query ; -- how is X (also | otherwise) (called | named | known) ; - - NLoc : Loc -> Name ; - NOrg : Org -> Name ; - NPers : Pers -> Name ; - - IName : Name -> Individual ; - ACalled : [Individual] -> Activity ; - --- the test lexicon - -cat - JobTitle ; -fun - Located : Loc -> Property ; - Employed : Org -> Property ; - - Work : Org -> Activity ; - HaveTitle : JobTitle -> Activity ; - HaveTitleOrg : JobTitle -> Org -> Activity ; - - Organization : Kind ; - Place : Kind ; - Person : Kind ; - - Location : Relation ; - Region : Relation ; - Subregion : Relation ; - - RName : Relation ; - RNickname : Relation ; - --- JobTitles - JobTitle1 : JobTitle ; - JobTitle2 : JobTitle ; - JobTitle3 : JobTitle ; - JobTitle4 : JobTitle ; - --- Locations - Location1 : Loc ; - Location2 : Loc ; - Location3 : Loc ; - Location4 : Loc ; - --- Organizations - Organization1 : Org ; - Organization2 : Org ; - Organization3 : Org ; - Organization4 : Org ; - --- Persons - Person1 : Pers ; - Person2 : Pers ; - Person3 : Pers ; - Person4 : Pers ; -}
\ No newline at end of file diff --git a/examples/query/small/tests.gfs b/examples/query/small/tests.gfs deleted file mode 100644 index 3c80fc99b..000000000 --- a/examples/query/small/tests.gfs +++ /dev/null @@ -1,36 +0,0 @@ -l -treebank MQuery (QSet (SAll Person)) -l -treebank MQuery (QSet (SAll (KRel Location))) -l -treebank MQuery (QSet (SAll Organization)) -l -treebank MQuery (QInfo (SInd (IName (NOrg Organization1)))) -l -treebank MQuery (QInfo (SInd (IName (NPers Person1)))) -l -treebank MQuery (QInfo (SInd (IName (NLoc Location1)))) -l -treebank MQuery (QSet (SInd (IName (NOrg Organization1)))) -l -treebank MQuery (QSet (SInd (IName (NPers Person1)))) -l -treebank MQuery (QSet (SInd (IName (NLoc Location1)))) -l -treebank MQuery (QInfo (SAll Person)) -l -treebank MQuery (QInfo (SAll (KRel Location))) -l -treebank MQuery (QInfo (SAll Organization)) -l -treebank MQuery (QSet (SAll (KRelSet Subregion (SAll (KRel Location))))) -l -treebank MQuery (QSet (SAll (KRelKind (KRel Location) Subregion (SOther (KRel Location))))) -l -treebank MQuery (QSet (SAll (KRelSet Subregion (SInd (IName (NLoc Location1)))))) -l -treebank MQuery (QSet (SPlural (KProp (Located Location1) Organization))) -l -treebank MQuery (QSet (SPlural (KProp (Located Location1) Person))) -l -treebank MQuery (QSet (SPlural (KProp (Located Location1) (KRel Location)))) -l -treebank MQuery (QWhere (SInd (IName (NLoc Location1)))) -l -treebank MQuery (QWhere (SInd (IName (NOrg Organization1)))) -l -treebank MQuery (QWhere (SInd (IName (NPers Person1)))) -l -treebank MQuery (QSet (SAll (KRelPair Organization Location))) -l -treebank MQuery (QWhere (SAll Organization)) -l -treebank MQuery (QWhere (SAll Person)) -l -treebank MQuery (QWhere (SAll (KRel Location))) -l -treebank MQuery (QSet (SPlural (KRelPair (KRel Region) Subregion))) -l -treebank MQuery (QSet (SAll (KAct (HaveTitleOrg JobTitle1 Organization1) Person))) --- -l -treebank MQuery (QSet (SAll (KAct (Work Organization1) Person))) -l -treebank MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NPers Person1)))))) -l -treebank MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NLoc Location1)))))) -l -treebank MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NOrg Organization1)))))) -l -treebank MQuery (QCalled (IName (NPers Person1))) -l -treebank MQuery (QCalled (IName (NLoc Location1))) -l -treebank MQuery (QCalled (IName (NOrg Organization1))) -l -treebank MQuery (QSet (SAll (KAct (HaveTitle JobTitle1) Person))) --- - diff --git a/examples/query/small/treebank.txt b/examples/query/small/treebank.txt deleted file mode 100644 index 028a667bf..000000000 --- a/examples/query/small/treebank.txt +++ /dev/null @@ -1,299 +0,0 @@ -Query: MQuery (QSet (SAll Person)) -QueryEng: give me all people -QueryFin: näytä kaikki henkilöt -QueryFre: montrer toutes les personnes -QueryGer: zeigen Sie alle Personen -QueryIta: mostrare tutte le persone -QuerySwe: ge mig alla personer - - -Query: MQuery (QSet (SAll (KRel Location))) -QueryEng: give me all locations -QueryFin: näytä kaikki sijainnit -QueryFre: montrer toutes les positions -QueryGer: zeigen Sie alle Lagen -QueryIta: mostrare tutte le posizioni -QuerySwe: ge mig alla lägen - - -Query: MQuery (QSet (SAll Organization)) -QueryEng: give me all organizations -QueryFin: näytä kaikki organisaatiot -QueryFre: montrer toutes les organisations -QueryGer: zeigen Sie alle Organisationen -QueryIta: mostrare tutte le organizzazioni -QuerySwe: ge mig alla organisationer - - -Query: MQuery (QInfo (SInd (IName (NOrg Organization1)))) -QueryEng: give me all information about 'Organization1 -QueryFin: anna kaikki tiedot organisaatiosta 'Organization1 -QueryFre: montrer toutes les informations sur 'Organization1 -QueryGer: zeigen Sie alle Informationen über 'Organization1 -QueryIta: mostrare tutte le informazioni su 'Organization1 -QuerySwe: ge mig all information om 'Organization1 - - -Query: MQuery (QInfo (SInd (IName (NPers Person1)))) -QueryEng: give me all information about 'Person1 -QueryFin: anna kaikki tiedot henkilöstä 'Person1 -QueryFre: montrer toutes les informations sur 'Person1 -QueryGer: zeigen Sie alle Informationen über 'Person1 -QueryIta: mostrare tutte le informazioni su 'Person1 -QuerySwe: ge mig all information om 'Person1 - - -Query: MQuery (QInfo (SInd (IName (NLoc Location1)))) -QueryEng: give me all information about 'Location1 -QueryFin: anna kaikki tiedot paikasta 'Location1 -QueryFre: montrer toutes les informations sur 'Location1 -QueryGer: zeigen Sie alle Informationen über 'Location1 -QueryIta: mostrare tutte le informazioni su 'Location1 -QuerySwe: ge mig all information om 'Location1 - - -Query: MQuery (QSet (SInd (IName (NOrg Organization1)))) -QueryEng: give me 'Organization1 -QueryFin: näytä organisaatio 'Organization1 -QueryFre: montrer 'Organization1 -QueryGer: zeigen Sie 'Organization1 -QueryIta: mostrare 'Organization1 -QuerySwe: ge mig 'Organization1 - - -Query: MQuery (QSet (SInd (IName (NPers Person1)))) -QueryEng: give me 'Person1 -QueryFin: näytä henkilö 'Person1 -QueryFre: montrer 'Person1 -QueryGer: zeigen Sie 'Person1 -QueryIta: mostrare 'Person1 -QuerySwe: ge mig 'Person1 - - -Query: MQuery (QSet (SInd (IName (NLoc Location1)))) -QueryEng: give me 'Location1 -QueryFin: näytä paikka 'Location1 -QueryFre: montrer 'Location1 -QueryGer: zeigen Sie 'Location1 -QueryIta: mostrare 'Location1 -QuerySwe: ge mig 'Location1 - - -Query: MQuery (QInfo (SAll Person)) -QueryEng: give me all information about all people -QueryFin: anna kaikki tiedot kaikista henkilöistä -QueryFre: montrer toutes les informations sur toutes les personnes -QueryGer: zeigen Sie alle Informationen über alle Personen -QueryIta: mostrare tutte le informazioni su tutte le persone -QuerySwe: ge mig all information om alla personer - - -Query: MQuery (QInfo (SAll (KRel Location))) -QueryEng: give me all information about all locations -QueryFin: anna kaikki tiedot kaikista sijainneista -QueryFre: montrer toutes les informations sur toutes les positions -QueryGer: zeigen Sie alle Informationen über alle Lagen -QueryIta: mostrare tutte le informazioni su tutte le posizioni -QuerySwe: ge mig all information om alla lägen - - -Query: MQuery (QInfo (SAll Organization)) -QueryEng: give me all information about all organizations -QueryFin: anna kaikki tiedot kaikista organisaatioista -QueryFre: montrer toutes les informations sur toutes les organisations -QueryGer: zeigen Sie alle Informationen über alle Organisationen -QueryIta: mostrare tutte le informazioni su tutte le organizzazioni -QuerySwe: ge mig all information om alla organisationer - - -Query: MQuery (QSet (SAll (KRelSet Subregion (SAll (KRel Location))))) -QueryEng: give me all subregions of all locations -QueryFin: näytä kaikki kaikkien sijaintien osat -QueryFre: montrer toutes les sous-régions de toutes les positions -QueryGer: zeigen Sie alle Teilbereiche von allen Lagen -QueryIta: mostrare tutte le sottoregioni di tutte le posizioni -QuerySwe: ge mig alla delregioner i alla lägen - - -Query: MQuery (QSet (SAll (KRelKind (KRel Location) Subregion (SOther (KRel Location))))) -QueryEng: give me all locations that are subregions of other locations -QueryFin: näytä kaikki sijainnit jotka ovat muiden sijaintien osia -QueryFre: montrer toutes les positions qui sont des sous-régions d' autres positions -QueryGer: zeigen Sie alle Lagen die Teilbereiche von anderen Lagen sind -QueryIta: mostrare tutte le posizioni che sono sottoregioni di altre posizioni -QuerySwe: ge mig alla lägen som är delregioner i andra lägen - - -Query: MQuery (QSet (SAll (KRelSet Subregion (SInd (IName (NLoc Location1)))))) -QueryEng: give me all subregions of 'Location1 -QueryFin: näytä kaikki paikan 'Location1 osat -QueryFre: montrer toutes les sous-régions de 'Location1 -QueryGer: zeigen Sie alle Teilbereiche von 'Location1 -QueryIta: mostrare tutte le sottoregioni di 'Location1 -QuerySwe: ge mig alla delregioner i 'Location1 - - -Query: MQuery (QSet (SPlural (KProp (Located Location1) Organization))) -QueryEng: give me organizations located in 'Location1 -QueryFin: näytä paikassa 'Location1 sijaitsevia organisaatioita -QueryFre: montrer des organisations situées dans 'Location1 -QueryGer: zeigen Sie in 'Location1 situierte Organisationen -QueryIta: mostrare organizzazioni situate in 'Location1 -QuerySwe: ge mig organisationer belägna i 'Location1 - - -Query: MQuery (QSet (SPlural (KProp (Located Location1) Person))) -QueryEng: give me people located in 'Location1 -QueryFin: näytä paikassa 'Location1 sijaitsevia henkilöitä -QueryFre: montrer des personnes situées dans 'Location1 -QueryGer: zeigen Sie in 'Location1 situierte Personen -QueryIta: mostrare persone situate in 'Location1 -QuerySwe: ge mig personer belägna i 'Location1 - - -Query: MQuery (QSet (SPlural (KProp (Located Location1) (KRel Location)))) -QueryEng: give me locations located in 'Location1 -QueryFin: näytä paikassa 'Location1 sijaitsevia sijainteja -QueryFre: montrer des positions situées dans 'Location1 -QueryGer: zeigen Sie in 'Location1 situierte Lagen -QueryIta: mostrare posizioni situate in 'Location1 -QuerySwe: ge mig lägen belägna i 'Location1 - - -Query: MQuery (QWhere (SInd (IName (NLoc Location1)))) -QueryEng: where is 'Location1 -QueryFin: missä on paikka 'Location1 -QueryFre: où est 'Location1 -QueryGer: wo ist 'Location1 -QueryIta: dove è 'Location1 -QuerySwe: var är 'Location1 - - -Query: MQuery (QWhere (SInd (IName (NOrg Organization1)))) -QueryEng: where is 'Organization1 -QueryFin: missä on organisaatio 'Organization1 -QueryFre: où est 'Organization1 -QueryGer: wo ist 'Organization1 -QueryIta: dove è 'Organization1 -QuerySwe: var är 'Organization1 - - -Query: MQuery (QWhere (SInd (IName (NPers Person1)))) -QueryEng: where is 'Person1 -QueryFin: missä on henkilö 'Person1 -QueryFre: où est 'Person1 -QueryGer: wo ist 'Person1 -QueryIta: dove è 'Person1 -QuerySwe: var är 'Person1 - - -Query: MQuery (QSet (SAll (KRelPair Organization Location))) -QueryEng: give me all organizations with their locations -QueryFin: näytä kaikki organisaatiot ja näiden sijainnit -QueryFre: montrer toutes les organisations avec leurs positions -QueryGer: zeigen Sie alle Organisationen mit ihren Lagen -QueryIta: mostrare tutte le organizzazioni colle loro posizioni -QuerySwe: ge mig alla organisationer med deras lägen - - -Query: MQuery (QWhere (SAll Organization)) -QueryEng: where are all organizations -QueryFin: missä ovat kaikki organisaatiot -QueryFre: où sont toutes les organisations -QueryGer: wo sind alle Organisationen -QueryIta: dove sono tutte le organizzazioni -QuerySwe: var är alla organisationer - - -Query: MQuery (QWhere (SAll Person)) -QueryEng: where are all people -QueryFin: missä ovat kaikki henkilöt -QueryFre: où sont toutes les personnes -QueryGer: wo sind alle Personen -QueryIta: dove sono tutte le persone -QuerySwe: var är alla personer - - -Query: MQuery (QWhere (SAll (KRel Location))) -QueryEng: where are all locations -QueryFin: missä ovat kaikki sijainnit -QueryFre: où sont toutes les positions -QueryGer: wo sind alle Lagen -QueryIta: dove sono tutte le posizioni -QuerySwe: var är alla lägen - - -Query: MQuery (QSet (SPlural (KRelPair (KRel Region) Subregion))) -QueryEng: give me regions with their subregions -QueryFin: näytä alueita ja näiden osia -QueryFre: montrer des régions avec leurs sous-régions -QueryGer: zeigen Sie Regionen mit ihren Teilbereichen -QueryIta: mostrare regioni colle loro sottoregioni -QuerySwe: ge mig regioner med deras delregioner - - -command not parsed -Query: MQuery (QSet (SAll (KAct (Work Organization1) Person))) -QueryEng: give me all people that work at 'Organization1 -QueryFin: näytä kaikki henkilöt jotka työskentelevät organisaatiossa 'Organization1 -QueryFre: montrer toutes les personnes qui travaillent chez 'Organization1 -QueryGer: zeigen Sie alle Personen die bei 'Organization1 arbeiten -QueryIta: mostrare tutte le persone che lavorano presso 'Organization1 -QuerySwe: ge mig alla personer som jobbar på 'Organization1 - - -Query: MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NPers Person1)))))) -QueryEng: give me all nicknames of 'Person1 -QueryFin: näytä kaikki henkilön 'Person1 lisänimet -QueryFre: montrer tous les surnoms de 'Person1 -QueryGer: zeigen Sie alle Spitznamen von 'Person1 -QueryIta: mostrare tutti i soprannomi di 'Person1 -QuerySwe: ge mig alla tilläggsnamn på 'Person1 - - -Query: MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NLoc Location1)))))) -QueryEng: give me all nicknames of 'Location1 -QueryFin: näytä kaikki paikan 'Location1 lisänimet -QueryFre: montrer tous les surnoms de 'Location1 -QueryGer: zeigen Sie alle Spitznamen von 'Location1 -QueryIta: mostrare tutti i soprannomi di 'Location1 -QuerySwe: ge mig alla tilläggsnamn på 'Location1 - - -Query: MQuery (QSet (SAll (KRelSet RNickname (SInd (IName (NOrg Organization1)))))) -QueryEng: give me all nicknames of 'Organization1 -QueryFin: näytä kaikki organisaation 'Organization1 lisänimet -QueryFre: montrer tous les surnoms de 'Organization1 -QueryGer: zeigen Sie alle Spitznamen von 'Organization1 -QueryIta: mostrare tutti i soprannomi di 'Organization1 -QuerySwe: ge mig alla tilläggsnamn på 'Organization1 - - -Query: MQuery (QCalled (IName (NPers Person1))) -QueryEng: how is 'Person1 also called -QueryFin: mikä on henkilön 'Person1 toinen nimi -QueryFre: quel autre nom a 'Person1 -QueryGer: welchen anderen Namen hat 'Person1 -QueryIta: quale altro nome ha 'Person1 -QuerySwe: vilket annat namn har 'Person1 - - -Query: MQuery (QCalled (IName (NLoc Location1))) -QueryEng: how is 'Location1 also called -QueryFin: mikä on paikan 'Location1 toinen nimi -QueryFre: quel autre nom a 'Location1 -QueryGer: welchen anderen Namen hat 'Location1 -QueryIta: quale altro nome ha 'Location1 -QuerySwe: vilket annat namn har 'Location1 - - -Query: MQuery (QCalled (IName (NOrg Organization1))) -QueryEng: how is 'Organization1 also called -QueryFin: mikä on organisaation 'Organization1 toinen nimi -QueryFre: quel autre nom a 'Organization1 -QueryGer: welchen anderen Namen hat 'Organization1 -QueryIta: quale altro nome ha 'Organization1 -QuerySwe: vilket annat namn har 'Organization1 - - -command not parsed |
