mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-31 02:38:55 -06:00
Small fixes in order to make Extensions and Translate grammar and Chunk to work
This commit is contained in:
@@ -199,8 +199,12 @@ oper
|
|||||||
--- { Abs => "hargle"; Erg => "bargle" }
|
--- { Abs => "hargle"; Erg => "bargle" }
|
||||||
-- the field .agr. is of type Agr.
|
-- the field .agr. is of type Agr.
|
||||||
|
|
||||||
buru_NP : NounPhrase = { s = \\_ => "buru" ;
|
buru_NP : NounPhrase =
|
||||||
stem = "buru" ;
|
empty_NP ** { s = \\_ => "buru" ;
|
||||||
|
stem = "buru" } ;
|
||||||
|
|
||||||
|
empty_NP : NounPhrase = { s = \\_ => [] ;
|
||||||
|
stem = [] ;
|
||||||
agr = Hau ;
|
agr = Hau ;
|
||||||
anim = Anim ;
|
anim = Anim ;
|
||||||
isDef = True } ;
|
isDef = True } ;
|
||||||
@@ -472,7 +476,7 @@ oper
|
|||||||
clFromSlash : NounPhrase -> ClSlash -> Clause = \o,cls ->
|
clFromSlash : NounPhrase -> ClSlash -> Clause = \o,cls ->
|
||||||
let obj = o ** { s = mkDObj o } ;
|
let obj = o ** { s = mkDObj o } ;
|
||||||
vp = cls ** { dobj = obj } ; --Insert the object's agr into the cls's dobj!
|
vp = cls ** { dobj = obj } ; --Insert the object's agr into the cls's dobj!
|
||||||
subj = buru_NP ** cls.subj ; -- Just a dummy NP, we won't use more than is in cls.subj
|
subj = empty_NP ** cls.subj ; -- Just a dummy NP, we won't use more than is in cls.subj
|
||||||
in mkClause True subj vp ;
|
in mkClause True subj vp ;
|
||||||
|
|
||||||
mkClause : (isIP : Bool) -> NounPhrase -> VerbPhrase -> Clause = \isIP,subj,vp ->
|
mkClause : (isIP : Bool) -> NounPhrase -> VerbPhrase -> Clause = \isIP,subj,vp ->
|
||||||
|
|||||||
@@ -5,17 +5,25 @@ concrete SymbolEus of Symbol = CatEus ** open Prelude, ParadigmsEus, ResEus, (NE
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
-- : Symb -> PN ; -- x
|
-- : Symb -> PN ; -- x
|
||||||
SymbPN i = mkPNoun i.s ;
|
SymbPN i = symbPN i.s ;
|
||||||
|
|
||||||
-- : Int -> PN ; -- 27
|
---- : Int -> PN ; -- 27
|
||||||
IntPN i = mkPNoun i.s ;
|
IntPN i = symbPN i.s ;
|
||||||
|
|
||||||
-- : Float -> PN ; -- 3.14159
|
---- : Float -> PN ; -- 3.14159
|
||||||
FloatPN i = mkPNoun i.s ;
|
FloatPN i = symbPN i.s ;
|
||||||
|
|
||||||
-- : Card -> PN ; -- twelve [as proper name]
|
---- : Card -> PN ; -- twelve [as proper name]
|
||||||
NumPN i = mkPNoun i.s ;
|
NumPN i = symbPN i.s ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
symbPN : Str -> PN = \symb -> lin PN
|
||||||
|
{ s = symb ;
|
||||||
|
ph = FinalCons ;
|
||||||
|
anim = Inan ;
|
||||||
|
nbr = Pl } ;
|
||||||
|
|
||||||
|
lin
|
||||||
-- CNIntNP cn i = {} ;
|
-- CNIntNP cn i = {} ;
|
||||||
|
|
||||||
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
||||||
|
|||||||
Reference in New Issue
Block a user