Skip to content

Commit

Permalink
unverified definitions of some Croatian functions
Browse files Browse the repository at this point in the history
  • Loading branch information
aarneranta committed Apr 3, 2024
1 parent a0c8198 commit cd3a2e0
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/croatian/AdverbHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ lin
s = prep.s ++ np.prep ! prep.c
} ;
AdnCAdv a = a ;

SubjS subj s = {s = subj.s ++ s.s} ;
}
4 changes: 3 additions & 1 deletion src/croatian/CatHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concrete CatHrv of Cat =

RS = {s : Agr => Str} ;
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
RP = AdjForms ;
RP = {s : Gender => Number => Case => Str} ; -- same as AP

VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
Expand All @@ -33,10 +33,12 @@ concrete CatHrv of Cat =
AdA = {s : Str} ;

N = ResHrv.NounForms ** {g : Gender} ;
N2 = ResHrv.NounForms ** {g : Gender ; c : ComplementCase} ;
CN = ResHrv.Noun ; -- {s : Number => Case => Str ; g : Gender}
NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns
PN = {s : Case => Str ; g : Gender} ;
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
Predet = {s : Gender => Number => Case => Str} ; -- same as AP
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
Num = Determiner ;
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
Expand Down
14 changes: 10 additions & 4 deletions src/croatian/ExtendHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ concrete ExtendHrv of Extend = CatHrv **
--- ReflPossPron
CardCNCard
---- constant not found (yet)
,GenRP
,youPolFem_Pron
,UttVPShort
,UttAccIP
Expand Down Expand Up @@ -37,9 +38,14 @@ in {

---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;

lin CardCNCard card cn = {
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
size = NS_20_
} ;
lin
CardCNCard card cn = {
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
size = NS_20_
} ;

GenRP num cn = {
s = \\g, n, c => Grammar.IdRP.s ! g ! n ! Gen ++ num.s ! cn.g ! c ++ cn.s ! n ! c
} ;

}
9 changes: 9 additions & 0 deletions src/croatian/IdiomHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ lin

ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ;

ImpersCl vp =
let npa = Ag Neutr Sg P3 in {
subj = "" ;
verb = vp.verb ;
clit = vp.clit ! npa ;
compl = vp.compl ! npa ;
a = npa ;
} ;

}
5 changes: 0 additions & 5 deletions src/croatian/MissingHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
oper CompCN : CN -> Comp = notYet "CompCN" ;
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
oper CompIP : IP -> IComp = notYet "CompIP" ;
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
Expand All @@ -34,14 +32,12 @@ oper IdetIP : IDet -> IP = notYet "IdetIP" ;
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
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 PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PassV2 : V2 -> VP = notYet "PassV2" ;
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
Expand All @@ -66,7 +62,6 @@ oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
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 Use2N3 : N3 -> N2 = notYet "Use2N3" ;
Expand Down
9 changes: 9 additions & 0 deletions src/croatian/NounHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ lin
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
g = cn.g
} ;

PredetNP predet np =
case np.a of {
Ag g n _ => {
s,clit,prep = \\c => predet.s ! g ! n ! c ++ np.s ! c ;
a = np.a ;
hasClit = False
}
} ;

RelCN cn rs = {
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
Expand Down
5 changes: 2 additions & 3 deletions src/croatian/RelativeHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ concrete RelativeHrv of Relative = CatHrv ** open
lin
RelVP rp vp = vp ** {
subj =
let rel = (adjFormsAdjective rp).s
let rel = rp.s
in \\a => case a of {
Ag g n _ => rel ! g ! n ! Nom
}
} ;

IdRP = (mkA "koji").posit ;

IdRP = adjFormsAdjective (mkA "koji").posit ;

}
4 changes: 4 additions & 0 deletions src/croatian/SentenceHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ lin
pol.s ++ verbAgr rcl.verb a CTPres ++
rcl.compl ! a ;
} ; ---- TODO tenses


AdvS adv s = {s = adv.s ++ s.s} ;
ExtAdvS adv s = {s = adv.s ++ Predef.BIND ++ "," ++ s.s} ;

}
13 changes: 13 additions & 0 deletions src/croatian/StructuralHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,17 @@ lin

somewhere_Adv = mkAdv "negdje" ;

if_Subj = lin Subj {s = "ako"} ;
every_Det = {s = \\g, c => (adjFormsAdjective (velikA "svaki")).s ! g ! Sg ! c ; size = NS_1} ;
all_Predet = adjFormsAdjective (velikA "svi") ;
that_Subj = lin Subj {s = "da"} ;
someSg_Det = {s = \\g, c => (adjFormsAdjective (velikA "neki")).s ! g ! Sg ! c ; size = NS_1} ;
at_least_AdN = lin AdN {s = "najmanje"} ;
part_Prep = mkPrep genitive ;


-- ExtAdvS
-- mkN2
-- mkA2

}
6 changes: 6 additions & 0 deletions src/croatian/VerbHrv.gf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ lin
s = \\a_ => np.s ! Nom ;
} ;

CompCN cn = {
s = \\a => case a of {
Ag _ n _ => cn.s ! n ! Nom
} ;
} ;

CompAdv adv = {
s = \\a_ => adv.s
} ;
Expand Down

0 comments on commit cd3a2e0

Please sign in to comment.