mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 17:42:51 -06:00
reflexive and deponent as verb features added
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
concrete BasicEng of Basic = CatEng ** open ParadigmsEng in {
|
||||
|
||||
flags
|
||||
startcat=Phr ; lexer=textlit ; unlexer=text ;
|
||||
optimize=all ;
|
||||
optimize=values ;
|
||||
|
||||
lin
|
||||
airplane_N = regN "airplane" ;
|
||||
|
||||
@@ -189,7 +189,7 @@ oper
|
||||
--- The particle always appears right after the verb.
|
||||
|
||||
verbPart : Verb -> Str -> Verb = \v,p ->
|
||||
{s = \\f => v.s ! f ++ p} ;
|
||||
{s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ;
|
||||
|
||||
verbNoPart : Verb -> Verb = \v -> verbPart v [] ;
|
||||
|
||||
|
||||
@@ -235,6 +235,12 @@ oper
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
--3 Reflexive verbs
|
||||
--
|
||||
-- By default, verbs are not reflexive; this function makes them that.
|
||||
|
||||
reflV : V -> V ;
|
||||
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
@@ -423,6 +429,7 @@ oper
|
||||
mkV fit (fit + "s") y z fitting ;
|
||||
|
||||
partV v p = verbPart v p ** {lock_V = <>} ;
|
||||
reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ;
|
||||
|
||||
mkV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
|
||||
@@ -41,7 +41,7 @@ resource ResEng = ParamEng ** open Prelude in {
|
||||
}
|
||||
} ;
|
||||
|
||||
mkVerb : (_,_,_,_,_ : Str) -> {s : VForm => Str} =
|
||||
mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
||||
\go,goes,went,gone,going -> {
|
||||
s = table {
|
||||
VInf => go ;
|
||||
@@ -49,7 +49,8 @@ resource ResEng = ParamEng ** open Prelude in {
|
||||
VPast => went ;
|
||||
VPPart => gone ;
|
||||
VPresPart => going
|
||||
}
|
||||
} ;
|
||||
isRefl = False
|
||||
} ;
|
||||
|
||||
mkIP : (i,me,my : Str) -> Number -> {s : Case => Str ; n : Number} =
|
||||
@@ -77,7 +78,7 @@ resource ResEng = ParamEng ** open Prelude in {
|
||||
regA : Str -> {s : AForm => Str} = \warm ->
|
||||
mkAdjective warm (warm + "er") (warm + "est") (warm + "ly") ;
|
||||
|
||||
regV : Str -> {s : VForm => Str} = \walk ->
|
||||
regV : Str -> Verb = \walk ->
|
||||
mkVerb walk (walk + "s") (walk + "ed") (walk + "ed") (walk + "ing") ;
|
||||
|
||||
regNP : Str -> Number -> {s : Case => Str ; a : Agr} = \that,n ->
|
||||
@@ -97,7 +98,8 @@ resource ResEng = ParamEng ** open Prelude in {
|
||||
-- For $Verb$.
|
||||
|
||||
Verb : Type = {
|
||||
s : VForm => Str
|
||||
s : VForm => Str ;
|
||||
isRefl : Bool
|
||||
} ;
|
||||
|
||||
VerbForms : Type =
|
||||
@@ -138,7 +140,7 @@ resource ResEng = ParamEng ** open Prelude in {
|
||||
<Cond,Anter,Pos,_> => vf "would" ("have" ++ part) ;
|
||||
<Cond,Anter,Neg,_> => vf "wouldn't" ("have" ++ part)
|
||||
} ;
|
||||
s2 = \\_ => []
|
||||
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
|
||||
} ;
|
||||
|
||||
predAux : Aux -> VP = \verb -> {
|
||||
|
||||
@@ -27,7 +27,7 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
|
||||
|
||||
PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = []} ; -- no "to"
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
||||
|
||||
Reference in New Issue
Block a user