mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
enabled some gerunds and participles in Translate, implemented for Eng and Swe. Commented out which_N, a source of errors.
This commit is contained in:
@@ -138,6 +138,13 @@ oper
|
|||||||
|
|
||||||
gennumAgr : Agr -> GenNum = \a -> gennum a.g a.n ;
|
gennumAgr : Agr -> GenNum = \a -> gennum a.g a.n ;
|
||||||
|
|
||||||
|
aformpos2agr : AFormPos -> Agr = \af -> case af of {
|
||||||
|
Strong (GSg g) => {p = P3 ; n = Sg ; g = g} ;
|
||||||
|
Strong GPl => {p = P3 ; n = Pl ; g = Utr} ; -- loss of gender does not matter in Pl
|
||||||
|
Weak n => {p = P3 ; n = n ; g = Utr} ---- loss of gender: *det stor blivande huset
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- Used in $DiffScand.predV$.
|
-- Used in $DiffScand.predV$.
|
||||||
|
|
||||||
vFin : STense -> Voice -> VForm = \t,v -> case t of {
|
vFin : STense -> Voice -> VForm = \t,v -> case t of {
|
||||||
@@ -333,6 +340,11 @@ oper
|
|||||||
infVPPlus : VP -> Agr -> Anteriority -> Polarity -> Str = \vp,a,ant,pol ->
|
infVPPlus : VP -> Agr -> Anteriority -> Polarity -> Str = \vp,a,ant,pol ->
|
||||||
vp.a1 ! pol ! a ++ (vp.s ! Act ! VPInfinit ant).inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; --- a1
|
vp.a1 ! pol ! a ++ (vp.s ! Act ! VPInfinit ant).inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; --- a1
|
||||||
|
|
||||||
|
partVPPlus : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol ->
|
||||||
|
vp.a1 ! pol ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ++ vp.sp ! pf ; -- verb final: i sängen liggande
|
||||||
|
partVPPlusPost : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol ->
|
||||||
|
vp.a1 ! pol ! a ++ vp.sp ! pf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; -- verb first: liggande i sängen
|
||||||
|
|
||||||
|
|
||||||
-- For $Sentence$.
|
-- For $Sentence$.
|
||||||
|
|
||||||
|
|||||||
@@ -64737,7 +64737,7 @@ fun whether_Subj : Subj ;
|
|||||||
fun whetstone_N : N ;
|
fun whetstone_N : N ;
|
||||||
fun whey_N : N ;
|
fun whey_N : N ;
|
||||||
fun which_IQuant : IQuant ;
|
fun which_IQuant : IQuant ;
|
||||||
fun which_N : N ;
|
--fun which_N : N ; ---- what is this? creates spurious parses. AR 25/9/2014
|
||||||
fun whichever_A : A ;
|
fun whichever_A : A ;
|
||||||
fun whichever_Quant : Quant ;
|
fun whichever_Quant : Quant ;
|
||||||
fun whichsoever_A : A ;
|
fun whichsoever_A : A ;
|
||||||
|
|||||||
@@ -47,16 +47,30 @@ lin
|
|||||||
isPre = True
|
isPre = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
GerundN v = {
|
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
|
||||||
s = \\n,d,c => v.s ! VI (VPtPres n d c) ;
|
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
|
||||||
g = Neutr ;
|
a = {g = Neutr ; n = Sg ; p = P3}
|
||||||
co = v.s ! VI (VPtPres Sg Indef Nom) ;
|
} ;
|
||||||
} ;
|
|
||||||
|
GerundAdv vp = {
|
||||||
|
s = partVPPlusPost vp (PartPres Sg Indef (Nom|Gen)) {g = Utr ; n = Sg ; p = P3} Pos -- sovande(s) i sängen
|
||||||
|
} ;
|
||||||
|
|
||||||
PresPartAP vp = {
|
PresPartAP vp = {
|
||||||
s = \\_ => v.s ! VI (VPtPres Sg Indef Nom) ;
|
s = \\af => partVPPlus vp (PartPres Sg Indef Nom) (aformpos2agr af) Pos ;
|
||||||
isPre = True
|
isPre = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
PastPartAP vp = {
|
||||||
|
s = \\af => partVPPlus vp (PartPret af Nom) (aformpos2agr af) Pos ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PastPartAgentAP vp np = {
|
||||||
|
s = \\af => "av" ++ np.s ! accusative ++ partVPPlus vp (PartPret af Nom) (aformpos2agr af) Pos ; ---- agent and other advs before;
|
||||||
|
isPre = True ---- the right choice in attributive but not predicative position
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
---- PastPartAP vp
|
---- PastPartAP vp
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ abstract Translate =
|
|||||||
Extensions [
|
Extensions [
|
||||||
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
||||||
DirectComplVS, DirectComplVQ, FocusObjS
|
DirectComplVS, DirectComplVQ, FocusObjS
|
||||||
---- , PastPartAP, PastPartAgentAP, PresPartAP ---- not yet available for all languages
|
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv ---- not yet available for all languages
|
||||||
],
|
],
|
||||||
Dictionary,
|
Dictionary,
|
||||||
Documentation
|
Documentation
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ concrete TranslateEng of Translate =
|
|||||||
ChunkEng,
|
ChunkEng,
|
||||||
ExtensionsEng [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
ExtensionsEng [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
||||||
DirectComplVS, DirectComplVQ, FocusObjS
|
DirectComplVS, DirectComplVQ, FocusObjS
|
||||||
|
, PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
|
||||||
---- , PastPartAP, PastPartAgentAP, PresPartAP
|
|
||||||
],
|
],
|
||||||
DictionaryEng **
|
DictionaryEng **
|
||||||
open MorphoEng, ResEng, ParadigmsEng, (G = GrammarEng), (E = ExtraEng), Prelude in {
|
open MorphoEng, ResEng, ParadigmsEng, (G = GrammarEng), (E = ExtraEng), Prelude in {
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ concrete TranslateSwe of Translate =
|
|||||||
|
|
||||||
ChunkSwe,
|
ChunkSwe,
|
||||||
ExtensionsSwe [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
ExtensionsSwe [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
||||||
DirectComplVS, DirectComplVQ, FocusObjS],
|
DirectComplVS, DirectComplVQ, FocusObjS
|
||||||
|
,PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv
|
||||||
|
],
|
||||||
|
|
||||||
DictionarySwe **
|
DictionarySwe **
|
||||||
open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in {
|
open MorphoSwe, ResSwe, ParadigmsSwe, SyntaxSwe, CommonScand, (E = ExtraSwe), Prelude in {
|
||||||
|
|||||||
Reference in New Issue
Block a user