mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-30 10:28:53 -06:00
(Por) build passive from participle
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
--# -path=.:../romance:../common:../abstract:../prelude
|
--# -path=.:../romance:../common:../abstract:../prelude
|
||||||
|
|
||||||
resource BeschPor = open Prelude, CommonRomance in {
|
resource BeschPor = open Prelude, Predef, CommonRomance in {
|
||||||
|
|
||||||
flags optimize=noexpand ; -- faster than values
|
flags optimize=noexpand ; -- faster than values
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
|
|
||||||
-- machine-generated file
|
-- machine-generated file: do not edit directly!
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Verbum = {s : VFB => Str} ;
|
Verbum = {s : VFB => Str} ;
|
||||||
@@ -36,7 +36,8 @@ oper
|
|||||||
;
|
;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
-- hack to get the same behaviour as from variants. parses both, linearizes the first.
|
-- hack to get the same behaviour as from variants. parses both,
|
||||||
|
-- linearizes the first.
|
||||||
vars : Str -> Str -> Str = \x,y -> pre { "" => x ; _ => y } ;
|
vars : Str -> Str -> Str = \x,y -> pre { "" => x ; _ => y } ;
|
||||||
|
|
||||||
verbBesch : {s : VFB => Str} -> {s : CommonRomance.VF => Str} = \amar ->
|
verbBesch : {s : VFB => Str} -> {s : CommonRomance.VF => Str} = \amar ->
|
||||||
@@ -53,11 +54,25 @@ oper
|
|||||||
VImper SgP2 => amar.s ! VPB (Imper Sg P2) ;
|
VImper SgP2 => amar.s ! VPB (Imper Sg P2) ;
|
||||||
VImper PlP1 => amar.s ! VPB (Imper Pl P1) ;
|
VImper PlP1 => amar.s ! VPB (Imper Pl P1) ;
|
||||||
VImper PlP2 => amar.s ! VPB (Imper Pl P2) ;
|
VImper PlP2 => amar.s ! VPB (Imper Pl P2) ;
|
||||||
VPart g n => amar.s ! VI Part ;
|
VPart g n => mkPass (amar.s ! VI Part) ! g ! n ;
|
||||||
VGer | VPresPart => amar.s ! VI Ger
|
VGer | VPresPart => amar.s ! VI Ger
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
genNumForms : Str -> Str -> Str -> Str -> Gender => Number => Str ;
|
||||||
|
genNumForms ms fs mp fp = table {
|
||||||
|
Masc => \\n => numForms ms mp ! n ;
|
||||||
|
Fem => \\n => numForms fs fp ! n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPass : Str -> Gender => Number => Str ;
|
||||||
|
-- passive form is highly predictable from singular masculine
|
||||||
|
mkPass p = case p of {
|
||||||
|
amad + "o" => genNumForms p (amad + "a") (amad + "os") (amad + "as") ;
|
||||||
|
entregu + "e" => \\g => numForms p (p + "s") ;
|
||||||
|
_ => error "unknown ending" -- nothing should reach here
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
oper ter_1 : Str -> Verbum = \ter ->
|
oper ter_1 : Str -> Verbum = \ter ->
|
||||||
let x_ = Predef.tk 3 ter in
|
let x_ = Predef.tk 3 ter in
|
||||||
|
|||||||
Reference in New Issue
Block a user