summaryrefslogtreecommitdiff
path: root/examples/computer
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2012-09-12 14:04:39 +0000
committeraarne <aarne@chalmers.se>2012-09-12 14:04:39 +0000
commit560bc7d38e20ccf1f26119e88e5acd8d5c9f314d (patch)
tree3ba413d0000d031bd5ccf1ce611fefabbbde5cdb /examples/computer
parentacb3fa961e6a9e548addabf34796f7645832c884 (diff)
example with computer terminology from the Wikipedia
Diffstat (limited to 'examples/computer')
-rw-r--r--examples/computer/Computer.gf148
-rw-r--r--examples/computer/ComputerEng.gf153
-rw-r--r--examples/computer/ComputerFin.gf153
-rw-r--r--examples/computer/ComputerSwe.gf153
-rw-r--r--examples/computer/Dator.gf53
-rw-r--r--examples/computer/DatorEng.gf54
-rw-r--r--examples/computer/DatorFin.gf54
-rw-r--r--examples/computer/DatorSwe.gf57
8 files changed, 825 insertions, 0 deletions
diff --git a/examples/computer/Computer.gf b/examples/computer/Computer.gf
new file mode 100644
index 000000000..5138b09b7
--- /dev/null
+++ b/examples/computer/Computer.gf
@@ -0,0 +1,148 @@
+abstract Computer = Dator, Numeral, Grammar [
+
+-- the "mini" resource of GF book, chapter 9
+
+-- cat
+ S, -- sentence
+ Cl, -- clause
+ NP, -- noun phrase
+ VP, -- verb phrase
+ AP, -- adjectival phrase
+ CN, -- common noun
+ Det, -- determiner
+ N, -- noun
+ A, -- adjective
+ V, -- verb (one-place, intransitive)
+ V2, -- two-place verb (two-place, transitive or prepositional)
+ AdA, -- ad-adjective
+ Tense, -- tense
+ Pol, -- polarity
+ Conj, -- conjunction
+ Pron,
+ Numeral,
+
+-- fun
+ UseCl , -- Tense -> Pol -> Cl -> S,
+ PredVP , -- NP -> VP -> Cl,
+--- ComplV2, -- V2 -> NP -> VP,
+ DetCN , -- Det -> CN -> NP,
+ UsePron,
+--- ModCN , -- AP -> CN -> CN,
+
+--- CompAP , -- AP -> VP,
+ AdAP , -- AdA -> AP -> AP,
+
+--- ConjS , -- Conj -> S -> S -> S,
+--- ConjAP , -- Conj -> AP -> AP -> AP,
+--- ConjNP , -- Conj -> NP -> NP -> NP,
+
+ UseV , -- V -> VP,
+ UseN , -- N -> CN,
+ PositA, -- A -> AP,
+
+--- a_Det, the_Det,
+ every_Det, -- Det,
+--- this_Det, these_Det, -- Det,
+--- that_Det, those_Det, -- Det,
+--- i_NP, youSg_NP, he_NP, she_NP, we_NP, youPl_NP, they_NP, -- NP,
+ very_AdA, -- AdA,
+
+ TTAnt, -- Tense -> Ant -> Temp ;
+ PPos, PNeg, -- Pol,
+ TPres, TPast, TFut, TCond, -- Tense,
+ ASimul, AAnter,
+
+ and_Conj, or_Conj, -- Conj,
+
+-- extension of the mini grammar
+
+-- cat
+ Utt, -- utterance (sentence or question) e.g. "does she walk"
+ QS, -- question (fixed tense) e.g. "who doesn't walk"
+ QCl, -- question clause (variable tense) e.g. "who walks"
+ ClSlash, -- clause missing noun phrase e.g. "she walks with"
+ Adv, -- adverb e.g. "here"
+ Prep, -- preposition (and/or case) e.g. "with"
+ VS, -- sentence-complement verb e.g. "know"
+ VQ, -- question-complement verb e.g. "wonder"
+ VV, -- verb-phrase-complement verb e.g. "want"
+ IP, -- interrogative pronoun e.g. "who"
+ PN, -- proper name e.g. "John"
+ Subj, -- subjunction e.g. "because"
+ IAdv, -- interrogative adverb e.g. "why"
+
+ ListAP,
+ ListNP,
+ ListS,
+ Temp,
+ Comp,
+ Ant,
+ Imp,
+
+-- fun
+ UttS , -- S -> Utt,
+ UttQS, -- QS -> Utt,
+
+ UseQCl, -- Tense -> Pol -> QCl -> QS,
+
+ QuestCl , -- Cl -> QCl, -- does she walk
+ QuestVP , -- IP -> VP -> QCl, -- who walks
+ QuestSlash, -- IP -> ClSlash -> QCl, -- who does she walk with
+ QuestIAdv , -- IAdv -> Cl -> QCl, -- why does she walk
+
+ SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run
+
+ PrepNP , -- Prep -> NP -> Adv, -- in the house
+
+ ComplVS, -- VS -> S -> VP, -- know that she walks
+ ComplVQ, -- VQ -> QS -> VP, -- wonder who walks
+ ComplVV, -- VV -> VP -> VP, -- want to walk
+
+--- SlashV2 , -- NP -> V2 -> ClSlash, -- she loves
+--- SlashPrep, -- Cl -> Prep -> ClSlash, -- she walks with
+
+ AdvVP, -- VP -> Adv -> VP, -- walk in the city
+
+ UsePN, -- PN -> NP, -- John
+--- AdvNP, -- NP -> Adv -> NP, -- the man in the city
+
+ whoSg_IP , -- IP,
+ here_Adv, -- Adv,
+ by_Prep, in_Prep, of_Prep, with_Prep, -- Prep,
+ can_VV, must_VV, want_VV, -- VV,
+ although_Subj, because_Subj, when_Subj, if_Subj, -- Subj,
+ when_IAdv, where_IAdv, why_IAdv-- IAdv,
+
+] ** {
+
+flags startcat = Text ;
+
+
+-- functions with different type
+
+fun
+ TextS : S -> Text ; -- with .
+ TextQS : QS -> Text ; -- with ?
+ TextImp : VP -> Text ; -- with !
+
+ ComplV2 : V2 -> NP -> VP ;
+ ModCN : AP -> CN -> CN ;
+ CompAP : AP -> VP ;
+ ConjS : Conj -> S -> S -> S ;
+ ConjAP : Conj -> AP -> AP -> AP ;
+ ConjNP : Conj -> NP -> NP -> NP ;
+ a_Det, the_Det, aPl_Det, thePl_Det : Det ;
+ this_Det, these_Det : Det ;
+ that_Det, those_Det : Det ;
+ possDet : Pron -> Det ;
+ numeralDet : Numeral -> Det ;
+ i_Pron, youSg_Pron, he_Pron, she_Pron, we_Pron, youPl_Pron, they_Pron : Pron ;
+ SubjS : Subj -> S -> S -> S ; -- if she walks we run
+ CompAdv : Prep -> NP -> VP ; -- be in the house
+ SlashV2 : NP -> V2 -> ClSlash ; -- she loves
+ SlashPrep : Cl -> Prep -> ClSlash ; -- she walks with
+ AdvCN : CN -> Prep -> NP -> CN ; -- man in the city
+
+
+}
+
diff --git a/examples/computer/ComputerEng.gf b/examples/computer/ComputerEng.gf
new file mode 100644
index 000000000..8f805aa68
--- /dev/null
+++ b/examples/computer/ComputerEng.gf
@@ -0,0 +1,153 @@
+--# -path=.:alltenses
+
+concrete ComputerEng of Computer = DatorEng, NumeralEng, GrammarEng [
+
+-- used to be the "mini" resource of GF book, chapter 9, but now larger
+
+-- cat
+ S, -- sentence
+ Cl, -- clause
+ NP, -- noun phrase
+ VP, -- verb phrase
+ AP, -- adjectival phrase
+ CN, -- common noun
+ Det, -- determiner
+ N, -- noun
+ A, -- adjective
+ V, -- verb (one-place, intransitive)
+ V2, -- two-place verb (two-place, transitive or prepositional)
+ AdA, -- ad-adjective
+ Tense, -- tense
+ Pol, -- polarity
+ Conj, -- conjunction
+
+ Pron, -- pronoun
+ Numeral,
+
+-- fun
+ UseCl , -- Tense -> Pol -> Cl -> S,
+ PredVP , -- NP -> VP -> Cl,
+--- ComplV2, -- V2 -> NP -> VP,
+ DetCN , -- Det -> CN -> NP,
+ UsePron,
+--- ModCN , -- AP -> CN -> CN,
+
+--- CompAP , -- AP -> VP,
+ AdAP , -- AdA -> AP -> AP,
+
+--- ConjS , -- Conj -> S -> S -> S,
+--- ConjAP , -- Conj -> AP -> AP -> AP,
+--- ConjNP , -- Conj -> NP -> NP -> NP,
+
+ UseV , -- V -> VP,
+ UseN , -- N -> CN,
+ PositA, -- A -> AP,
+
+--- a_Det, the_Det,
+ every_Det, -- Det,
+--- this_Det, these_Det, -- Det,
+--- that_Det, those_Det, -- Det,
+ i_Pron, youSg_Pron, he_Pron, she_Pron, we_Pron, youPl_Pron, they_Pron, -- NP,
+ very_AdA, -- AdA,
+
+ TTAnt, -- Tense -> Ant -> Temp ;
+ PPos, PNeg, -- Pol,
+ TPres, TPast, TFut, TCond, -- Tense,
+ STense, SCond, SFut, SPast, SPres, -- scand tense
+ ASimul, AAnter,
+
+ and_Conj, or_Conj, -- Conj,
+
+-- extension of the mini grammar
+
+-- cat
+ Text, -- text (with punctuation) e.g. "Who knows it?"
+ Utt, -- utterance (sentence or question) e.g. "does she walk"
+ QS, -- question (fixed tense) e.g. "who doesn't walk"
+ QCl, -- question clause (variable tense) e.g. "who walks"
+ ClSlash, -- clause missing noun phrase e.g. "she walks with"
+ Adv, -- adverb e.g. "here"
+ Prep, -- preposition (and/or case) e.g. "with"
+ VS, -- sentence-complement verb e.g. "know"
+ VQ, -- question-complement verb e.g. "wonder"
+ VV, -- verb-phrase-complement verb e.g. "want"
+ IP, -- interrogative pronoun e.g. "who"
+ PN, -- proper name e.g. "John"
+ Subj, -- subjunction e.g. "because"
+ IAdv, -- interrogative adverb e.g. "why"
+
+ ListAP,
+ ListNP,
+ ListS,
+ Temp,
+ Comp,
+ Ant,
+
+ Imp, Bool, True, False, Voc,
+
+-- fun
+
+ UttS , -- S -> Utt,
+ UttQS, -- QS -> Utt,
+
+ UseQCl, -- Tense -> Pol -> QCl -> QS,
+
+ QuestCl , -- Cl -> QCl, -- does she walk
+ QuestVP , -- IP -> VP -> QCl, -- who walks
+ QuestSlash, -- IP -> ClSlash -> QCl, -- who does she walk with
+ QuestIAdv , -- IAdv -> Cl -> QCl, -- why does she walk
+
+ SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run
+
+ PrepNP , -- Prep -> NP -> Adv, -- in the house
+
+ ComplVS, -- VS -> S -> VP, -- know that she walks
+ ComplVQ, -- VQ -> QS -> VP, -- wonder who walks
+ ComplVV, -- VV -> VP -> VP, -- want to walk
+
+--- SlashV2 , -- NP -> V2 -> ClSlash, -- she loves
+--- SlashPrep, -- Cl -> Prep -> ClSlash, -- she walks with
+
+ AdvVP, -- VP -> Adv -> VP, -- walk in the city
+
+ UsePN, -- PN -> NP, -- John
+--- AdvNP, -- NP -> Adv -> NP, -- the man in the city
+
+ whoSg_IP , -- IP,
+ here_Adv, -- Adv,
+ by_Prep, in_Prep, of_Prep, with_Prep, -- Prep,
+ can_VV, must_VV, want_VV, -- VV,
+ although_Subj, because_Subj, when_Subj, if_Subj, -- Subj,
+ when_IAdv, where_IAdv, why_IAdv-- IAdv,
+
+] ** open SyntaxEng, (S = SyntaxEng) in {
+
+-- functions with different type
+
+lin
+ TextS s = mkText (lin S s) ;
+ TextQS qs = mkText (lin QS qs) ;
+ TextImp vp = mkText (mkImp (lin VP vp)) ;
+
+ ComplV2 v np = mkVP v np ;
+ ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ;
+ CompAP ap = mkVP (lin AP ap) ;
+ ConjS co x y = mkS (lin Conj co) (lin S x) (lin S y) ;
+ ConjAP co x y = mkAP co x y ;
+ ConjNP co x y = mkNP co x y ;
+ a_Det = mkDet a_Quant ;
+ the_Det = mkDet the_Quant ;
+ aPl_Det = mkDet a_Quant plNum ;
+ thePl_Det = mkDet the_Quant plNum ;
+ this_Det = S.this_Det ;
+ these_Det = S.these_Det ;
+ that_Det = S.that_Det ;
+ those_Det = S.those_Det ;
+ possDet p = S.mkDet <p : Pron> ;
+ numeralDet n = S.mkDet <n : Numeral> ;
+ SubjS subj a b = mkS (S.mkAdv <subj : Subj> <a : S>) b ;
+ CompAdv p pp = mkVP (S.mkAdv <p : Prep> <pp : NP>) ;
+ SlashV2 np v2 = mkClSlash np v2 ;
+ SlashPrep cl p = mkClSlash (lin Cl cl) <p : Prep> ;
+ AdvCN cn p pp = mkCN <lin CN cn : CN> (mkAdv <p : Prep> <pp : NP>) ;
+}
diff --git a/examples/computer/ComputerFin.gf b/examples/computer/ComputerFin.gf
new file mode 100644
index 000000000..01d6fdbd1
--- /dev/null
+++ b/examples/computer/ComputerFin.gf
@@ -0,0 +1,153 @@
+--# -path=.:alltenses
+
+concrete ComputerFin of Computer = DatorFin, NumeralFin, GrammarFin [
+
+-- used to be the "mini" resource of GF book, chapter 9, but now larger
+
+-- cat
+ S, -- sentence
+ Cl, -- clause
+ NP, -- noun phrase
+ VP, -- verb phrase
+ AP, -- adjectival phrase
+ CN, -- common noun
+ Det, -- determiner
+ N, -- noun
+ A, -- adjective
+ V, -- verb (one-place, intransitive)
+ V2, -- two-place verb (two-place, transitive or prepositional)
+ AdA, -- ad-adjective
+ Tense, -- tense
+ Pol, -- polarity
+ Conj, -- conjunction
+
+ Pron, -- pronoun
+ Numeral,
+
+-- fun
+ UseCl , -- Tense -> Pol -> Cl -> S,
+ PredVP , -- NP -> VP -> Cl,
+--- ComplV2, -- V2 -> NP -> VP,
+ DetCN , -- Det -> CN -> NP,
+ UsePron,
+--- ModCN , -- AP -> CN -> CN,
+
+--- CompAP , -- AP -> VP,
+ AdAP , -- AdA -> AP -> AP,
+
+--- ConjS , -- Conj -> S -> S -> S,
+--- ConjAP , -- Conj -> AP -> AP -> AP,
+--- ConjNP , -- Conj -> NP -> NP -> NP,
+
+ UseV , -- V -> VP,
+ UseN , -- N -> CN,
+ PositA, -- A -> AP,
+
+--- a_Det, the_Det,
+ every_Det, -- Det,
+--- this_Det, these_Det, -- Det,
+--- that_Det, those_Det, -- Det,
+ i_Pron, youSg_Pron, he_Pron, she_Pron, we_Pron, youPl_Pron, they_Pron, -- NP,
+ very_AdA, -- AdA,
+
+ TTAnt, -- Tense -> Ant -> Temp ;
+ PPos, PNeg, -- Pol,
+ TPres, TPast, TFut, TCond, -- Tense,
+ STense, SCond, SFut, SPast, SPres, -- scand tense
+ ASimul, AAnter,
+
+ and_Conj, or_Conj, -- Conj,
+
+-- extension of the mini grammar
+
+-- cat
+ Text, -- text (with punctuation) e.g. "Who knows it?"
+ Utt, -- utterance (sentence or question) e.g. "does she walk"
+ QS, -- question (fixed tense) e.g. "who doesn't walk"
+ QCl, -- question clause (variable tense) e.g. "who walks"
+ ClSlash, -- clause missing noun phrase e.g. "she walks with"
+ Adv, -- adverb e.g. "here"
+ Prep, -- preposition (and/or case) e.g. "with"
+ VS, -- sentence-complement verb e.g. "know"
+ VQ, -- question-complement verb e.g. "wonder"
+ VV, -- verb-phrase-complement verb e.g. "want"
+ IP, -- interrogative pronoun e.g. "who"
+ PN, -- proper name e.g. "John"
+ Subj, -- subjunction e.g. "because"
+ IAdv, -- interrogative adverb e.g. "why"
+
+ ListAP,
+ ListNP,
+ ListS,
+ Temp,
+ Comp,
+ Ant,
+
+ Imp, Bool, True, False, Voc,
+
+-- fun
+
+ UttS , -- S -> Utt,
+ UttQS, -- QS -> Utt,
+
+ UseQCl, -- Tense -> Pol -> QCl -> QS,
+
+ QuestCl , -- Cl -> QCl, -- does she walk
+ QuestVP , -- IP -> VP -> QCl, -- who walks
+ QuestSlash, -- IP -> ClSlash -> QCl, -- who does she walk with
+ QuestIAdv , -- IAdv -> Cl -> QCl, -- why does she walk
+
+ SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run
+
+ PrepNP , -- Prep -> NP -> Adv, -- in the house
+
+ ComplVS, -- VS -> S -> VP, -- know that she walks
+ ComplVQ, -- VQ -> QS -> VP, -- wonder who walks
+ ComplVV, -- VV -> VP -> VP, -- want to walk
+
+--- SlashV2 , -- NP -> V2 -> ClSlash, -- she loves
+--- SlashPrep, -- Cl -> Prep -> ClSlash, -- she walks with
+
+ AdvVP, -- VP -> Adv -> VP, -- walk in the city
+
+ UsePN, -- PN -> NP, -- John
+--- AdvNP, -- NP -> Adv -> NP, -- the man in the city
+
+ whoSg_IP , -- IP,
+ here_Adv, -- Adv,
+ by_Prep, in_Prep, of_Prep, with_Prep, -- Prep,
+ can_VV, must_VV, want_VV, -- VV,
+ although_Subj, because_Subj, when_Subj, if_Subj, -- Subj,
+ when_IAdv, where_IAdv, why_IAdv-- IAdv,
+
+] ** open SyntaxFin, (S = SyntaxFin) in {
+
+-- functions with different type
+
+lin
+ TextS s = mkText (lin S s) ;
+ TextQS qs = mkText (lin QS qs) ;
+ TextImp vp = mkText (mkImp (lin VP vp)) ;
+
+ ComplV2 v np = mkVP v np ;
+ ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ;
+ CompAP ap = mkVP (lin AP ap) ;
+ ConjS co x y = mkS (lin Conj co) (lin S x) (lin S y) ;
+ ConjAP co x y = mkAP co x y ;
+ ConjNP co x y = mkNP co x y ;
+ a_Det = mkDet a_Quant ;
+ the_Det = mkDet the_Quant ;
+ aPl_Det = mkDet a_Quant plNum ;
+ thePl_Det = mkDet the_Quant plNum ;
+ this_Det = S.this_Det ;
+ these_Det = S.these_Det ;
+ that_Det = S.that_Det ;
+ those_Det = S.those_Det ;
+ possDet p = S.mkDet <p : Pron> ;
+ numeralDet n = S.mkDet <n : Numeral> ;
+ SubjS subj a b = mkS (S.mkAdv <subj : Subj> <a : S>) b ;
+ CompAdv p pp = mkVP (S.mkAdv <p : Prep> <pp : NP>) ;
+ SlashV2 np v2 = mkClSlash np v2 ;
+ SlashPrep cl p = mkClSlash (lin Cl cl) <p : Prep> ;
+ AdvCN cn p pp = mkCN <lin CN cn : CN> (mkAdv <p : Prep> <pp : NP>) ;
+}
diff --git a/examples/computer/ComputerSwe.gf b/examples/computer/ComputerSwe.gf
new file mode 100644
index 000000000..90fb7c6a0
--- /dev/null
+++ b/examples/computer/ComputerSwe.gf
@@ -0,0 +1,153 @@
+--# -path=.:alltenses
+
+concrete ComputerSwe of Computer = DatorSwe, NumeralSwe, GrammarSwe [
+
+-- used to be the "mini" resource of GF book, chapter 9, but now larger
+
+-- cat
+ S, -- sentence
+ Cl, -- clause
+ NP, -- noun phrase
+ VP, -- verb phrase
+ AP, -- adjectival phrase
+ CN, -- common noun
+ Det, -- determiner
+ N, -- noun
+ A, -- adjective
+ V, -- verb (one-place, intransitive)
+ V2, -- two-place verb (two-place, transitive or prepositional)
+ AdA, -- ad-adjective
+ Tense, -- tense
+ Pol, -- polarity
+ Conj, -- conjunction
+
+ Pron, -- pronoun
+ Numeral,
+
+-- fun
+ UseCl , -- Tense -> Pol -> Cl -> S,
+ PredVP , -- NP -> VP -> Cl,
+--- ComplV2, -- V2 -> NP -> VP,
+ DetCN , -- Det -> CN -> NP,
+ UsePron,
+--- ModCN , -- AP -> CN -> CN,
+
+--- CompAP , -- AP -> VP,
+ AdAP , -- AdA -> AP -> AP,
+
+--- ConjS , -- Conj -> S -> S -> S,
+--- ConjAP , -- Conj -> AP -> AP -> AP,
+--- ConjNP , -- Conj -> NP -> NP -> NP,
+
+ UseV , -- V -> VP,
+ UseN , -- N -> CN,
+ PositA, -- A -> AP,
+
+--- a_Det, the_Det,
+ every_Det, -- Det,
+--- this_Det, these_Det, -- Det,
+--- that_Det, those_Det, -- Det,
+ i_Pron, youSg_Pron, he_Pron, she_Pron, we_Pron, youPl_Pron, they_Pron, -- NP,
+ very_AdA, -- AdA,
+
+ TTAnt, -- Tense -> Ant -> Temp ;
+ PPos, PNeg, -- Pol,
+ TPres, TPast, TFut, TCond, -- Tense,
+ STense, SCond, SFut, SPast, SPres, -- scand tense
+ ASimul, AAnter,
+
+ and_Conj, or_Conj, -- Conj,
+
+-- extension of the mini grammar
+
+-- cat
+ Text, -- text (with punctuation) e.g. "Who knows it?"
+ Utt, -- utterance (sentence or question) e.g. "does she walk"
+ QS, -- question (fixed tense) e.g. "who doesn't walk"
+ QCl, -- question clause (variable tense) e.g. "who walks"
+ ClSlash, -- clause missing noun phrase e.g. "she walks with"
+ Adv, -- adverb e.g. "here"
+ Prep, -- preposition (and/or case) e.g. "with"
+ VS, -- sentence-complement verb e.g. "know"
+ VQ, -- question-complement verb e.g. "wonder"
+ VV, -- verb-phrase-complement verb e.g. "want"
+ IP, -- interrogative pronoun e.g. "who"
+ PN, -- proper name e.g. "John"
+ Subj, -- subjunction e.g. "because"
+ IAdv, -- interrogative adverb e.g. "why"
+
+ ListAP,
+ ListNP,
+ ListS,
+ Temp,
+ Comp,
+ Ant,
+
+ Imp, Bool, True, False, Voc,
+
+-- fun
+
+ UttS , -- S -> Utt,
+ UttQS, -- QS -> Utt,
+
+ UseQCl, -- Tense -> Pol -> QCl -> QS,
+
+ QuestCl , -- Cl -> QCl, -- does she walk
+ QuestVP , -- IP -> VP -> QCl, -- who walks
+ QuestSlash, -- IP -> ClSlash -> QCl, -- who does she walk with
+ QuestIAdv , -- IAdv -> Cl -> QCl, -- why does she walk
+
+ SubjCl, -- Cl -> Subj -> S -> Cl, -- she walks because we run
+
+ PrepNP , -- Prep -> NP -> Adv, -- in the house
+
+ ComplVS, -- VS -> S -> VP, -- know that she walks
+ ComplVQ, -- VQ -> QS -> VP, -- wonder who walks
+ ComplVV, -- VV -> VP -> VP, -- want to walk
+
+--- SlashV2 , -- NP -> V2 -> ClSlash, -- she loves
+--- SlashPrep, -- Cl -> Prep -> ClSlash, -- she walks with
+
+ AdvVP, -- VP -> Adv -> VP, -- walk in the city
+
+ UsePN, -- PN -> NP, -- John
+--- AdvNP, -- NP -> Adv -> NP, -- the man in the city
+
+ whoSg_IP , -- IP,
+ here_Adv, -- Adv,
+ by_Prep, in_Prep, of_Prep, with_Prep, -- Prep,
+ can_VV, must_VV, want_VV, -- VV,
+ although_Subj, because_Subj, when_Subj, if_Subj, -- Subj,
+ when_IAdv, where_IAdv, why_IAdv-- IAdv,
+
+] ** open SyntaxSwe, (S = SyntaxSwe) in {
+
+-- functions with different type
+
+lin
+ TextS s = mkText (lin S s) ;
+ TextQS qs = mkText (lin QS qs) ;
+ TextImp vp = mkText (mkImp (lin VP vp)) ;
+
+ ComplV2 v np = mkVP v np ;
+ ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ;
+ CompAP ap = mkVP (lin AP ap) ;
+ ConjS co x y = mkS (lin Conj co) (lin S x) (lin S y) ;
+ ConjAP co x y = mkAP co x y ;
+ ConjNP co x y = mkNP co x y ;
+ a_Det = mkDet a_Quant ;
+ the_Det = mkDet the_Quant ;
+ aPl_Det = mkDet a_Quant plNum ;
+ thePl_Det = mkDet the_Quant plNum ;
+ this_Det = S.this_Det ;
+ these_Det = S.these_Det ;
+ that_Det = S.that_Det ;
+ those_Det = S.those_Det ;
+ possDet p = S.mkDet <p : Pron> ;
+ numeralDet n = S.mkDet <n : Numeral> ;
+ SubjS subj a b = mkS (S.mkAdv <subj : Subj> <a : S>) b ;
+ CompAdv p pp = mkVP (S.mkAdv <p : Prep> <pp : NP>) ;
+ SlashV2 np v2 = mkClSlash np v2 ;
+ SlashPrep cl p = mkClSlash (lin Cl cl) <p : Prep> ;
+ AdvCN cn p pp = mkCN <lin CN cn : CN> (mkAdv <p : Prep> <pp : NP>) ;
+}
diff --git a/examples/computer/Dator.gf b/examples/computer/Dator.gf
new file mode 100644
index 000000000..2f98d3b11
--- /dev/null
+++ b/examples/computer/Dator.gf
@@ -0,0 +1,53 @@
+abstract Dator = Cat ** {
+fun supercomputer_N : N ;
+fun computer_program_N : N ;
+fun vacuum_tube_N : N ;
+fun computer_data_storage_N : N ;
+fun surf_V : V ;
+fun work_V : V ;
+fun computer_monitor_N : N ;
+fun overheated_A : A ;
+fun hack_V : V ;
+fun hacker_N : N ;
+fun calcutor_N : N ;
+fun mathematics_N : N ;
+fun mathematician_N : N ;
+fun add_V : V ;
+fun home_computer_N : N ;
+fun computer_network_N : N ;
+fun mouse_N : N ;
+fun central_processing_unit_N : N ;
+fun computer_N : N ;
+fun program_V : V ;
+fun fast_A : A ;
+fun hard_drive_N : N ;
+fun computer_keyboard_N : N ;
+fun laptop_N : N ;
+fun computer_N : N ;
+fun software_N : N ;
+fun slow_A : A ;
+fun microcontroller_N : N ;
+fun dust_N : N ;
+fun machine_N : N ;
+fun electicity_N : N ;
+fun information_N : N ;
+fun message_N : N ;
+fun communication_N : N ;
+fun communicating_V : V ;
+fun tractor_N : N ;
+fun mechanical_calculator_N : N ;
+fun number_N : N ;
+fun home_computer_N : N ;
+fun power_supply_N : N ;
+fun system_N : N ;
+fun personal_digital_assistant_N : N ;
+fun webcam_N : N ;
+fun homepage_N : N ;
+fun knowledge_N : N ;
+fun printer_N : N ;
+fun relay_N : N ;
+fun graphics_N : N ;
+fun computer_data_storage_N : N ;
+fun mainframe_computer_N : N ;
+fun electrical_wiring_N : N ;
+} \ No newline at end of file
diff --git a/examples/computer/DatorEng.gf b/examples/computer/DatorEng.gf
new file mode 100644
index 000000000..fce5f2491
--- /dev/null
+++ b/examples/computer/DatorEng.gf
@@ -0,0 +1,54 @@
+concrete DatorEng of Dator = CatEng ** open ParadigmsEng in {
+lin supercomputer_N = mkN "supercomputer" ; --Eng
+lin computer_program_N = mkN "computer program" ; --Eng
+lin vacuum_tube_N = mkN "vacuum tube" ; --Eng
+lin computer_data_storage_N = mkN "computer data storage" ; --Eng
+lin surf_V = mkV "surf" ; --Eng
+lin work_V = mkV "work" ; --Eng
+lin computer_monitor_N = mkN "computer monitor" ; --Eng
+lin overheated_A = mkA "overheated" ; --Eng
+lin hack_V = mkV "hack" ; --Eng
+lin hacker_N = mkN "hacker" ; --Eng
+lin calcutor_N = mkN "calcutor" ; --Eng
+lin mathematics_N = mkN "mathematics" ; --Eng
+lin mathematician_N = mkN "mathematician" ; --Eng
+lin add_V = mkV "add" ; --Eng
+lin home_computer_N = mkN "home computer" ; --Eng
+lin computer_network_N = mkN "computer network" ; --Eng
+lin mouse_N = mkN "mouse" ; --Eng
+lin central_processing_unit_N = mkN "central processing unit" ; --Eng
+lin computer_N = mkN "computer" ; --Eng
+lin program_V = mkV "program" ; --Eng
+lin fast_A = mkA "fast" ; --Eng
+lin hard_drive_N = mkN "hard drive" ; --Eng
+lin computer_keyboard_N = mkN "computer keyboard" ; --Eng
+lin laptop_N = mkN "laptop" ; --Eng
+lin computer_N = mkN "computer" ; --Eng
+lin software_N = mkN "software" ; --Eng
+lin slow_A = mkA "slow" ; --Eng
+lin microcontroller_N = mkN "microcontroller" ; --Eng
+lin dust_N = mkN "dust" ; --Eng
+lin machine_N = mkN "machine" ; --Eng
+lin electicity_N = mkN "electicity" ; --Eng
+lin information_N = mkN "information" ; --Eng
+lin message_N = mkN "message" ; --Eng
+lin communication_N = mkN "communication" ; --Eng
+lin communicating_V = mkV "communicate" ; --Eng
+lin tractor_N = mkN "tractor" ; --Eng
+lin mechanical_calculator_N = mkN "mechanical calculator" ; --Eng
+lin number_N = mkN "number" ; --Eng
+lin home_computer_N = mkN "home computer" ; --Eng
+lin power_supply_N = mkN "power supply" ; --Eng
+lin system_N = mkN "system" ; --Eng
+lin personal_digital_assistant_N = mkN "personal digital assistant" ; --Eng
+lin webcam_N = mkN "webcam" ; --Eng
+lin homepage_N = mkN "homepage" ; --Eng
+lin knowledge_N = mkN "knowledge" ; --Eng
+lin printer_N = mkN "printer" ; --Eng
+lin relay_N = mkN "relay" ; --Eng
+lin graphics_N = mkN "graphics" ; --Eng
+lin computer_data_storage_N = mkN "computer data storage" ; --Eng
+lin mainframe_computer_N = mkN "mainframe computer" ; --Eng
+lin electrical_wiring_N = mkN "electrical wiring" ; --Eng
+
+} \ No newline at end of file
diff --git a/examples/computer/DatorFin.gf b/examples/computer/DatorFin.gf
new file mode 100644
index 000000000..a2f08c40a
--- /dev/null
+++ b/examples/computer/DatorFin.gf
@@ -0,0 +1,54 @@
+concrete DatorFin of Dator = CatFin ** open ParadigmsFin in {
+
+flags coding=utf8 ;
+
+lin supercomputer_N = mkN "supertietokone" ; --Fin
+lin computer_program_N = mkN "tietokoneohjelma" ; --Fin
+lin vacuum_tube_N = mkN "tyhjiö" (mkN "putki") ; --Fin
+lin computer_data_storage_N = mkN "muisti" ; --Fin
+lin surf_V = mkV "surfata" ; --Fin
+lin work_V = mkV "toimia" ; --Fin
+lin computer_monitor_N = mkN "näyttö" ; --Fin
+lin overheated_A = mkA "ylikuumentunut" ; --Fin
+lin hack_V = mkV "hakkeroida" ; --Fin
+lin hacker_N = mkN "hakkeri" ; --Fin
+lin calcutor_N = mkN "taskulaskin" ; --Fin
+lin mathematics_N = mkN "matematiikka" ; --Fin
+lin mathematician_N = mkN "matemaatikko" ; --Fin
+lin add_V = mkV "lisätä" ; --Fin
+lin home_computer_N = mkN "kotitietokone" ; --Fin
+lin computer_network_N = mkN "tietoverkko" ; --Fin
+lin mouse_N = mkN "hiiri" "hiiriä" ; --Fin
+lin central_processing_unit_N = mkN "suoritin" ; --Fin
+lin computer_N = mkN "tietokone" ; --Fin
+lin program_V = mkV "ohjelmoida" ; --Fin
+lin fast_A = mkA "nopea" ; --Fin
+lin hard_drive_N = mkN "kova" (mkN "levy") ; --Fin
+lin computer_keyboard_N = mkN "näppäimistö" ; --Fin
+lin laptop_N = mkN "sylimikro" ; --Fin
+lin software_N = mkN "ohjelmisto" ; --Fin
+lin slow_A = mkA "hidas" ; --Fin
+lin microcontroller_N = mkN "mikrokontrolleri" ; --Fin
+lin dust_N = mkN "pöly" ; --Fin
+lin machine_N = mkN "kone" ; --Fin
+lin electicity_N = mkN "sähkö" ; --Fin
+lin information_N = mkN "informaatio" ; --Fin
+lin message_N = mkN "viesti" ; --Fin
+lin communication_N = mkN "kommunikaatio" ; --Fin
+lin communicating_V = mkV "viestiä" ; --Fin
+lin tractor_N = mkN "traktori" ; --Fin
+lin mechanical_calculator_N = mkN "pöytälaskin" ; --Fin
+lin number_N = mkN "numero" ; --Fin
+lin power_supply_N = mkN "virta" (mkN "lähde") ; --Fin
+lin system_N = mkN "järjestelmä" ; --Fin
+lin personal_digital_assistant_N = mkN "kämmentietokone" ; --Fin
+lin webcam_N = mkN "verkkokamera" ; --Fin
+lin homepage_N = mkN "kotisivu" ; --Fin
+lin knowledge_N = mkN "tieto" ; --Fin
+lin printer_N = mkN "kirjoitin" ; --Fin
+lin relay_N = mkN "rele" ; --Fin
+lin graphics_N = mkN "grafiikka" ; --Fin
+lin mainframe_computer_N = mkN "keskustietokone" ; --Fin
+lin electrical_wiring_N = mkN "sähkö" (mkN "johto") ; --Fin
+
+} \ No newline at end of file
diff --git a/examples/computer/DatorSwe.gf b/examples/computer/DatorSwe.gf
new file mode 100644
index 000000000..f615d171f
--- /dev/null
+++ b/examples/computer/DatorSwe.gf
@@ -0,0 +1,57 @@
+concrete DatorSwe of Dator = CatSwe ** open ParadigmsSwe in {
+
+flags coding = utf8 ;
+
+lin supercomputer_N = mkN "superdator" "superdatorer" ; --Swe
+lin computer_program_N = mkN "dataprogram" "dataprogram" ; --Swe
+lin vacuum_tube_N = mkN "elektronrör" "elektronrör" ; --Swe
+lin computer_data_storage_N = mkN "datorminne" "datorminnen" ; --Swe
+lin surf_V = mkV "surfa" ; --Swe
+lin work_V = mkV "jobba" ; --Swe
+lin computer_monitor_N = mkN "bildskärm" ; --Swe
+lin overheated_A = mkA "överhettad" ; --Swe
+lin hack_V = mkV "hacka" ; --Swe
+lin hacker_N = mkN "hackare" "hackare" ; --Swe
+lin calcutor_N = mkN "miniräknare" "miniräknare" ; --Swe
+lin mathematics_N = mkN "matematik" "matematiker" ; --Swe
+lin mathematician_N = mkN "matematiker" "matematiker" ; --Swe
+lin add_V = mkV "addera" ; --Swe
+lin home_computer_N = mkN "hemdator" "hemdatorer" ; --Swe
+lin computer_network_N = mkN "datornätverk" "datornätverk" ; --Swe
+lin mouse_N = mkN "datormus" "datormusen" "datormöss" "datormössen" ; --Swe
+lin central_processing_unit_N = mkN "processor" "processorer" ; --Swe
+lin computer_N = mkN "dator" "datorer" ; --Swe
+lin program_V = mkV "programera" ; --Swe
+lin fast_A = mkA "snabb" ; --Swe
+lin hard_drive_N = mkN "härddisk" ; --Swe
+lin computer_keyboard_N = mkN "tangentbord" "tangentbord" ; --Swe
+lin laptop_N = mkN "bärbar dator" "bärbara datorer" ; --Swe
+--lin computer_N = mkN "datorsystem" ; --Swe
+lin software_N = mkN "programvara" ; --Swe
+lin slow_A = mkA "långsam" "långsamt" "långsamma" "långsammare" "långsammast" ; --Swe
+lin microcontroller_N = mkN "mikrokontroller" ; --Swe
+lin dust_N = mkN "damm" "damm" ; --Swe
+lin machine_N = mkN "maskin" "maskiner" ; --Swe
+lin electicity_N = mkN "elektricitet" "elektriciteter" ; --Swe
+lin information_N = mkN "information" "informationer" ; --Swe
+lin message_N = mkN "meddelande" "meddelanden" ; --Swe
+lin communication_N = mkN "kommunikation" "kommunikationer" ; --Swe
+lin communicating_V = mkV "kommunicera" ; --Swe
+lin tractor_N = mkN "traktor" "traktorer" ; --Swe
+lin mechanical_calculator_N = mkN "räknemaskin" "räknemaskiner" ; --Swe
+lin number_N = mkN "nummer" "nummer" ; --Swe
+lin home_computer_N = mkN "hemdator" "hemdatorer" ; --Swe
+lin power_supply_N = mkN "nätaggregat" "nätaggregat" ; --Swe
+lin system_N = mkN "system" "system" ; --Swe
+lin personal_digital_assistant_N = mkN "handdator" "haddatorer" ; --Swe
+lin webcam_N = mkN "webbkamera" ; --Swe
+lin homepage_N = mkN "hemsida" ; --Swe
+lin knowledge_N = mkN "kunskap" "kunskaper" ; --Swe
+lin printer_N = mkN "skrivare" "skrivare" ; --Swe
+lin relay_N = mkN "relä" "reläer" ; --Swe
+lin graphics_N = mkN "grafik" "grafiker" ; --Swe
+--lin computer_data_storage_N = mkN "arbetsminne" ; --Swe
+lin mainframe_computer_N = mkN "stordator" "stordatorer" ; --Swe
+lin electrical_wiring_N = mkN "elkabel" ; --Swe
+
+}