mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
updated AdjType (#454)
* updated AdjType * fixed mkA * fixed AdjType * fixed numbers * fixed numbers
This commit is contained in:
committed by
GitHub
parent
53e731593d
commit
ffcff47545
@@ -81,7 +81,7 @@ lincat
|
|||||||
Numeral = NumeralForms ;
|
Numeral = NumeralForms ;
|
||||||
Num = NumDet ;
|
Num = NumDet ;
|
||||||
Card = NumDet ;
|
Card = NumDet ;
|
||||||
Digits = {s : Str ; size: NumSize} ;
|
Digits = {s : Str ; size: NumSize; tail: DTail} ;
|
||||||
Decimal = {s : Str ; size: NumSize; hasDot : Bool} ;
|
Decimal = {s : Str ; size: NumSize; hasDot : Bool} ;
|
||||||
|
|
||||||
QS = {s : QForm => Str} ;
|
QS = {s : QForm => Str} ;
|
||||||
|
|||||||
@@ -412,13 +412,14 @@ lin pot4as5 n = n ;
|
|||||||
lincat
|
lincat
|
||||||
Dig = TDigit ;
|
Dig = TDigit ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
IDig d = {s = d.s ; n = d.n ; size = d.size} ;
|
IDig d = d ** {tail = T1} ;
|
||||||
|
|
||||||
IIDig d i = {
|
IIDig d i = {
|
||||||
s = d.s ++ BIND ++ i.s ;
|
s = d.s ++ spaceIf i.tail ++ i.s ;
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
size = i.size
|
size = i.size ;
|
||||||
|
tail = inc i.tail
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
D_0 = mk2Dig "0" Num5 ;
|
D_0 = mk2Dig "0" Num5 ;
|
||||||
@@ -448,7 +449,20 @@ lin
|
|||||||
hasDot=True
|
hasDot=True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
spaceIf : DTail -> Str = \t -> case t of {
|
||||||
|
T3 => SOFT_SPACE ;
|
||||||
|
_ => BIND
|
||||||
|
} ;
|
||||||
|
|
||||||
|
inc : DTail -> DTail = \t -> case t of {
|
||||||
|
T1 => T2 ;
|
||||||
|
T2 => T3 ;
|
||||||
|
T3 => T1
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
mk3Dig : Str -> Str -> NumSize -> TDigit = \c,o,size -> mk4Dig c o Pl size ;
|
mk3Dig : Str -> Str -> NumSize -> TDigit = \c,o,size -> mk4Dig c o Pl size ;
|
||||||
mk2Dig : Str -> NumSize -> TDigit = \c,size -> mk3Dig c (c + "o") size ;
|
mk2Dig : Str -> NumSize -> TDigit = \c,size -> mk3Dig c (c + "o") size ;
|
||||||
mk4Dig : Str -> Str -> Number -> NumSize -> TDigit = \c,o,n,size -> {
|
mk4Dig : Str -> Str -> Number -> NumSize -> TDigit = \c,o,n,size -> {
|
||||||
|
|||||||
@@ -103,13 +103,13 @@ oper
|
|||||||
|
|
||||||
mkN : overload {
|
mkN : overload {
|
||||||
mkN : Str -> N ; -- can guess declension and gender of some nouns given nominative
|
mkN : Str -> N ; -- can guess declension and gender of some nouns given nominative
|
||||||
mkN : Str -> Str -> NRelType -> N ;
|
mkN : Str -> NRelType -> A -> N ;
|
||||||
mkN : Str -> Gender -> Animacy -> N ;
|
mkN : Str -> Gender -> Animacy -> N ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> N ; -- can guess declension of more nouns
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> N ; -- can guess declension of more nouns
|
||||||
mkN : Str -> Gender -> Animacy -> (idx : Str) -> N ; -- Fourth parameter is a declension type index (based on Zaliznyak's dictionary), for example, "1*a(1)"
|
mkN : Str -> Gender -> Animacy -> (idx : Str) -> N ; -- Fourth parameter is a declension type index (based on Zaliznyak's dictionary), for example, "1*a(1)"
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> (idx : Str) -> N ;
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> (idx : Str) -> N ;
|
||||||
mkN : Str -> Gender -> Animacy -> (idx : Str) -> MaybeNumber -> N ;
|
mkN : Str -> Gender -> Animacy -> (idx : Str) -> MaybeNumber -> N ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> (idx : Str) -> MaybeNumber -> N ; -- Same, but number restrictions can be added
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> (idx : Str) -> MaybeNumber -> N ; -- Same, but number restrictions can be added
|
||||||
mkN : A -> Gender -> Animacy -> N ; -- for nouns, which decline as adjective
|
mkN : A -> Gender -> Animacy -> N ; -- for nouns, which decline as adjective
|
||||||
mkN : A -> Gender -> Animacy -> MaybeNumber -> N ; -- same, with possibility to limit number (usually to only_singular)
|
mkN : A -> Gender -> Animacy -> MaybeNumber -> N ; -- same, with possibility to limit number (usually to only_singular)
|
||||||
mkN : N -> (link : Str) -> N -> N ; -- compound noun. Link can end on "-", in which case parts are glued together. First one characterizes the whole.
|
mkN : N -> (link : Str) -> N -> N ; -- compound noun. Link can end on "-", in which case parts are glued together. First one characterizes the whole.
|
||||||
@@ -249,26 +249,26 @@ oper
|
|||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : Str -> N
|
mkN : Str -> N
|
||||||
= \nom -> lin N (guessNounForms nom (guessAdjectiveForms nonExist) GenType); -- the default type of compound
|
= \nom -> lin N (guessNounForms nom (guessAdjectiveForms nonExist) GenType); -- the default type of compound
|
||||||
mkN : Str -> Str-> NRelType -> N
|
mkN : Str -> NRelType -> A -> N
|
||||||
= \nom, rel, rt -> lin N (guessNounForms nom (guessAdjectiveForms rel) rt) ;
|
= \nom, rt, rel -> lin N (guessNounForms nom rel rt) ;
|
||||||
mkN : Str -> Animacy -> Str -> NRelType -> N
|
mkN : Str -> Animacy -> NRelType -> A -> N
|
||||||
= \nom,anim,rel,rt -> lin N (guessNounForms nom (guessAdjectiveForms rel) rt) ** {anim=anim} ;
|
= \nom,anim,rt,rel -> lin N (guessNounForms nom rel rt) ** {anim=anim} ;
|
||||||
mkN : Str -> Gender -> Animacy -> N
|
mkN : Str -> Gender -> Animacy -> N
|
||||||
= \nom, g, anim -> lin N (guessLessNounForms nom g anim (guessAdjectiveForms nonExist) GenType) ;
|
= \nom, g, anim -> lin N (guessLessNounForms nom g anim (guessAdjectiveForms nonExist) GenType) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> N
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> N
|
||||||
= \nom, g, anim, rel, rt -> lin N (guessLessNounForms nom g anim (guessAdjectiveForms rel) rt) ;
|
= \nom, g, anim, rt, rel -> lin N (guessLessNounForms nom g anim rel rt) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Z.ZNIndex -> N
|
mkN : Str -> Gender -> Animacy -> Z.ZNIndex -> N
|
||||||
= \word, g, anim, z -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType z)) ;
|
= \word, g, anim, z -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType z)) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> Z.ZNIndex -> N
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> Z.ZNIndex -> N
|
||||||
= \word, g, anim, rel, rt, z -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms rel) rt z)) ;
|
= \word, g, anim, rt, rel, z -> lin N (noMinorCases (Z.makeNoun word g anim rel rt z)) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> N
|
mkN : Str -> Gender -> Animacy -> Str -> N
|
||||||
= \word, g, anim, zi -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ;
|
= \word, g, anim, zi -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> Str -> N
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> Str -> N
|
||||||
= \word, g, anim, rel, rt, zi -> lin N (noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms rel) rt (Z.parseIndex zi))) ;
|
= \word, g, anim, rt, rel, zi -> lin N (noMinorCases (Z.makeNoun word g anim rel rt (Z.parseIndex zi))) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> MaybeNumber -> N
|
mkN : Str -> Gender -> Animacy -> Str -> MaybeNumber -> N
|
||||||
= \word, g, anim, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ** {mayben=mbn})) ;
|
= \word, g, anim, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms nonExist) GenType (Z.parseIndex zi))) ** {mayben=mbn})) ;
|
||||||
mkN : Str -> Gender -> Animacy -> Str -> NRelType -> Str -> MaybeNumber -> N
|
mkN : Str -> Gender -> Animacy -> NRelType -> A -> Str -> MaybeNumber -> N
|
||||||
= \word, g, anim, rel, rt, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim (guessAdjectiveForms rel) rt (Z.parseIndex zi))) ** {mayben=mbn})) ;
|
= \word, g, anim, rt, rel, zi, mbn -> lin N (applyMaybeNumber ((noMinorCases (Z.makeNoun word g anim rel rt (Z.parseIndex zi))) ** {mayben=mbn})) ;
|
||||||
mkN : A -> Gender -> Animacy -> N
|
mkN : A -> Gender -> Animacy -> N
|
||||||
= \a, g, anim -> lin N (makeNFFromAF a g anim) ;
|
= \a, g, anim -> lin N (makeNFFromAF a g anim) ;
|
||||||
mkN : A -> Gender -> Animacy -> MaybeNumber -> N
|
mkN : A -> Gender -> Animacy -> MaybeNumber -> N
|
||||||
|
|||||||
Reference in New Issue
Block a user