forked from GitHub/gf-rgl
Hrv: enough to implement NLG experiment, but bogus in some places
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--# -path=.:../slovak:../common:../abstract:../prelude
|
||||
|
||||
resource TryHrv = SyntaxHrv, LexiconHrv, ParadigmsHrv -[mkAdv, mkDet,mkQuant]**
|
||||
resource TryHrv = SyntaxHrv, LexiconHrv, ParadigmsHrv -[mkAdv, mkAdN, mkOrd, mkDet, mkQuant]**
|
||||
open (P = ParadigmsHrv) in {
|
||||
|
||||
-- oper
|
||||
|
||||
@@ -6,7 +6,7 @@ concrete AdjectiveHrv of Adjective = CatHrv ** open ResHrv, Prelude in {
|
||||
|
||||
AdAP ada ap = ap ** {s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c} ;
|
||||
|
||||
--AW2 AdjOrd
|
||||
AdjOrd a = adjFormsAdjective a ** {isPost = False} ;
|
||||
|
||||
ComplA2 a np =
|
||||
let ap = adjFormsAdjective a
|
||||
|
||||
@@ -5,5 +5,5 @@ lin
|
||||
PrepNP prep np = {
|
||||
s = prep.s ++ np.prep ! prep.c
|
||||
} ;
|
||||
|
||||
AdnCAdv a = a ;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ concrete CatHrv of Cat =
|
||||
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
Num = Determiner ;
|
||||
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
||||
Ord = AdjForms ;
|
||||
Pron = PronForms ** {poss : AdjForms} ;
|
||||
|
||||
Adv = {s : Str} ;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
concrete ExtendHrv of Extend = CatHrv **
|
||||
ExtendFunctor - [
|
||||
ReflPossPron
|
||||
--- ReflPossPron
|
||||
CardCNCard
|
||||
---- constant not found (yet)
|
||||
,youPolFem_Pron
|
||||
,UttVPShort
|
||||
@@ -34,6 +35,9 @@ in {
|
||||
|
||||
---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;
|
||||
|
||||
--AW2 CardCNCard
|
||||
lin CardCNCard card cn = {
|
||||
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
|
||||
size = NS_20_
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
concrete IdiomHrv of Idiom = CatHrv ** open Prelude, ResHrv in {
|
||||
|
||||
--AW2 ExistNP
|
||||
--AW2 ExistNPAdv
|
||||
lin
|
||||
ExistNP np = { ---- TODO verify this
|
||||
subj = np.s ! Nom ;
|
||||
verb = biti_VerbForms ; ---- TODO: jesam
|
||||
clit, compl = [] ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ resource MissingHrv = open GrammarHrv, SymbolHrv, Prelude, PredefCnc in {
|
||||
-- temporary definitions to enable the compilation of RGL API
|
||||
oper AAnter : Ant = notYet "AAnter" ;
|
||||
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
|
||||
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
|
||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
||||
@@ -26,13 +23,11 @@ oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
||||
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
||||
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
||||
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
|
||||
oper DetNP : Det -> NP = notYet "DetNP" ;
|
||||
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||
@@ -43,7 +38,6 @@ oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||
oper PassV2 : V2 -> VP = notYet "PassV2" ;
|
||||
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
||||
@@ -76,7 +70,6 @@ oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||
oper TCond : Tense = notYet "TCond" ;
|
||||
oper TFut : Tense = notYet "TFut" ;
|
||||
oper TPast : Tense = notYet "TPast" ;
|
||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||
|
||||
@@ -11,6 +11,12 @@ lin
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
DetNP det = {
|
||||
s,prep,clit = \\c => det.s ! Neutr ! c ;
|
||||
a = numSizeAgr Neutr det.size P3 ;
|
||||
hasClit = False ;
|
||||
} ;
|
||||
|
||||
MassNP cn = {
|
||||
s,prep,clit = \\c => cn.s ! Sg ! c ;
|
||||
a = Ag cn.g Sg P3 ;
|
||||
@@ -88,9 +94,8 @@ lin
|
||||
size = nu.size
|
||||
} ;
|
||||
|
||||
--AW2 AdNum
|
||||
--AW2 PossNP
|
||||
--AW2 OrdSuperl
|
||||
AdNum adn card = card ** {s = \\g,c => adn.s ++ card.s ! g ! c} ;
|
||||
OrdSuperl a = a ; ---- TODO superl
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -98,6 +98,18 @@ oper
|
||||
zenaNForms : Str -> NForms
|
||||
= zenaN ;
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN
|
||||
= \s ->
|
||||
let
|
||||
nf = smartLexNoun s ;
|
||||
n = nounFormsNoun nf nf.g
|
||||
in lin PN {
|
||||
s = \\c => n.s ! Sg ! c ; ---- TODO check this
|
||||
g = nf.g
|
||||
} ;
|
||||
} ;
|
||||
|
||||
---------------------
|
||||
-- Adjectives
|
||||
|
||||
@@ -170,7 +182,16 @@ oper
|
||||
mkConj : Str -> Conj
|
||||
= \s -> lin Conj {s1 = [] ; s2 = s} ;
|
||||
|
||||
--AW2 mkAdN
|
||||
--AW2 mkOrd
|
||||
mkAdN : Str -> AdN
|
||||
= \s -> lin AdN {s = s} ;
|
||||
|
||||
mkOrd : Str -> Ord
|
||||
= \s -> lin Ord (velikA s) ;
|
||||
|
||||
ifPluralNP : NP -> Bool
|
||||
= \np -> case np.a of {
|
||||
Ag _ Pl _ => True ;
|
||||
_ => False
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ lin
|
||||
} ;
|
||||
ASimul = {s = [] ; t = CTPres} ;
|
||||
TPres = {s = [] ; t = CTPres} ;
|
||||
TPast = {s = [] ; t = CTPast} ;
|
||||
TTAnt t a = {s = t.s ++ a.s ; t = t.t} ; ----
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user