Small fixes in order to make Extensions and Translate grammar and Chunk to work

This commit is contained in:
Inari Listenmaa
2017-08-25 14:43:55 +03:00
parent 0d07bd9289
commit 1d2bd65019
2 changed files with 22 additions and 10 deletions

View File

@@ -199,8 +199,12 @@ oper
--- { Abs => "hargle"; Erg => "bargle" }
-- the field .agr. is of type Agr.
buru_NP : NounPhrase = { s = \\_ => "buru" ;
stem = "buru" ;
buru_NP : NounPhrase =
empty_NP ** { s = \\_ => "buru" ;
stem = "buru" } ;
empty_NP : NounPhrase = { s = \\_ => [] ;
stem = [] ;
agr = Hau ;
anim = Anim ;
isDef = True } ;
@@ -472,7 +476,7 @@ oper
clFromSlash : NounPhrase -> ClSlash -> Clause = \o,cls ->
let obj = o ** { s = mkDObj o } ;
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 ;
mkClause : (isIP : Bool) -> NounPhrase -> VerbPhrase -> Clause = \isIP,subj,vp ->

View File

@@ -5,17 +5,25 @@ concrete SymbolEus of Symbol = CatEus ** open Prelude, ParadigmsEus, ResEus, (NE
lin
-- : Symb -> PN ; -- x
SymbPN i = mkPNoun i.s ;
SymbPN i = symbPN i.s ;
-- : Int -> PN ; -- 27
IntPN i = mkPNoun i.s ;
---- : Int -> PN ; -- 27
IntPN i = symbPN i.s ;
-- : Float -> PN ; -- 3.14159
FloatPN i = mkPNoun i.s ;
---- : Float -> PN ; -- 3.14159
FloatPN i = symbPN i.s ;
-- : Card -> PN ; -- twelve [as proper name]
NumPN i = mkPNoun i.s ;
---- : Card -> PN ; -- twelve [as proper name]
NumPN i = symbPN i.s ;
oper
symbPN : Str -> PN = \symb -> lin PN
{ s = symb ;
ph = FinalCons ;
anim = Inan ;
nbr = Pl } ;
lin
-- CNIntNP cn i = {} ;
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y