mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
Jpn13-01-15
This commit is contained in:
@@ -51,6 +51,7 @@ flags coding = utf8 ;
|
|||||||
Card = {s : Str ; postpositive : Str ; n : Number ; tenPlus : Bool} ;
|
Card = {s : Str ; postpositive : Str ; n : Number ; tenPlus : Bool} ;
|
||||||
Ord = Adj ; -- {pred : Style => TTense => Polarity => Str ; attr, adv,
|
Ord = Adj ; -- {pred : Style => TTense => Polarity => Str ; attr, adv,
|
||||||
-- dropNaEnging : Str ; te, ba : Polarity => Str} ;
|
-- dropNaEnging : Str ; te, ba : Polarity => Str} ;
|
||||||
|
DAP = Det ;
|
||||||
Numeral = {s : Str ; n : Number ; tenPlus : Bool} ;
|
Numeral = {s : Str ; n : Number ; tenPlus : Bool} ;
|
||||||
Digits = {s : Str ; n : Number ; tenPlus : Bool ; tail : DTail} ;
|
Digits = {s : Str ; n : Number ; tenPlus : Bool ; tail : DTail} ;
|
||||||
Conj = Conjunction ; -- {s : Str ; null : Str ; type : ConjType} ;
|
Conj = Conjunction ; -- {s : Str ; null : Str ; type : ConjType} ;
|
||||||
|
|||||||
@@ -22,11 +22,20 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
pred = s.predOr ;
|
pred = s.predOr ;
|
||||||
pred_te = s.pred_teOr ;
|
pred_te = s.pred_teOr ;
|
||||||
pred_ba = s.pred_baOr
|
pred_ba = s.pred_baOr
|
||||||
|
} ;
|
||||||
|
IfConj => {
|
||||||
|
s = \\part,st => conj.null ++ s.if ! part ! st ;
|
||||||
|
te = \\part,st => conj.null ++ s.teIf ! part ! st ;
|
||||||
|
ba = \\part,st => conj.null ++ s.baIf ! part ! st ;
|
||||||
|
subj = \\part,st => conj.null ++ s.subj ! part ! st ;
|
||||||
|
pred = s.predIf ;
|
||||||
|
pred_te = s.pred_teIf ;
|
||||||
|
pred_ba = s.pred_baIf
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjRS conj rs = case conj.type of {
|
ConjRS conj rs = case conj.type of {
|
||||||
(And | Both) => {
|
(And | Both | IfConj) => { -- "if.. then" is hardly possible
|
||||||
s = \\a,st => conj.null ++ rs.and ! a ! st ;
|
s = \\a,st => conj.null ++ rs.and ! a ! st ;
|
||||||
te = \\a,st => conj.null ++ rs.teAnd ! a ! st ;
|
te = \\a,st => conj.null ++ rs.teAnd ! a ! st ;
|
||||||
pred = \\a,st => conj.null ++ rs.predAnd ! a ! st ;
|
pred = \\a,st => conj.null ++ rs.predAnd ! a ! st ;
|
||||||
@@ -47,7 +56,7 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ap = case conj.type of {
|
ConjAP conj ap = case conj.type of {
|
||||||
(And | Both) => {
|
(And | Both | IfConj) => { -- "if.. then" is hardly possible
|
||||||
pred = \\st,t,p => conj.null ++ ap.s1and ! st ! p ++ ap.s2pred ! st ! t ! p ;
|
pred = \\st,t,p => conj.null ++ ap.s1and ! st ! p ++ ap.s2pred ! st ! t ! p ;
|
||||||
attr = \\st => conj.null ++ ap.s1and ! st ! Pos ++ ap.s2attr ! st ;
|
attr = \\st => conj.null ++ ap.s1and ! st ! Pos ++ ap.s2attr ! st ;
|
||||||
te = \\st,p => conj.null ++ ap.s1and ! st ! p ++ ap.s2te ! st ! p ;
|
te = \\st,p => conj.null ++ ap.s1and ! st ! p ++ ap.s2te ! st ! p ;
|
||||||
@@ -71,7 +80,7 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
|
|
||||||
ConjAdv conj adv = {
|
ConjAdv conj adv = {
|
||||||
s = \\st => case conj.type of {
|
s = \\st => case conj.type of {
|
||||||
(And | Both) => conj.null ++ adv.and ! st ;
|
(And | Both | IfConj) => conj.null ++ adv.and ! st ; -- "if.. then" is hardly possible
|
||||||
Or => conj.null ++ adv.or ! st
|
Or => conj.null ++ adv.or ! st
|
||||||
} ;
|
} ;
|
||||||
prepositive = adv.prepositive
|
prepositive = adv.prepositive
|
||||||
@@ -79,20 +88,20 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
|
|
||||||
ConjAdV conj adv = {
|
ConjAdV conj adv = {
|
||||||
s = case conj.type of {
|
s = case conj.type of {
|
||||||
(And | Both) => conj.null ++ adv.and ;
|
(And | Both | IfConj) => conj.null ++ adv.and ; -- "if.. then" is hardly possible
|
||||||
Or => conj.null ++ adv.or
|
Or => conj.null ++ adv.or
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjNP conj np = {
|
ConjNP conj np = {
|
||||||
s = \\st => case conj.type of {
|
s = \\st => case conj.type of {
|
||||||
And => conj.null ++ np.and ! st ;
|
And | IfConj => conj.null ++ np.and ! st ; -- "if.. then" is hardly possible
|
||||||
Or => conj.null ++ np.or ! st ;
|
Or => conj.null ++ np.or ! st ;
|
||||||
Both => conj.null ++ np.both ! st
|
Both => conj.null ++ np.both ! st
|
||||||
} ;
|
} ;
|
||||||
prepositive = np.prepositive ;
|
prepositive = np.prepositive ;
|
||||||
needPart = case conj.type of {
|
needPart = case conj.type of {
|
||||||
(And|Or) => np.needPart ;
|
(And|Or|IfConj) => np.needPart ;
|
||||||
Both => False
|
Both => False
|
||||||
} ;
|
} ;
|
||||||
changePolar = np.changePolar ;
|
changePolar = np.changePolar ;
|
||||||
@@ -108,7 +117,7 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
|
|
||||||
ConjCN conj cn = {
|
ConjCN conj cn = {
|
||||||
s = \\n,st => case conj.type of {
|
s = \\n,st => case conj.type of {
|
||||||
(And|Both) => conj.null ++ cn.and ! n ! st ;
|
(And|Both|IfConj) => conj.null ++ cn.and ! n ! st ;
|
||||||
Or => conj.null ++ cn.or ! n ! st
|
Or => conj.null ++ cn.or ! n ! st
|
||||||
} ;
|
} ;
|
||||||
anim = cn.anim ;
|
anim = cn.anim ;
|
||||||
@@ -119,37 +128,69 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
hasAttr = cn.hasAttr ;
|
hasAttr = cn.hasAttr ;
|
||||||
counterTsu = cn.counterTsu
|
counterTsu = cn.counterTsu
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ConjDet conj dap = {
|
||||||
|
quant = \\st => case conj.type of {
|
||||||
|
(And|Both|IfConj) => conj.null ++ dap.quantAnd ! st ;
|
||||||
|
Or => conj.null ++ dap.quantOr ! st
|
||||||
|
} ;
|
||||||
|
num = case conj.type of {
|
||||||
|
(And|Both|IfConj) => conj.null ++ dap.numAnd ;
|
||||||
|
Or => conj.null ++ dap.numOr
|
||||||
|
} ;
|
||||||
|
postpositive = dap.postpositive ;
|
||||||
|
n = dap.n ;
|
||||||
|
inclCard = dap.inclCard ;
|
||||||
|
sp = \\st => case conj.type of {
|
||||||
|
(And|Both|IfConj) => conj.null ++ dap.spAnd ! st ;
|
||||||
|
Or => conj.null ++ dap.spOr ! st
|
||||||
|
} ;
|
||||||
|
no = dap.no ;
|
||||||
|
tenPlus = dap.tenPlus
|
||||||
|
} ;
|
||||||
|
|
||||||
BaseS x y = {
|
BaseS x y = {
|
||||||
and = \\part,st => x.s ! part ! st ++ "、" ++ "そして" ++ y.s ! Ga ! st ;
|
and = \\part,st => x.s ! part ! st ++ "、" ++ "そして" ++ y.s ! Ga ! st ;
|
||||||
or = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.s ! Ga ! st ;
|
or = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.s ! Ga ! st ;
|
||||||
|
if = \\part,st => x.subj ! part ! st ++ x.pred ! Plain ++ "と、 " ++ y.s ! Ga ! st ;
|
||||||
teAnd = \\part,st => x.te ! part ! st ++ "、" ++ y.te ! Ga ! st ;
|
teAnd = \\part,st => x.te ! part ! st ++ "、" ++ y.te ! Ga ! st ;
|
||||||
teOr = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.te ! Ga ! st ;
|
teOr = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.te ! Ga ! st ;
|
||||||
|
teIf = \\part,st => x.subj ! part ! st ++ x.pred ! Plain ++ "と、 " ++ y.te ! Ga ! st ;
|
||||||
baAnd = \\part,st => x.ba ! part ! st ++ "、" ++ y.ba ! Ga ! st ;
|
baAnd = \\part,st => x.ba ! part ! st ++ "、" ++ y.ba ! Ga ! st ;
|
||||||
baOr = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.ba ! Ga ! st ;
|
baOr = \\part,st => x.s ! part ! st ++ "、" ++ "それとも" ++ y.ba ! Ga ! st ;
|
||||||
|
baIf = \\part,st => x.subj ! part ! st ++ x.pred ! Plain ++ "と、 " ++ y.ba ! Ga ! st ;
|
||||||
subj = \\part,st => x.subj ! part ! st ;
|
subj = \\part,st => x.subj ! part ! st ;
|
||||||
predAnd = \\st => x.pred ! st ++ "、" ++ "そして" ++ y.s ! Ga ! st ;
|
predAnd = \\st => x.pred ! st ++ "、" ++ "そして" ++ y.s ! Ga ! st ;
|
||||||
predOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.s ! Ga ! st ;
|
predOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.s ! Ga ! st ;
|
||||||
|
predIf = \\st => x.pred ! Plain ++ "と、 " ++ y.s ! Ga ! st ;
|
||||||
pred_teAnd = \\st => x.pred_te ! st ++ "、" ++ y.te ! Ga ! st ;
|
pred_teAnd = \\st => x.pred_te ! st ++ "、" ++ y.te ! Ga ! st ;
|
||||||
pred_teOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.te ! Ga ! st ;
|
pred_teOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.te ! Ga ! st ;
|
||||||
|
pred_teIf = \\st => x.pred ! Plain ++ "と、 " ++ y.te ! Ga ! st ;
|
||||||
pred_baAnd = \\st => x.pred_ba ! st ++ "、" ++ y.ba ! Ga ! st ;
|
pred_baAnd = \\st => x.pred_ba ! st ++ "、" ++ y.ba ! Ga ! st ;
|
||||||
pred_baOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.ba ! Ga ! st ;
|
pred_baOr = \\st => x.pred ! st ++ "、" ++ "それとも" ++ y.ba ! Ga ! st ;
|
||||||
|
pred_baIf = \\st => x.pred ! Plain ++ "と、 " ++ y.ba ! Ga ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConsS x xs = {
|
ConsS x xs = {
|
||||||
and = \\part,st => xs.and ! part ! st ++ "、" ++ "そして" ++ x.s ! Ga ! st ;
|
and = \\part,st => xs.and ! part ! st ++ "、" ++ "そして" ++ x.s ! Ga ! st ;
|
||||||
or = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.s ! Ga ! st ;
|
or = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.s ! Ga ! st ;
|
||||||
|
if = \\part,st => xs.if ! part ! Plain ++ "と、 " ++ x.s ! Ga ! st ;
|
||||||
teAnd = \\part,st => xs.teAnd ! part ! st ++ "、" ++ x.te ! Ga ! st ;
|
teAnd = \\part,st => xs.teAnd ! part ! st ++ "、" ++ x.te ! Ga ! st ;
|
||||||
teOr = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.te ! Ga ! st ;
|
teOr = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.te ! Ga ! st ;
|
||||||
|
teIf = \\part,st => xs.if ! part ! Plain ++ "と、 " ++ x.te ! Ga ! st ;
|
||||||
baAnd = \\part,st => xs.baAnd ! part ! st ++ "、" ++ x.ba ! Ga ! st ;
|
baAnd = \\part,st => xs.baAnd ! part ! st ++ "、" ++ x.ba ! Ga ! st ;
|
||||||
baOr = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.ba ! Ga ! st ;
|
baOr = \\part,st => xs.or ! part ! st ++ "、" ++ "それとも" ++ x.ba ! Ga ! st ;
|
||||||
|
baIf = \\part,st => xs.if ! part ! Plain ++ "と、 " ++ x.ba ! Ga ! st ;
|
||||||
subj = xs.subj ;
|
subj = xs.subj ;
|
||||||
predAnd = \\st => xs.predAnd ! st ++ "、" ++ "そして" ++ x.s ! Ga ! st ;
|
predAnd = \\st => xs.predAnd ! st ++ "、" ++ "そして" ++ x.s ! Ga ! st ;
|
||||||
predOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.s ! Ga ! st ;
|
predOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.s ! Ga ! st ;
|
||||||
|
predIf = \\st => xs.predIf ! Plain ++ "と、 " ++ x.s ! Ga ! st ;
|
||||||
pred_teAnd = \\st => xs.pred_teAnd ! st ++ "、" ++ x.te ! Ga ! st ;
|
pred_teAnd = \\st => xs.pred_teAnd ! st ++ "、" ++ x.te ! Ga ! st ;
|
||||||
pred_teOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.te ! Ga ! st ;
|
pred_teOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.te ! Ga ! st ;
|
||||||
|
pred_teIf = \\st => xs.predIf ! Plain ++ "と、 " ++ x.te ! Ga ! st ;
|
||||||
pred_baAnd = \\st => xs.pred_baAnd ! st ++ "、" ++ x.ba ! Ga ! st ;
|
pred_baAnd = \\st => xs.pred_baAnd ! st ++ "、" ++ x.ba ! Ga ! st ;
|
||||||
pred_baOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.ba ! Ga ! st ;
|
pred_baOr = \\st => xs.predOr ! st ++ "、" ++ "それとも" ++ x.ba ! Ga ! st ;
|
||||||
|
pred_baIf = \\st => xs.predIf ! Plain ++ "と、 " ++ x.ba ! Ga ! st ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
BaseRS x y = {
|
BaseRS x y = {
|
||||||
@@ -349,11 +390,65 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
hasAttr = x.hasAttr ;
|
hasAttr = x.hasAttr ;
|
||||||
counterTsu = xs.counterTsu
|
counterTsu = xs.counterTsu
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
BaseDAP x y = {
|
||||||
|
quantAnd = \\st => x.quant ! st ++ "と" ++ y.quant ! st ;
|
||||||
|
quantOr = \\st => x.quant ! st ++ "か" ++ y.quant ! st ;
|
||||||
|
numAnd = x.num ++ "と" ++ y.num ;
|
||||||
|
numOr = x.num ++ "か" ++ y.num ;
|
||||||
|
postpositive = x.postpositive ++ y.postpositive ;
|
||||||
|
n = case <x.n, y.n> of {
|
||||||
|
<Sg, Sg> => Sg ;
|
||||||
|
_ => Pl
|
||||||
|
} ;
|
||||||
|
inclCard = case <x.inclCard, y.inclCard> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
} ;
|
||||||
|
spAnd = \\st => x.sp ! st ++ "と" ++ y.sp ! st ;
|
||||||
|
spOr = \\st => x.sp ! st ++ "か" ++ y.sp ! st ;
|
||||||
|
no = case <x.no, y.no> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
} ;
|
||||||
|
tenPlus = case <x.tenPlus, y.tenPlus> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConsDAP x xs = {
|
||||||
|
quantAnd = \\st => x.quant ! st ++ "と" ++ xs.quantAnd ! st ;
|
||||||
|
quantOr = \\st => x.quant ! st ++ "か" ++ xs.quantOr ! st ;
|
||||||
|
numAnd = x.num ++ "と" ++ xs.numAnd ;
|
||||||
|
numOr = x.num ++ "か" ++ xs.numOr ;
|
||||||
|
postpositive = x.postpositive ++ xs.postpositive ;
|
||||||
|
n = case <x.n, xs.n> of {
|
||||||
|
<Sg, Sg> => Sg ;
|
||||||
|
_ => Pl
|
||||||
|
} ;
|
||||||
|
inclCard = case <x.inclCard, xs.inclCard> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
} ;
|
||||||
|
spAnd = \\st => x.sp ! st ++ "と" ++ xs.spAnd ! st ;
|
||||||
|
spOr = \\st => x.sp ! st ++ "か" ++ xs.spOr ! st ;
|
||||||
|
no = case <x.no, xs.no> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
} ;
|
||||||
|
tenPlus = case <x.tenPlus, xs.tenPlus> of {
|
||||||
|
<False, False> => False ;
|
||||||
|
_ => True
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|
||||||
[S] = {and, or, teAnd, teOr, baAnd, baOr, subj : Particle => Style => Str ;
|
[S] = {and, or, if, teAnd, teOr, teIf, baAnd,
|
||||||
predAnd, predOr, pred_teAnd, pred_teOr, pred_baAnd, pred_baOr : Style => Str} ;
|
baOr, baIf, subj : Particle => Style => Str ;
|
||||||
|
predAnd, predOr, predIf, pred_teAnd, pred_teOr,
|
||||||
|
pred_teIf, pred_baAnd, pred_baOr, pred_baIf : Style => Str} ;
|
||||||
|
|
||||||
[RS] = {and, or, teAnd, teOr, predAnd, predOr, pred_teAnd, pred_teOr, pred_baAnd,
|
[RS] = {and, or, teAnd, teOr, predAnd, predOr, pred_teAnd, pred_teOr, pred_baAnd,
|
||||||
pred_baOr : Animateness => Style => Str ; subj : Particle => Style => Str ;
|
pred_baOr : Animateness => Style => Str ; subj : Particle => Style => Str ;
|
||||||
@@ -375,4 +470,8 @@ concrete ConjunctionJpn of Conjunction = CatJpn ** open ResJpn, Prelude in {
|
|||||||
[CN] = {and, or : Number => Style => Str ; anim : Animateness ; counter : Str ;
|
[CN] = {and, or : Number => Style => Str ; anim : Animateness ; counter : Str ;
|
||||||
counterReplace : Bool ; object : Style => Str ; prepositive : Style => Str ;
|
counterReplace : Bool ; object : Style => Str ; prepositive : Style => Str ;
|
||||||
hasAttr : Bool ; counterTsu : Bool} ;
|
hasAttr : Bool ; counterTsu : Bool} ;
|
||||||
|
|
||||||
|
[DAP] = {quantAnd, quantOr : Style => Str ; numAnd, numOr : Str ;
|
||||||
|
postpositive : Str ; n : Number ; inclCard : Bool ;
|
||||||
|
spAnd, spOr : Style => Str ; no : Bool ; tenPlus : Bool} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ flags coding = utf8 ;
|
|||||||
meaning = np.meaning ;
|
meaning = np.meaning ;
|
||||||
anim = np.anim
|
anim = np.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ExtAdvNP = AdvNP ;
|
||||||
|
|
||||||
RelNP np rs = {
|
RelNP np rs = {
|
||||||
s = \\st => rs.s ! np.anim ! st ++ np.s ! st ;
|
s = \\st => rs.s ! np.anim ! st ++ np.s ! st ;
|
||||||
@@ -194,6 +196,15 @@ flags coding = utf8 ;
|
|||||||
adv = \\p => "一番" ++ a.adv ! p ;
|
adv = \\p => "一番" ++ a.adv ! p ;
|
||||||
dropNaEnging = "一番" ++ a.dropNaEnging
|
dropNaEnging = "一番" ++ a.dropNaEnging
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
OrdNumeralSuperl n a = {
|
||||||
|
pred = \\st,t,p => n.s ++ "番" ++ a.pred ! st ! t ! p ; -- "ichiban"
|
||||||
|
attr = n.s ++ "番" ++ a.attr ;
|
||||||
|
te = \\p => n.s ++ "番" ++ a.te ! p ;
|
||||||
|
ba = \\p => n.s ++ "番" ++ a.ba ! p ;
|
||||||
|
adv = \\p => n.s ++ "番" ++ a.adv ! p ;
|
||||||
|
dropNaEnging = n.s ++ "番" ++ a.dropNaEnging
|
||||||
|
} ;
|
||||||
|
|
||||||
IndefArt = {s = \\st => "" ; sp = \\st => "何か" ; no = False} ;
|
IndefArt = {s = \\st => "" ; sp = \\st => "何か" ; no = False} ;
|
||||||
|
|
||||||
@@ -340,4 +351,42 @@ flags coding = utf8 ;
|
|||||||
counterReplace = cn.counterReplace ;
|
counterReplace = cn.counterReplace ;
|
||||||
counterTsu = cn.counterTsu
|
counterTsu = cn.counterTsu
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
PossNP cn np = { -- house of Paris, house of mine
|
||||||
|
s = \\n,st => np.s ! st ++ "の" ++ cn.s ! n ! st ;
|
||||||
|
object = cn.object ;
|
||||||
|
prepositive = cn.prepositive ;
|
||||||
|
hasAttr = cn.hasAttr ;
|
||||||
|
anim = cn.anim ;
|
||||||
|
counter = cn.counter ;
|
||||||
|
counterReplace = cn.counterReplace ;
|
||||||
|
counterTsu = cn.counterTsu
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PartNP = PossNP ;
|
||||||
|
|
||||||
|
CountNP det np = {
|
||||||
|
s = \\st => np.s ! st ++ "の" ++ det.sp ! st ;
|
||||||
|
prepositive = np.prepositive ;
|
||||||
|
needPart = True ;
|
||||||
|
changePolar = case det.no of {
|
||||||
|
True => True ;
|
||||||
|
False => False
|
||||||
|
} ;
|
||||||
|
meaning = SomeoneElse ;
|
||||||
|
anim = np.anim
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjDAP dap ap = lin Det {
|
||||||
|
quant = \\st => dap.quant ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
||||||
|
num = dap.num ;
|
||||||
|
postpositive = dap.postpositive ;
|
||||||
|
n = dap.n ;
|
||||||
|
inclCard = dap.inclCard ;
|
||||||
|
sp = \\st => dap.sp ! st ++ ap.prepositive ! st ++ ap.attr ! st ;
|
||||||
|
no = dap.no ;
|
||||||
|
tenPlus = dap.tenPlus
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetDAP det = det ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ resource ParadigmsJpn = CatJpn **
|
|||||||
|
|
||||||
flags coding = utf8 ;
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
param
|
||||||
|
|
||||||
|
VerbGroupP = Gr1P | Gr2P | SuruP | KuruP ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
@@ -60,25 +64,56 @@ oper
|
|||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : (yomu : Str) -> V
|
mkV : (yomu : Str) -> V
|
||||||
= \yomu -> lin V (mkVerb yomu Gr1) ; ---- AR 15/11/2014
|
= \yomu -> lin V (mkVerb yomu Gr1) ; ---- AR 15/11/2014
|
||||||
mkV : (yomu : Str) -> (group : VerbGroup) -> V
|
mkV : (yomu : Str) -> (group : ResJpn.VerbGroup) -> V
|
||||||
= \yomu,gr -> lin V (mkVerb yomu gr) ;
|
= \yomu,gr -> lin V (mkVerb yomu gr) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : (yomu : Str) -> V2 ---- AR 15/11/2014
|
mkV2 : (yomu : Str) -> V2 ---- AR 15/11/2014
|
||||||
= \yomu -> lin V2 (mkVerb2 yomu "を" Gr1) ;
|
= \yomu -> lin V2 (mkVerb2 yomu "を" Gr1) ;
|
||||||
mkV2 : (yomu, prep : Str) -> (group : VerbGroup) -> V2
|
mkV2 : (yomu, prep : Str) -> (group : ResJpn.VerbGroup) -> V2
|
||||||
= \yomu,p,gr -> lin V2 (mkVerb2 yomu p gr) ;
|
= \yomu,p,gr -> lin V2 (mkVerb2 yomu p gr) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV3 : (uru, p1, p2 : Str) -> (group : VerbGroup) -> V3 = \uru,p1,p2,gr ->
|
mkV3 = overload {
|
||||||
|
mkV3 : (yomu : Str) -> V3
|
||||||
|
= \yomu -> lin V3 (mkVerb3 yomu "に" "を" Gr1) ;
|
||||||
|
mkV3 : (uru, p1, p2 : Str) -> (group : ResJpn.VerbGroup) -> V3 = \uru,p1,p2,gr ->
|
||||||
lin V3 (mkVerb3 uru p1 p2 gr) ;
|
lin V3 (mkVerb3 uru p1 p2 gr) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkVS : (yomu : Str) -> VS = \yomu -> lin VS (mkVerb2 yomu "ことを" Gr1) ;
|
||||||
|
|
||||||
|
mkVV : (yomu : Str) -> VV = \yomu -> lin VV (mkVerbV yomu Gr1) ;
|
||||||
|
|
||||||
|
mkV2V : (yomu : Str) -> V2V = \yomu -> lin V2V (mkVerb yomu Gr1) ;
|
||||||
|
|
||||||
|
mkV2S : (yomu : Str) -> V2S = \yomu -> lin V2S (mkVerb yomu Gr1) ;
|
||||||
|
|
||||||
|
mkVQ : (yomu : Str) -> VQ = \yomu -> lin VQ (mkVerb2 yomu "を" Gr1) ;
|
||||||
|
|
||||||
|
mkVA : (yomu : Str) -> VA = \yomu -> lin VA (mkVerb yomu Gr1) ;
|
||||||
|
|
||||||
|
mkV2A : (yomu : Str) -> V2A = \yomu -> lin V2A (mkVerb yomu Gr1) ;
|
||||||
|
|
||||||
mkAdv : Str -> Adv ---- AR 15/11/2014
|
mkAdv : Str -> Adv ---- AR 15/11/2014
|
||||||
= \s -> lin Adv (ResJpn.mkAdv s) ;
|
= \s -> lin Adv (ResJpn.mkAdv s) ;
|
||||||
|
|
||||||
mkPrep : Str -> Prep ---- AR 15/11/2014
|
mkPrep : Str -> Prep ---- AR 15/11/2014
|
||||||
= \s -> lin Prep (ResJpn.mkPrep s) ;
|
= \s -> lin Prep (ResJpn.mkPrep s) ;
|
||||||
|
|
||||||
|
mkDet : Str -> Det = \d -> lin Det (ResJpn.mkDet d d ResJpn.Sg) ;
|
||||||
|
|
||||||
|
mkConj : Str -> Conj = \c -> lin Conj (ResJpn.mkConj c ResJpn.And) ;
|
||||||
|
|
||||||
|
mkInterj : Str -> Interj
|
||||||
|
= \s -> lin Interj (ss s) ;
|
||||||
|
|
||||||
|
mkgoVV : VV = lin VV {s = \\sp => mkGo.s ; te = \\sp => mkGo.te ;
|
||||||
|
a_stem = \\sp => mkGo.a_stem ;
|
||||||
|
i_stem = \\sp => mkGo.i_stem ;
|
||||||
|
ba = \\sp => mkGo.ba ;
|
||||||
|
te_neg = \\sp => "行かないで" ;
|
||||||
|
ba_neg = \\sp => "行かなければ" ;
|
||||||
|
sense = Abil} ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ param
|
|||||||
Anteriority = Simul | Anter ;
|
Anteriority = Simul | Anter ;
|
||||||
NumeralType = EndZero | EndNotZero | SingleDigit ;
|
NumeralType = EndZero | EndNotZero | SingleDigit ;
|
||||||
DTail = T1 | T2 | T3 ;
|
DTail = T1 | T2 | T3 ;
|
||||||
ConjType = And | Or | Both ;
|
ConjType = And | Or | Both | IfConj ;
|
||||||
SubjType = That | If | OtherSubj ;
|
SubjType = That | If | OtherSubj ;
|
||||||
VocType = VocPres | Please | VocAbs ;
|
VocType = VocPres | Please | VocAbs ;
|
||||||
UttType = Imper | ImpPolite | NoImp ;
|
UttType = Imper | ImpPolite | NoImp ;
|
||||||
@@ -85,7 +85,7 @@ oper
|
|||||||
|
|
||||||
regAdj : Str -> Adj = \a -> case a of {
|
regAdj : Str -> Adj = \a -> case a of {
|
||||||
chiisa + "い" => i_mkAdj a ;
|
chiisa + "い" => i_mkAdj a ;
|
||||||
ooki + ("な"|"の") => na_mkAdj a
|
_ => na_mkAdj a -- ooki + ("な"|"の") => na_mkAdj a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
i_mkAdj : Str -> Adj = \chiisai ->
|
i_mkAdj : Str -> Adj = \chiisai ->
|
||||||
@@ -488,6 +488,15 @@ oper
|
|||||||
sense = Oblig
|
sense = Oblig
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkVerbV : Str -> VerbGroup -> VV = \yomu,gr -> {
|
||||||
|
s = \\sp,st,t,p => (mkVerb yomu gr).s ! st ! t ! p ;
|
||||||
|
te = \\sp => (mkVerb yomu gr).te ;
|
||||||
|
a_stem = \\sp => (mkVerb yomu gr).a_stem ;
|
||||||
|
i_stem = \\sp => (mkVerb yomu gr).i_stem ;
|
||||||
|
ba = \\sp => (mkVerb yomu gr).ba ;
|
||||||
|
sense = Abil
|
||||||
|
} ;
|
||||||
|
|
||||||
mkGive : Verb3 = {
|
mkGive : Verb3 = {
|
||||||
s = table {
|
s = table {
|
||||||
Me => \\st,t,p => (mkVerb "呉れる" Gr2).s ! st ! t ! p ; -- "kureru"
|
Me => \\st,t,p => (mkVerb "呉れる" Gr2).s ! st ! t ! p ; -- "kureru"
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ flags coding = utf8 ;
|
|||||||
|
|
||||||
no_Quant = {s = \\st => "" ; sp = \\st => "何も" ; no = True} ; -- "nanimo"
|
no_Quant = {s = \\st => "" ; sp = \\st => "何も" ; no = True} ; -- "nanimo"
|
||||||
not_Predet = {s = "" ; not = True} ;
|
not_Predet = {s = "" ; not = True} ;
|
||||||
|
if_then_Conj = R.mkConj "と" R.IfConj ;
|
||||||
at_least_AdN = {s = "少なくとも" ; postposition = False} ; -- "sukunakutomo"
|
at_least_AdN = {s = "少なくとも" ; postposition = False} ; -- "sukunakutomo"
|
||||||
at_most_AdN = {s = "せいぜい" ; postposition = False} ;
|
at_most_AdN = {s = "せいぜい" ; postposition = False} ;
|
||||||
nobody_NP = R.mkNP "誰も" False True R.Anim ; -- "daremo"
|
nobody_NP = R.mkNP "誰も" False True R.Anim ; -- "daremo"
|
||||||
|
|||||||
@@ -366,6 +366,18 @@ concrete VerbJpn of Verb = CatJpn ** open ResJpn, Prelude in {
|
|||||||
v2vType = False
|
v2vType = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
VPSlashPrep vp prep = {
|
||||||
|
s = \\sp,st,t,p => vp.verb ! sp ! Anim ! st ! t ! p ;
|
||||||
|
a_stem = \\sp => vp.a_stem ! sp ! Anim ! Plain ;
|
||||||
|
i_stem = \\sp => vp.i_stem ! sp ! Anim ! Plain ;
|
||||||
|
te = \\sp,p => vp.te ! sp ! Anim ! Plain ! p ;
|
||||||
|
ba = \\sp,p => vp.ba ! sp ! Anim ! Plain ! p ;
|
||||||
|
prep = prep.s ;
|
||||||
|
obj = \\st => [] ;
|
||||||
|
prepositive = vp.prepositive ;
|
||||||
|
v2vType = False
|
||||||
|
} ;
|
||||||
|
|
||||||
CompAP ap = {
|
CompAP ap = {
|
||||||
verb = \\a,st,t,p => ap.pred ! st ! t ! p ;
|
verb = \\a,st,t,p => ap.pred ! st ! t ! p ;
|
||||||
te = \\a => ap.te ;
|
te = \\a => ap.te ;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user