From cc50be36b01f7c6ab5734771904b0183388a6827 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 12:09:08 +0300 Subject: [PATCH 01/17] Import AdverbTur only from GrammarTur --- src/turkish/GrammarTur.gf | 3 ++- src/turkish/LangTur.gf | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/turkish/GrammarTur.gf b/src/turkish/GrammarTur.gf index 882d3c81..813359c0 100644 --- a/src/turkish/GrammarTur.gf +++ b/src/turkish/GrammarTur.gf @@ -6,7 +6,8 @@ concrete GrammarTur of Grammar = AdjectiveTur, NumeralTur, StructuralTur, - SentenceTur + SentenceTur, + AdverbTur ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/turkish/LangTur.gf b/src/turkish/LangTur.gf index 3458a054..984c315c 100644 --- a/src/turkish/LangTur.gf +++ b/src/turkish/LangTur.gf @@ -2,8 +2,7 @@ concrete LangTur of Lang = GrammarTur, - LexiconTur, - AdverbTur + LexiconTur ** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ; From f0519551c48ec4039ed351c6d6c51855a35ea307 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 12:12:55 +0300 Subject: [PATCH 02/17] Add linearization for in_Prep --- src/turkish/StructuralTur.gf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 35c436e2..6d2070dd 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -65,6 +65,9 @@ concrete StructuralTur of Structural = CatTur ** on_Prep = variants {mkPrep "üzerinde" Gen; mkPrep "üstünde" Gen} ; + in_Prep = + variants {mkPrep "içinde" Gen; mkPrep "içinde" Gen} ; + -- ... ile ...nin arasında between_Prep = mkPrep "arasında" Gen ; From f004826f0a36e6a595ac371c9501a74fea9d3b27 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 12:16:04 +0300 Subject: [PATCH 03/17] Implement during_Prep --- src/turkish/StructuralTur.gf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 6d2070dd..8aeb2da3 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -68,6 +68,10 @@ concrete StructuralTur of Structural = CatTur ** in_Prep = variants {mkPrep "içinde" Gen; mkPrep "içinde" Gen} ; + -- ... sırasında + during_Prep = + mkPrep "sırasında" Nom ; + -- ... ile ...nin arasında between_Prep = mkPrep "arasında" Gen ; From ce2c441352dfa2ae2979626f974e5c03a2f6159c Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 12:27:57 +0300 Subject: [PATCH 04/17] Add yes_Utt and no_Utt --- src/turkish/StructuralTur.gf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 8aeb2da3..568e6141 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -80,4 +80,7 @@ concrete StructuralTur of Structural = CatTur ** or_Conj = ss "veya" ; + yes_Utt = ss "evet" ; + no_Utt = ss "hayır" ; + } From 0a2f8fc184b16c03f397047fdfb56e4d09fa1a92 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 14:21:05 +0300 Subject: [PATCH 05/17] Space before semicolon --- src/turkish/StructuralTur.gf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 568e6141..2630758c 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -58,7 +58,7 @@ concrete StructuralTur of Structural = CatTur ** -- ..nin arkasında behind_Prep = - mkPrep "arkasında" Gen; + mkPrep "arkasında" Gen ; -- ...nin üzerinde -- ...nin üstünde From 458b894596c40c0e87ae63c21446317c87836287 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 14:21:53 +0300 Subject: [PATCH 06/17] Alternative linearization for in_Prep --- src/turkish/StructuralTur.gf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 2630758c..0f15eacf 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -66,7 +66,7 @@ concrete StructuralTur of Structural = CatTur ** variants {mkPrep "üzerinde" Gen; mkPrep "üstünde" Gen} ; in_Prep = - variants {mkPrep "içinde" Gen; mkPrep "içinde" Gen} ; + variants {mkPrep "içinde" Gen; mkPrep "içerisinde" Gen} ; -- ... sırasında during_Prep = From c2b97c9098fdbbb32b56ea8cab1e13e8ff777b99 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 14:28:59 +0300 Subject: [PATCH 07/17] Indentation --- src/turkish/CatTur.gf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/turkish/CatTur.gf b/src/turkish/CatTur.gf index 61568cb9..7e41c7fa 100644 --- a/src/turkish/CatTur.gf +++ b/src/turkish/CatTur.gf @@ -6,7 +6,7 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in { lincat --- Noun + -- Noun CN = {s : Number => Case => Str; gen : Number => Agr => Str} ; NP = {s : Case => Str ; a : Agr} ; VP = Verb ; @@ -24,11 +24,10 @@ concrete CatTur of Cat = CommonX ** open ResTur, Prelude in { Numeral = {s : CardOrd => Number => Case => Str ; n : Number} ; Digits = {s : CardOrd => Number => Case => Str ; n : Number; tail : DTail} ; --- Adjective - + -- Adjective AP = {s : Number => Case => Str} ; --- Open lexical classes, e.g. Lexicon + -- Open lexical classes, e.g. Lexicon V, VS, VQ, VA = Verb ; V2, V2Q, V2V, V2A, V2S = Verb ** {c : Prep} ; V3 = Verb ** {c1,c2 : Prep} ; From 0d836f7152de63d3d056ef467729a6ea9800fa7d Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 14:51:09 +0300 Subject: [PATCH 08/17] Add always_AdV [WIP] --- src/turkish/AdverbTur.gf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/turkish/AdverbTur.gf b/src/turkish/AdverbTur.gf index c54c30da..9b551724 100644 --- a/src/turkish/AdverbTur.gf +++ b/src/turkish/AdverbTur.gf @@ -1,4 +1,6 @@ concrete AdverbTur of Adverb = CatTur ** open ResTur, Prelude in { lin PrepNP prep np = {s = np.s ! prep.c ++ prep.s} ; + + always_AdV = {s = "her zaman"} ; } From 9d4a8009c8e7d69bfdd9e377fcbc0a16129556fa Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 14:56:29 +0300 Subject: [PATCH 09/17] Add linearization for always_AdV --- src/turkish/StructuralTur.gf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 0f15eacf..9a3710a7 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -83,4 +83,6 @@ concrete StructuralTur of Structural = CatTur ** yes_Utt = ss "evet" ; no_Utt = ss "hayır" ; + always_AdV = {s = "her zaman"} ; + } From 80ad54000cb462cae33ab84c790770c53667832c Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:15:59 +0300 Subject: [PATCH 10/17] Implement AdvCN --- src/turkish/NounTur.gf | 6 ++++++ src/turkish/StructuralTur.gf | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/turkish/NounTur.gf b/src/turkish/NounTur.gf index b93e05b4..915d6132 100644 --- a/src/turkish/NounTur.gf +++ b/src/turkish/NounTur.gf @@ -78,4 +78,10 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude s = \\n,c => ap.s ! Sg ! Nom ++ cn.s ! n ! c; gen = \\n, a => ap.s ! Sg ! Nom ++ cn.gen ! n ! a } ; + + -- lin CN = {s : Number => Case => Str; gen : Number => Agr => Str} ; + AdvCN cn adv = { + s = \\n, c => adv.s ++ cn.s ! n ! c; + gen = \\n, a => adv.s ++ cn.gen ! n ! a + } ; } diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 9a3710a7..3dea6373 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -42,7 +42,7 @@ concrete StructuralTur of Structural = CatTur ** mkPron "siz" "sizi" "size" "sizin" "sizde" "sizden" "sizli" "sizsiz" Pl P2 ; with_Prep = - mkPrep "ile" Nom ; + mkPrep [] (Abess Pos) ; -- ...den sonra after_Prep = @@ -74,9 +74,9 @@ concrete StructuralTur of Structural = CatTur ** -- ... ile ...nin arasında between_Prep = - mkPrep "arasında" Gen ; + mkPrep "arasındaki" Gen ; - and_Conj = ss "ve" ; + and_Conj = ss "ile" ; or_Conj = ss "veya" ; From 08c089c5a4bc934515251a047080b47cdee3f91c Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:18:35 +0300 Subject: [PATCH 11/17] Implement AdvNP --- src/turkish/NounTur.gf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/turkish/NounTur.gf b/src/turkish/NounTur.gf index 915d6132..d8a5980a 100644 --- a/src/turkish/NounTur.gf +++ b/src/turkish/NounTur.gf @@ -84,4 +84,9 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude s = \\n, c => adv.s ++ cn.s ! n ! c; gen = \\n, a => adv.s ++ cn.gen ! n ! a } ; + + AdvNP np adv = { + s = \\c => adv.s ++ np.s ! c; + a = np.a + } ; } From b2a155b30958dc072504302c392b29094486ac9f Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:24:15 +0300 Subject: [PATCH 12/17] Add the linearization for but_PConj --- src/turkish/StructuralTur.gf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/turkish/StructuralTur.gf b/src/turkish/StructuralTur.gf index 3dea6373..26266f3a 100644 --- a/src/turkish/StructuralTur.gf +++ b/src/turkish/StructuralTur.gf @@ -85,4 +85,6 @@ concrete StructuralTur of Structural = CatTur ** always_AdV = {s = "her zaman"} ; + but_PConj = ss "ama" ; + } From be6a44e57378defc6e03a0479d8a4736750835e8 Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:38:24 +0300 Subject: [PATCH 13/17] Implement DetQuantOrd --- src/turkish/NounTur.gf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/turkish/NounTur.gf b/src/turkish/NounTur.gf index d8a5980a..e8ea70c0 100644 --- a/src/turkish/NounTur.gf +++ b/src/turkish/NounTur.gf @@ -25,6 +25,12 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, Prelude useGen = quant.useGen } ; + DetQuantOrd quant num o = { + s = quant.s ++ num.s ! Sg ! Nom ++ o.s ! num.n ! Nom ; + n = num.n; + useGen = quant.useGen + } ; + NumSg = {s = \\num,c => []; n = Sg} ; NumPl = {s = \\num,c => []; n = Pl} ; From 7bb404638ae5aeee277012f6d4e40b5e88797a5e Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:40:33 +0300 Subject: [PATCH 14/17] Linearization for AdjOrd as just the id function --- src/turkish/AdjectiveTur.gf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/turkish/AdjectiveTur.gf b/src/turkish/AdjectiveTur.gf index 308f06d0..f8dad70e 100644 --- a/src/turkish/AdjectiveTur.gf +++ b/src/turkish/AdjectiveTur.gf @@ -9,4 +9,6 @@ concrete AdjectiveTur of Adjective = CatTur ** open ResTur, Prelude in { s = \\n,c => "daha" ++ a.s ! n ! c } ; + AdjOrd v = v ; + } From e621fbbdcd596bcbd419dd62f79196570155025b Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 15:51:06 +0300 Subject: [PATCH 15/17] Indentational fixes --- src/turkish/AdjectiveTur.gf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/turkish/AdjectiveTur.gf b/src/turkish/AdjectiveTur.gf index f8dad70e..5c79568f 100644 --- a/src/turkish/AdjectiveTur.gf +++ b/src/turkish/AdjectiveTur.gf @@ -1,14 +1,21 @@ concrete AdjectiveTur of Adjective = CatTur ** open ResTur, Prelude in { lin + PositA a = {s=a.s} ; + ComparA a np = { s = \\n,c => np.s ! Ablat ++ a.s ! n ! c ; - } ; + } ; + UseComparA a = { s = \\n,c => "daha" ++ a.s ! n ! c - } ; + } ; AdjOrd v = v ; + AdvAP ap adv = { + s = \\n, c => adv.s ++ ap.s ! n ! c + } ; + } From 99cdc28faf731f5133b0f33c873e341d9d6f637d Mon Sep 17 00:00:00 2001 From: Ayberk Tosun Date: Wed, 23 Aug 2017 16:32:49 +0300 Subject: [PATCH 16/17] Formatting fixes --- src/turkish/AdjectiveTur.gf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/turkish/AdjectiveTur.gf b/src/turkish/AdjectiveTur.gf index 5c79568f..7850f8df 100644 --- a/src/turkish/AdjectiveTur.gf +++ b/src/turkish/AdjectiveTur.gf @@ -2,10 +2,10 @@ concrete AdjectiveTur of Adjective = CatTur ** open ResTur, Prelude in { lin - PositA a = {s=a.s} ; + PositA a = {s = a.s} ; ComparA a np = { - s = \\n,c => np.s ! Ablat ++ a.s ! n ! c ; + s = \\n,c => np.s ! Ablat ++ a.s ! n ! c ; } ; UseComparA a = { From 6c6141befd5891115f4999fa842a365f0bcd87b8 Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 23 Aug 2017 17:49:30 +0300 Subject: [PATCH 17/17] VPSlash conjunctions in Extend; AllEng now inherits ExtendEng rather than ExtraEng --- src/abstract/Extend.gf | 39 +++++++++++---- src/common/ExtendFunctor.gf | 23 ++++++--- src/english/AllEng.gf | 2 +- src/english/AllEngAbs.gf | 2 +- src/english/ExtendEng.gf | 96 ++++++++++++++++++++++++------------- 5 files changed, 110 insertions(+), 52 deletions(-) diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 05323db7..00d60b09 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -27,27 +27,45 @@ abstract Extend = Cat ** { CompBareCN : CN -> Comp ; -- (est) professeur - StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with - StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in - EmptyRelSlash : ClSlash -> RCl ; -- he lives in + StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with + StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in + EmptyRelSlash : ClSlash -> RCl ; -- he lives in --- $VP$ conjunction, covering both finite and infinitive forms (formerly VPI and VPS). +-- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively) +-- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses cat - VPS ; + VPS ; -- finite VP's with tense and polarity [VPS] {2} ; + VPI ; + [VPI] {2} ; -- infinitive VP's (TODO: with anteriority and polarity) fun - MkVPS : Temp -> Pol -> VP -> VPS ; -- to sleep / hasn't slept + MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep] - ComplVPSVV : VV -> VPS -> VP ; -- want to sleep and to walk + + MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol) + ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk + ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk --- in case ComplVPSVV is not available: +-- the same for VPSlash, taking a complement with shared V2 verbs - PredVPSVV : NP -> VV -> VPS -> VP ; -- she wants to sleep and to walk + cat + VPS2 ; -- have loved (binary version of VPS) + [VPS2] {2} ; -- has loved, hates" + VPI2 ; -- to love (binary version of VPI) + [VPI2] {2} ; -- to love, to hate + fun + MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved + ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates + ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person + + MkVPI2 : VPSlash -> VPI2 ; -- to love + ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate + ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person fun ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes []: "(io) sono stanco" @@ -141,7 +159,7 @@ abstract Extend = Cat ** { --- from Extensions ComplGenVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept - SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept +---- SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept CompoundN : N -> N -> N ; -- control system / controls system / control-system CompoundAP : N -> A -> AP ; -- language independent / language-independent @@ -187,4 +205,5 @@ abstract Extend = Cat ** { UttAccIP : NP -> Utt ; -- whom (accusative) UttDatIP : NP -> Utt ; -- whom (dative) + } diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index fdb56a4d..5145acd7 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -7,9 +7,13 @@ lincat lin BaseVPS = variants {} ; ConsVPS = variants {} ; - + BaseVPI = variants {} ; + ConsVPI = variants {} ; + BaseVPS2 = variants {} ; + ConsVPS2 = variants {} ; + BaseVPI2 = variants {} ; + ConsVPI2 = variants {} ; -lin GenNP = variants {} ; -- NP -> Quant ; -- this man's GenIP = variants {} ; -- IP -> IQuant ; -- whose GenRP = variants {} ; -- Num -> CN -> RP ; -- whose car @@ -19,11 +23,18 @@ lin StrandQuestSlash = QuestSlash ; -- whom does John live with ; DEFAULT with whom does John live StrandRelSlash = RelSlash ; -- that he lives in ; DEFAULT in which he lives EmptyRelSlash = RelSlash IdRP ; -- he lives in ; DEFAULT in which he lives - MkVPS vp = variants {} ; -- Temp -> Pol -> VP -> VPS ; -- to sleep / hasn't slept + MkVPS vp = variants {} ; -- Temp -> Pol -> VP -> VPS ; -- hasn't slept ConjVPS = variants {} ; -- Conj -> [VPS] -> VPS ; -- has walked and won't sleep - PredVPS = variants {} ; -- NP -> VPS -> S ; -- she [has walked and won't sleep] - ComplVPSVV = variants {} ; -- VV -> VPS -> VP ; -- want to sleep and to walk - PredVPSVV = variants {} ; -- NP -> VV -> VPS -> VP ; -- she wants to sleep and to walk + PredVPS = variants {} ; -- NP -> VPS -> S ; -- has walked and won't sleep + MkVPI vp = variants {} ; -- Temp -> Pol -> VP -> VPI ; -- to sleep / hasn't slept + ConjVPI = variants {} ; -- Conj -> [VPI] -> VPI ; -- has walked and won't sleep + ComplVPIVV = variants {} ; -- VV -> VPI -> VP ; -- want to sleep and to walk + MkVPS2 = variants {} ; -- : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved + ConjVPS2 = variants {} ; -- : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates + ComplVPS2 = variants {} ; -- : VPS2 -> NP -> VPS ; -- has loved and now hates that person + MkVPI2 = variants {} ; -- : Ant -> Pol -> VPSlash -> VPI2 ; -- to have loved + ConjVPI2 = variants {} ; -- : Conj -> [VPI2] -> VPI2 ; -- to love and have hated + ComplVPI2 = variants {} ; -- : VPI2 -> NP -> VPI ; -- to love and hate that person ProDrop pro = pro ; -- am tired ; DEFAULT I am tired ICompAP = variants {} ; -- AP -> IComp ; -- "how old" IAdvAdv = variants {} ; -- Adv -> IAdv ; -- "how often" diff --git a/src/english/AllEng.gf b/src/english/AllEng.gf index 6a523604..72caf131 100644 --- a/src/english/AllEng.gf +++ b/src/english/AllEng.gf @@ -5,5 +5,5 @@ concrete AllEng of AllEngAbs = IrregEng-[ blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], - ExtraEng + ExtendEng ---- ExtraEng ** {} ; diff --git a/src/english/AllEngAbs.gf b/src/english/AllEngAbs.gf index 8c8690a3..2742beb7 100644 --- a/src/english/AllEngAbs.gf +++ b/src/english/AllEngAbs.gf @@ -5,5 +5,5 @@ abstract AllEngAbs = IrregEngAbs-[ blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], - ExtraEngAbs + Extend ---- ExtraEngAbs ** {} ; diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index be33370d..a56b5f5e 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -3,15 +3,19 @@ concrete ExtendEng of Extend = CatEng ** ExtendFunctor - [ - VPS, ListVPS, RNP, RNPList, - AdAdV, AdjAsCN, AdjAsNP, ApposNP, BaseVPS, Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN, + VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList, + AdAdV, AdjAsCN, AdjAsNP, ApposNP, + BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2, + MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV, + MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2, + Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN, CompIQuant, CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP, CompoundN, ConjRNP, ConjVPS, ConsVPS, Cons_nr_RNP, Cons_rr_RNP, DetNPFem, EmbedPresPart, EmptyRelSlash, ExistsNP, FocusAP, FocusAdV, FocusAdv, FocusObj, FrontExtPredVP, GenIP, GenModIP, GenModNP, GenNP, GenRP, GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, InvFrontExtPredVP, MkVPS, NominalizeVPSlashNP, PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, - UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP + UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2 ] with (Grammar = GrammarEng) ** @@ -53,60 +57,80 @@ concrete ExtendEng of Extend = c = NPAcc } ; -{- ----- + lincat + VPS = {s : Agr => Str} ; + [VPS] = {s1,s2 : Agr => Str} ; VPI = {s : VVType => Agr => Str} ; [VPI] = {s1,s2 : VVType => Agr => Str} ; lin + BaseVPS = twoTable Agr ; + ConsVPS = consrTable Agr comma ; + BaseVPI = twoTable2 VVType Agr ; ConsVPI = consrTable2 VVType Agr comma ; - MkVPI vp = { - s = table { - VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a; - VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a; - VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a - } - } ; - ConjVPI = conjunctDistrTable2 VVType Agr ; - ComplVPIVV vv vpi = - insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ; -----} + MkVPS t p vp = mkVPS (lin Temp t) (lin Pol p) (lin VP vp) ; + ConjVPS c xs = conjunctDistrTable Agr c xs ; + PredVPS np vps = {s = np.s ! npNom ++ vps.s ! np.a} ; + + MkVPI vp = mkVPI (lin VP vp) ; + ConjVPI c xs = conjunctDistrTable2 VVType Agr c xs ; + ComplVPIVV vv vpi = insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ; + + +-------- two-place verb conjunction lincat - VPS = {s : {s : Agr => Str} ; i : {s : VVType => Agr => Str}} ; --- finite and infinite forms separately - [VPS] = {s : {s1,s2 : Agr => Str} ; i : {s1,s2 : VVType => Agr => Str}} ; + VPS2 = {s : Agr => Str ; c2 : Str} ; + [VPS2] = {s1,s2 : Agr => Str ; c2 : Str} ; + VPI2 = {s : VVType => Agr => Str ; c2 : Str} ; + [VPI2] = {s1,s2 : VVType => Agr => Str ; c2 : Str} ; lin - BaseVPS x y = {s = twoTable Agr x.s y.s ; i = twoTable2 VVType Agr x.i y.i} ; - ConsVPS x xs = {s = consrTable Agr comma x.s xs.s ; i = consrTable2 VVType Agr comma x.i xs.i} ; + MkVPS2 t p vpsl = mkVPS (lin Temp t) (lin Pol p) (lin VP vpsl) ** {c2 = vpsl.c2} ; + MkVPI2 vpsl = mkVPI (lin VP vpsl) ** {c2 = vpsl.c2} ; - PredVPS np vps = {s = np.s ! npNom ++ vps.s.s ! np.a} ; + BaseVPS2 x y = twoTable Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb + ConsVPS2 x xs = consrTable Agr comma x xs ** {c2 = xs.c2} ; + + BaseVPI2 x y = twoTable2 VVType Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb + ConsVPI2 x xs = consrTable2 VVType Agr comma x xs ** {c2 = xs.c2} ; - MkVPS t p vp = { - s = {s = \\a => + + ConjVPS2 c xs = conjunctDistrTable Agr c xs ** {c2 = xs.c2} ; + ConjVPI2 c xs = conjunctDistrTable2 VVType Agr c xs ** {c2 = xs.c2} ; + + + ComplVPS2 vps2 np = { + s = \\a => vps2.s ! a ++ vps2.c2 ++ np.s ! NPAcc + } ; + ComplVPI2 vpi2 np = { + s = \\t,a => vpi2.s ! t ! a ++ vpi2.c2 ++ np.s ! NPAcc + } ; + + oper + mkVPS : Temp -> Pol -> VP -> VPS = \t,p,vp -> lin VPS { + s = \\a => let verb = vp.s ! t.t ! t.a ! p.p ! oDir ! a ; verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ; in t.s ++ p.s ++ vp.ad ! a ++ verbf ++ vp.p ++ vp.s2 ! a ++ vp.ext - } ; - i = {s = table { - VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a; - VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a; - VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a - } - } } ; - - ConjVPS c xs = {s = conjunctDistrTable Agr c xs.s ; i = conjunctDistrTable2 VVType Agr c xs.i} ; - - ComplVPIVV vv vpi = - insertObj (\\a => vpi.i.s ! vv.typ ! a) (predVV vv) ; + + mkVPI : VP -> VPI = \vp -> lin VPI { + s = table { + VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ; + VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ; + VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a + } + } ; ----- + lin ICompAP ap = {s = "how" ++ ap.s ! agrP3 Sg} ; ---- IComp should have agr! IAdvAdv adv = {s = "how" ++ adv.s} ; @@ -285,4 +309,8 @@ concrete ExtendEng of Extend = UncontractedNeg = {s = [] ; p = CNeg False} ; UttVPShort vp = {s = infVP VVAux vp Simul CPos (agrP3 Sg)} ; + + + + } \ No newline at end of file