mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Jpn) Revert misunderstood fix about replaceCounter + update docs
This commit is contained in:
@@ -11,16 +11,15 @@ flags coding = utf8 ;
|
|||||||
True => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
True => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
||||||
++ "の" ++ cn.s ! det.n ! st ;
|
++ "の" ++ cn.s ! det.n ! st ;
|
||||||
False => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
False => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
||||||
++ cn.s ! det.n ! st
|
|
||||||
} ;
|
} ;
|
||||||
False => case <det.tenPlus, cn.counterTsu> of {
|
False => case <det.tenPlus, cn.counterTsu> of {
|
||||||
<True, True> => cn.object ! st ++ det.quant ! st ++ det.num ++ "個" ++ det.postpositive
|
<True, True> => cn.object ! st ++ det.quant ! st ++ det.num ++ "個" ++ det.postpositive
|
||||||
++ "の" ++ cn.s ! det.n ! st ;
|
++ "の" ++ cn.s ! det.n ! st ;
|
||||||
_ => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
_ => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.counter ++ det.postpositive
|
||||||
++ "の" ++ cn.s ! det.n ! st
|
++ "の" ++ cn.s ! det.n ! st
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
False => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.s ! det.n ! st
|
False => cn.object ! st ++ det.quant ! st ++ det.num ++ cn.s ! det.n ! st
|
||||||
} ;
|
} ;
|
||||||
prepositive = cn.prepositive ;
|
prepositive = cn.prepositive ;
|
||||||
needPart = True ;
|
needPart = True ;
|
||||||
@@ -31,7 +30,7 @@ flags coding = utf8 ;
|
|||||||
meaning = SomeoneElse ;
|
meaning = SomeoneElse ;
|
||||||
anim = cn.anim
|
anim = cn.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\st => pn.s ! st ;
|
s = \\st => pn.s ! st ;
|
||||||
prepositive = \\st => [] ;
|
prepositive = \\st => [] ;
|
||||||
@@ -40,7 +39,7 @@ flags coding = utf8 ;
|
|||||||
meaning = SomeoneElse ;
|
meaning = SomeoneElse ;
|
||||||
anim = pn.anim
|
anim = pn.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = pron.s ;
|
s = pron.s ;
|
||||||
prepositive = \\st => [] ;
|
prepositive = \\st => [] ;
|
||||||
@@ -52,7 +51,7 @@ flags coding = utf8 ;
|
|||||||
} ;
|
} ;
|
||||||
anim = pron.anim
|
anim = pron.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PredetNP p np = {
|
PredetNP p np = {
|
||||||
s = \\st => p.s ++ np.s ! st ;
|
s = \\st => p.s ++ np.s ! st ;
|
||||||
prepositive = np.prepositive ;
|
prepositive = np.prepositive ;
|
||||||
@@ -64,7 +63,7 @@ flags coding = utf8 ;
|
|||||||
meaning = np.meaning ;
|
meaning = np.meaning ;
|
||||||
anim = np.anim
|
anim = np.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = np ** {
|
PPartNP np v2 = np ** {
|
||||||
s = \\st => v2.pass ! Plain ! TPast ! Pos ++ np.s ! st ;
|
s = \\st => v2.pass ! Plain ! TPast ! Pos ++ np.s ! st ;
|
||||||
} ;
|
} ;
|
||||||
@@ -72,20 +71,20 @@ flags coding = utf8 ;
|
|||||||
AdvNP np adv = np ** {
|
AdvNP np adv = np ** {
|
||||||
s = \\st => case adv.prepositive of {
|
s = \\st => case adv.prepositive of {
|
||||||
True => np.s ! st ;
|
True => np.s ! st ;
|
||||||
False => adv.s ! st ++ np.s ! st
|
False => adv.s ! st ++ np.s ! st
|
||||||
} ;
|
} ;
|
||||||
prepositive = \\st => case adv.prepositive of {
|
prepositive = \\st => case adv.prepositive of {
|
||||||
True => adv.s ! st ;
|
True => adv.s ! st ;
|
||||||
False => []
|
False => []
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP = AdvNP ;
|
ExtAdvNP = AdvNP ;
|
||||||
|
|
||||||
RelNP np rs = np ** {
|
RelNP np rs = np ** {
|
||||||
s = \\st => rs.s ! np.anim ! st ++ np.s ! st
|
s = \\st => rs.s ! np.anim ! st ++ np.s ! st
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
s = det.sp ;
|
s = det.sp ;
|
||||||
prepositive = \\st => [] ;
|
prepositive = \\st => [] ;
|
||||||
@@ -97,7 +96,7 @@ flags coding = utf8 ;
|
|||||||
meaning = SomeoneElse ;
|
meaning = SomeoneElse ;
|
||||||
anim = Inanim -- not always, depends on the context
|
anim = Inanim -- not always, depends on the context
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuant quant num = {
|
DetQuant quant num = {
|
||||||
quant = quant.s ;
|
quant = quant.s ;
|
||||||
postpositive = num.postpositive ;
|
postpositive = num.postpositive ;
|
||||||
@@ -114,7 +113,7 @@ flags coding = utf8 ;
|
|||||||
no = quant.no ;
|
no = quant.no ;
|
||||||
tenPlus = num.tenPlus
|
tenPlus = num.tenPlus
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
quant = \\st => quant.s ! st ++ ord.attr ;
|
quant = \\st => quant.s ! st ++ ord.attr ;
|
||||||
postpositive = num.postpositive ;
|
postpositive = num.postpositive ;
|
||||||
@@ -133,15 +132,15 @@ flags coding = utf8 ;
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
NumSg = mkNum "" Sg ;
|
NumSg = mkNum "" Sg ;
|
||||||
|
|
||||||
NumPl = mkNum "" Pl ;
|
NumPl = mkNum "" Pl ;
|
||||||
|
|
||||||
NumCard card = card ** {inclCard = True} ;
|
NumCard card = card ** {inclCard = True} ;
|
||||||
|
|
||||||
NumDigits num = num ** {postpositive = []} ;
|
NumDigits num = num ** {postpositive = []} ;
|
||||||
|
|
||||||
NumNumeral num = num ** {postpositive = []} ;
|
NumNumeral num = num ** {postpositive = []} ;
|
||||||
|
|
||||||
AdNum adn card = case adn.postposition of {
|
AdNum adn card = case adn.postposition of {
|
||||||
True => {
|
True => {
|
||||||
s = card.s ;
|
s = card.s ;
|
||||||
@@ -154,11 +153,11 @@ flags coding = utf8 ;
|
|||||||
postpositive = [] ;
|
postpositive = [] ;
|
||||||
n = card.n ;
|
n = card.n ;
|
||||||
tenPlus = card.tenPlus
|
tenPlus = card.tenPlus
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
OrdDigits, OrdNumeral = mkOrd ; -- "banme"
|
OrdDigits, OrdNumeral = mkOrd ; -- "banme"
|
||||||
|
|
||||||
OrdSuperl a = {
|
OrdSuperl a = {
|
||||||
pred = \\st,t,p => "一番" ++ a.pred ! st ! t ! p ; -- "ichiban"
|
pred = \\st,t,p => "一番" ++ a.pred ! st ! t ! p ; -- "ichiban"
|
||||||
attr = "一番" ++ a.attr ;
|
attr = "一番" ++ a.attr ;
|
||||||
@@ -176,11 +175,11 @@ flags coding = utf8 ;
|
|||||||
adv = \\p => n.s ++ "番" ++ a.adv ! p ;
|
adv = \\p => n.s ++ "番" ++ a.adv ! p ;
|
||||||
dropNaEnging = n.s ++ "番" ++ a.dropNaEnging
|
dropNaEnging = n.s ++ "番" ++ a.dropNaEnging
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IndefArt = {s = \\st => "" ; sp = \\st => "何か" ; no = False} ;
|
IndefArt = {s = \\st => "" ; sp = \\st => "何か" ; no = False} ;
|
||||||
|
|
||||||
DefArt = {s = \\st => "" ; sp = \\st => "これ" ; no = False} ;
|
DefArt = {s = \\st => "" ; sp = \\st => "これ" ; no = False} ;
|
||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\st => cn.object ! st ++ cn.s ! Pl ! st ;
|
s = \\st => cn.object ! st ++ cn.s ! Pl ! st ;
|
||||||
prepositive = cn.prepositive ;
|
prepositive = cn.prepositive ;
|
||||||
@@ -189,40 +188,40 @@ flags coding = utf8 ;
|
|||||||
meaning = SomeoneElse ;
|
meaning = SomeoneElse ;
|
||||||
anim = cn.anim
|
anim = cn.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron pron = {
|
PossPron pron = {
|
||||||
s, sp = \\st => pron.s ! st ++ "の" ;
|
s, sp = \\st => pron.s ! st ++ "の" ;
|
||||||
no = False
|
no = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN n = n ** {
|
UseN n = n ** {
|
||||||
object = \\st => [] ;
|
object = \\st => [] ;
|
||||||
prepositive = \\st => [] ;
|
prepositive = \\st => [] ;
|
||||||
hasAttr = False ;
|
hasAttr = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplN2 n2 np = n2 ** {
|
ComplN2 n2 np = n2 ** {
|
||||||
object = \\st => n2.object ! st ++ np.s ! st ++ n2.prep ;
|
object = \\st => n2.object ! st ++ np.s ! st ++ n2.prep ;
|
||||||
prepositive = np.prepositive ;
|
prepositive = np.prepositive ;
|
||||||
hasAttr = False ;
|
hasAttr = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplN3 n3 np = n3 ** {
|
ComplN3 n3 np = n3 ** {
|
||||||
object = \\st => np.s ! st ++ n3.prep1 ;
|
object = \\st => np.s ! st ++ n3.prep1 ;
|
||||||
prepositive = np.prepositive ;
|
prepositive = np.prepositive ;
|
||||||
prep = n3.prep2 ;
|
prep = n3.prep2 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN2 n2 = n2 ** {
|
UseN2 n2 = n2 ** {
|
||||||
prepositive = \\st => [] ;
|
prepositive = \\st => [] ;
|
||||||
hasAttr = False ;
|
hasAttr = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Use2N3 n3 = n3 ** {
|
Use2N3 n3 = n3 ** {
|
||||||
object = \\st => [] ;
|
object = \\st => [] ;
|
||||||
prep = n3.prep1 ;
|
prep = n3.prep1 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Use3N3 n3 = n3 ** {
|
Use3N3 n3 = n3 ** {
|
||||||
object = \\st => [] ;
|
object = \\st => [] ;
|
||||||
prep = n3.prep2 ;
|
prep = n3.prep2 ;
|
||||||
@@ -231,7 +230,7 @@ flags coding = utf8 ;
|
|||||||
AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
s = \\n,st => case cn.hasAttr of {
|
s = \\n,st => case cn.hasAttr of {
|
||||||
False => ap.attr ! st ++ cn.s ! n ! st ;
|
False => ap.attr ! st ++ cn.s ! n ! st ;
|
||||||
True => ap.te ! st ! Pos ++ cn.s ! n ! st
|
True => ap.te ! st ! Pos ++ cn.s ! n ! st
|
||||||
} ;
|
} ;
|
||||||
hasAttr = True ;
|
hasAttr = True ;
|
||||||
} ;
|
} ;
|
||||||
@@ -239,29 +238,29 @@ flags coding = utf8 ;
|
|||||||
RelCN cn rs = cn ** {
|
RelCN cn rs = cn ** {
|
||||||
object = \\st => rs.s ! cn.anim ! st ++ cn.object ! st ;
|
object = \\st => rs.s ! cn.anim ! st ++ cn.object ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvCN cn adv = cn ** {
|
AdvCN cn adv = cn ** {
|
||||||
object = \\st => case adv.prepositive of {
|
object = \\st => case adv.prepositive of {
|
||||||
True => cn.object ! st ;
|
True => cn.object ! st ;
|
||||||
False => adv.s ! st ++ cn.object ! st
|
False => adv.s ! st ++ cn.object ! st
|
||||||
} ;
|
} ;
|
||||||
prepositive = \\st => case adv.prepositive of {
|
prepositive = \\st => case adv.prepositive of {
|
||||||
True => adv.s ! st ;
|
True => adv.s ! st ;
|
||||||
False => []
|
False => []
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentCN cn sc = cn ** {
|
SentCN cn sc = cn ** {
|
||||||
object = \\st => sc.s ! Ga ! st ++ cn.object ! st ;
|
object = \\st => sc.s ! Ga ! st ++ cn.object ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ApposCN cn np = cn ** {
|
ApposCN cn np = cn ** {
|
||||||
s = \\n,st => np.s ! st ++ cn.s ! n ! st ;
|
s = \\n,st => np.s ! st ++ cn.s ! n ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossNP cn np = cn ** { -- house of Paris, house of mine
|
PossNP cn np = cn ** { -- house of Paris, house of mine
|
||||||
s = \\n,st => np.s ! st ++ "の" ++ cn.s ! n ! st ;
|
s = \\n,st => np.s ! st ++ "の" ++ cn.s ! n ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PartNP = PossNP ;
|
PartNP = PossNP ;
|
||||||
|
|
||||||
@@ -277,13 +276,13 @@ flags coding = utf8 ;
|
|||||||
AdjDAP dap ap = lin Det {
|
AdjDAP dap ap = lin Det {
|
||||||
quant = \\st => dap.quant ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
quant = \\st => dap.quant ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
||||||
num = dap.num ;
|
num = dap.num ;
|
||||||
postpositive = dap.postpositive ;
|
postpositive = dap.postpositive ;
|
||||||
n = dap.n ;
|
n = dap.n ;
|
||||||
inclCard = dap.inclCard ;
|
inclCard = dap.inclCard ;
|
||||||
sp = \\st => dap.sp ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
sp = \\st => dap.sp ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
||||||
no = dap.no ;
|
no = dap.no ;
|
||||||
tenPlus = dap.tenPlus
|
tenPlus = dap.tenPlus
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetDAP det = det ;
|
DetDAP det = det ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ oper
|
|||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : (man : Str) -> N -- Inanimate noun. Counter is つ and not replaceable.
|
mkN : (man : Str) -> N -- Inanimate noun. Counter is つ and not replaceable.
|
||||||
= \n -> lin N (regNoun n Inanim "つ" False True) ; ---- AR 15/11/2014
|
= \n -> lin N (regNoun n Inanim "つ" False True) ; ---- AR 15/11/2014
|
||||||
mkN : (man : Str) -> (anim : Animacy) -> N -- Animacy given as argument. Counter is つ and not replaceable.
|
mkN : (man : Str) -> (anim : Animacy) -> N -- Animacy given as argument. Counter is つ and doesn't replace the noun.
|
||||||
= \n,a -> lin N (regNoun n a "つ" False True) ;
|
= \n,a -> lin N (regNoun n a "つ" False True) ;
|
||||||
mkN : (kane,okane : Str) -> (anim : Animacy) -> N -- Style variation (plain, respectful) and animacy given. Counter is つ and not replaceable.
|
mkN : (kane,okane : Str) -> (anim : Animacy) -> N -- Style variation (plain, respectful) and animacy given. Counter is つ and doesn't replace the noun.
|
||||||
= \kane,okane,a -> lin N (styleNoun kane okane a "つ" False True) ;
|
= \kane,okane,a -> lin N (styleNoun kane okane a "つ" False True) ;
|
||||||
mkN : (man : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> N -- No style variation. Arguments are animacy, counter and whether counter is replaceable.
|
mkN : (man : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> N -- No style variation. Arguments are animacy, counter and whether counter replaces the noun.
|
||||||
= \n,a,c,b -> lin N (regNoun n a c b False) ;
|
= \n,a,c,b -> lin N (regNoun n a c b False) ;
|
||||||
mkN : (man : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> (men : Str) -> N -- Like previous, but unpredictable plural.
|
mkN : (man : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> (men : Str) -> N -- Like previous, but unpredictable plural.
|
||||||
= \n,a,c,b,pl -> lin N (numberNoun n a c b pl False) ;
|
= \n,a,c,b,pl -> lin N (numberNoun n a c b pl False) ;
|
||||||
mkN : (kane,okane : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> N -- Style variation, animacy, counter and whether counter is replaceable.
|
mkN : (kane,okane : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> N -- Style variation, animacy, counter and whether counter replaces the noun.
|
||||||
= \kane,okane,a,c,b -> lin N (styleNoun kane okane a c b False) ;
|
= \kane,okane,a,c,b -> lin N (styleNoun kane okane a c b False) ;
|
||||||
mkN : (tsuma,okusan : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> (tsumatachi : Str) -> N -- Worst case paradigm: style variation, animacy, counter, whether counter is replaceable and unpredictable plural.
|
mkN : (tsuma,okusan : Str) -> (anim : Animacy) -> (counter : Str) -> (counterReplace : Bool) -> (tsumatachi : Str) -> N -- Worst case paradigm: style variation, animacy, counter, whether counter replaces the noun and unpredictable plural.
|
||||||
= \tsuma,okusan,a,c,b,tsumatachi ->
|
= \tsuma,okusan,a,c,b,tsumatachi ->
|
||||||
lin N (mkNoun tsuma okusan tsumatachi tsumatachi a c b False)
|
lin N (mkNoun tsuma okusan tsumatachi tsumatachi a c b False)
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user