forked from GitHub/gf-rgl
Compare commits
162 Commits
eleven-nor
...
misc-malay
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc8da4a212 | ||
|
|
e91b613e1a | ||
|
|
f7e9357ed4 | ||
|
|
22a168198b | ||
|
|
5d912f78a4 | ||
|
|
cb26429655 | ||
|
|
1910ba1b2a | ||
|
|
645de9955a | ||
|
|
2023af9a45 | ||
|
|
4b336c2453 | ||
|
|
8b8564e828 | ||
|
|
722c077eb6 | ||
|
|
7c334847a5 | ||
|
|
ea4249752e | ||
|
|
8a12362649 | ||
|
|
0e09cf9b4a | ||
|
|
7c9b6d0d02 | ||
|
|
e7559884e0 | ||
|
|
70cbbe689d | ||
|
|
fcfb60b6e5 | ||
|
|
7cae261a97 | ||
|
|
bd6faa569e | ||
|
|
a429a9bb9c | ||
|
|
a5929da02c | ||
|
|
ed61647f86 | ||
|
|
ccdb58de21 | ||
|
|
a66d15a0ea | ||
|
|
760210c219 | ||
|
|
2d429489bb | ||
|
|
8b1309c99d | ||
|
|
654e02da7e | ||
|
|
efdc35f22f | ||
|
|
260582b58a | ||
|
|
edfe72514b | ||
|
|
95e7996a2d | ||
|
|
1c0a4f98ed | ||
|
|
ac2c5c52ac | ||
|
|
5ea609092b | ||
|
|
95364e667c | ||
|
|
9c96fc6653 | ||
|
|
69d5b80f23 | ||
|
|
1b9b15fbed | ||
|
|
14955ff5d4 | ||
|
|
e192627e24 | ||
|
|
1c496a719b | ||
|
|
306951280a | ||
|
|
1da671016b | ||
|
|
817f6702b1 | ||
|
|
2551040b5a | ||
|
|
98e3aa8c61 | ||
|
|
1c927b1bf1 | ||
|
|
bd23dfa08d | ||
|
|
bd93d8296d | ||
|
|
4334bb0846 | ||
|
|
33e9e60b3a | ||
|
|
9ca05bae95 | ||
|
|
b462d7893f | ||
|
|
2fcd5bd3ae | ||
|
|
4a56f8e3fd | ||
|
|
cb397987fc | ||
|
|
a5f3e9ebd2 | ||
|
|
b845b174c0 | ||
|
|
7ec7a831f3 | ||
|
|
a2aca74dd6 | ||
|
|
b4a2f686bb | ||
|
|
1ad71e10b1 | ||
|
|
87b6bf9f0a | ||
|
|
bfb016b3ea | ||
|
|
a8b061926b | ||
|
|
61c120f531 | ||
|
|
6743078f6d | ||
|
|
dab2749b82 | ||
|
|
7ca6505762 | ||
|
|
0eeaf5bce7 | ||
|
|
ebd4a462eb | ||
|
|
5ed93e6a03 | ||
|
|
fd51156369 | ||
|
|
ee01aa1cd5 | ||
|
|
f53078dbad | ||
|
|
b17d353994 | ||
|
|
b2f8d2e9dd | ||
|
|
ea149d63f1 | ||
|
|
36235ca3a9 | ||
|
|
77b370cbcf | ||
|
|
23afeee87c | ||
|
|
a741e192e2 | ||
|
|
ef1d9a0cbc | ||
|
|
7b3b49400a | ||
|
|
e49c64bac9 | ||
|
|
65e5b78edd | ||
|
|
c6f6a749b5 | ||
|
|
f807a16b46 | ||
|
|
828bf9c677 | ||
|
|
a6faaeb351 | ||
|
|
3ea7af5cb8 | ||
|
|
8c3375b67b | ||
|
|
14cabc847a | ||
|
|
3116d6887a | ||
|
|
73a73d66d9 | ||
|
|
f8dfc34895 | ||
|
|
4ceb822713 | ||
|
|
1c8127bcc2 | ||
|
|
a4c3da9e34 | ||
|
|
21e84c764c | ||
|
|
7085acacc9 | ||
|
|
d0e433cd46 | ||
|
|
b319bb1e96 | ||
|
|
79b67f620b | ||
|
|
7066d2f6bb | ||
|
|
c052380eda | ||
|
|
52184784c8 | ||
|
|
23f8429019 | ||
|
|
a2df258331 | ||
|
|
b96f4c9841 | ||
|
|
0f47122ba9 | ||
|
|
7d9d2a2b5c | ||
|
|
a718a92485 | ||
|
|
b066fb4d35 | ||
|
|
30d90909d5 | ||
|
|
7cc24e3d88 | ||
|
|
54d4a762d6 | ||
|
|
96f4543c4c | ||
|
|
dc19b6a88a | ||
|
|
43a742c91e | ||
|
|
c20e9b6383 | ||
|
|
8755f9da65 | ||
|
|
14351f2767 | ||
|
|
c656f91f93 | ||
|
|
8811da5e51 | ||
|
|
8fc2460af6 | ||
|
|
60c733bd35 | ||
|
|
47eca9545b | ||
|
|
a27e502233 | ||
|
|
0b7ad68400 | ||
|
|
ac3b8bba6b | ||
|
|
83d1ef4fa0 | ||
|
|
e80c399b0f | ||
|
|
2ef266052f | ||
|
|
5a6701cda8 | ||
|
|
235fd0570f | ||
|
|
54713a2987 | ||
|
|
d8e313c75c | ||
|
|
b1a1961454 | ||
|
|
13fac41ce6 | ||
|
|
7c2c519e50 | ||
|
|
44fdb933aa | ||
|
|
b5ea76dd79 | ||
|
|
7a0b1eed34 | ||
|
|
3eac1b9d0c | ||
|
|
ae2b3bec29 | ||
|
|
e7a5daa17f | ||
|
|
0500091297 | ||
|
|
bca75fae7b | ||
|
|
912de3f664 | ||
|
|
70d9c74279 | ||
|
|
0c57e45540 | ||
|
|
fe2c221e7b | ||
|
|
8eea5d481f | ||
|
|
e9940f32c5 | ||
|
|
f634af931e | ||
|
|
1b9c4613bf | ||
|
|
2092bb64d8 |
371
doc/missing-in-rgl-Grammar.tsv
Normal file
371
doc/missing-in-rgl-Grammar.tsv
Normal file
@@ -0,0 +1,371 @@
|
|||||||
|
fun type Afr Amh Grc Ara Eus Bul Cat Chi Hrv Cze Dan Dut Gus Eng Est Fin Fre Ger Gre Heb Hin Hun Ice Ina Ita Jpn Kam Kor Lat Lav Lit May Mlt Mon Nep Nor Nno Pes Pol Por Pnb Ron Cgg Rus Snd Slo Slv Som Spa Swa Swe Tam Tel Tha Tur Ukr Urd Zul
|
||||||
|
AAnter Ant + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + +
|
||||||
|
ASimul Ant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
AdAP AdA -> AP -> AP + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + - + + + - + + + + + +
|
||||||
|
AdAdv AdA -> Adv -> Adv + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - + + + + - + + + - + +
|
||||||
|
AdNum AdN -> Card -> Card + - + + + + + + + - + + + + + + + + + - + - + + + + + - - + + - + + + + + + + + + + + + + - - - + + + - - + + + + +
|
||||||
|
AdVVP AdV -> VP -> VP + - + + + + + + - - + + - + + + + + + - + - + + + + - + + + + + + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
AdVVPSlash AdV -> VPSlash -> VPSlash - - - + + + + + - - + - - + - + + + + - + - + - + + - + + - - - + + + + + - - + - - + + - - - - + - + - + - - - + +
|
||||||
|
AddAdvQVP QVP -> IAdv -> QVP - - - + - - + - - - + - + + - - + - + + - - + - + + + - - - - - + + + + + - - + - - - - - - - - + - + - + - - - - +
|
||||||
|
AdjCN AP -> CN -> CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
AdjDAP DAP -> AP -> DAP - - - - + + + - - - + - + + + - + - - - - - + - + + + - - - - - - - - + + - - + - - + + - - - - + + + - - - + - - +
|
||||||
|
AdjOrd Ord -> AP + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + + + + + +
|
||||||
|
AdnCAdv CAdv -> AdN + - - + - + + + + - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + + + +
|
||||||
|
AdvAP AP -> Adv -> AP - - - + + + + + + + + + + + + + + - + - + + + - + + + - + + - + + + + + + + - + - - - + - + + - + + + - + - + + + +
|
||||||
|
AdvCN CN -> Adv -> CN + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + - + + + - - + + + + +
|
||||||
|
AdvIAdv IAdv -> Adv -> IAdv + - - + + + + + - - + + + + + + + + + + + - + + + + + - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
AdvIP IP -> Adv -> IP + + + + + + + + - - + + + + + + + + + + + - + + + + + - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
AdvImp Adv -> Imp -> Imp - - - - - + + - - - + - - + - - + - - - - - - - + - - - - - - - - - - + + - - + - - - - - - - - + - + - + - - - - +
|
||||||
|
AdvNP NP -> Adv -> NP + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - - + + + + +
|
||||||
|
AdvQVP VP -> IAdv -> QVP - - - + - - + - - - + - + + - - + - + + - - + - + + + - - - - - + + + + + - - + - - - - - - - - + - + - + - - - - +
|
||||||
|
AdvS Adv -> S -> S + + + + + + + + - - + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + - + + - + + + - + - + + + - + +
|
||||||
|
AdvSlash ClSlash -> Adv -> ClSlash + - - + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
AdvVP VP -> Adv -> VP + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
AdvVPSlash VPSlash -> Adv -> VPSlash - - - - + + + + - - + - - + + + + + + - + + + - + + - + + - - - + + + + + - - + - - + + - - - + + - + - + - - - + +
|
||||||
|
ApposCN CN -> NP -> CN + + - + + + + + + + + + - + + + + + + - + + + + + + - + + + + - + + + + + + + + + + + + + + - - + - + - - + + + + +
|
||||||
|
BaseAP AP -> AP -> ListAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + + + - + + + + - + + + - + + + + + +
|
||||||
|
BaseAdV AdV -> AdV -> ListAdV - - - - + + - - - - - - + + + + - - - + - + + - - + + + - - - - + - - - - - - - - - - + - - - - - + - - + - + - - +
|
||||||
|
BaseAdv Adv -> Adv -> ListAdv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
BaseCN CN -> CN -> ListCN - - + + + + + + - - + - + + + + + + + + - - + - + + + - - - - - + + - + + + - + - - - + - - - - + + + - + - + - - +
|
||||||
|
BaseDAP DAP -> DAP -> ListDAP - - - - + - - - - - + - + + - - - - - + - - + - - + + - - - - - - - - + + - - - - - - + - - - - - + + - + - - - - +
|
||||||
|
BaseIAdv IAdv -> IAdv -> ListIAdv - - - - + + + - - - + - + + + + + - + + - + + - + + + + - - - - + + - + + - - + - - - + - - - - + + + - + - - - - +
|
||||||
|
BaseNP NP -> NP -> ListNP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + - + + + + + +
|
||||||
|
BaseRS RS -> RS -> ListRS + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
BaseS S -> S -> ListS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
CAdvAP CAdv -> AP -> NP -> AP + + - - + + + + - - + + + + + + + + + - + + + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + - + +
|
||||||
|
CleftAdv Adv -> S -> Cl + - + + - + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
CleftNP NP -> RS -> Cl + - + - - + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
CompAP AP -> Comp + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
CompAdv Adv -> Comp + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
CompCN CN -> Comp + - + + + + + + - - + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
CompIAdv IAdv -> IComp + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
CompIP IP -> IComp + + + + + + + + - - + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
CompNP NP -> Comp + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
ComparA A -> NP -> AP + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + + - - + + + + - + + + + + +
|
||||||
|
ComparAdvAdj CAdv -> A -> NP -> Adv + + + - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + - + +
|
||||||
|
ComparAdvAdjS CAdv -> A -> S -> Adv + - - - - + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + - + +
|
||||||
|
ComplA2 A2 -> NP -> AP + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ComplN2 N2 -> NP -> CN + + + + + + + + - - + + + + + + + + + - + - + + + + + - - + + + + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
ComplN3 N3 -> NP -> N2 + + + + + + + + - - + + + + + + + + + - + - + + + + + - - + + - + + + + + + + + + + + + + - - - + + + - - + + - + +
|
||||||
|
ComplSlash VPSlash -> NP -> VP + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
ComplSlashIP VPSlash -> IP -> QVP - - - + - - + - - - + - + + - - + - + + - - + - + + + - - - - - + + + + + - - + - - - - - - - - + - + - + - - - - +
|
||||||
|
ComplVA VA -> AP -> VP + + + + + + + + - - + + - + + + + + + - + - + + + + - - + + + - + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
ComplVQ VQ -> QS -> VP + - + + + + + + - - + + - + + + + + + - + - + + + + - - + + + - + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
ComplVS VS -> S -> VP + - + + + + + + - - + + - + + + + + + - + - + + + + - - + + + - + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
ComplVV VV -> VP -> VP + + + + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
ConjAP Conj -> ListAP -> AP + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + + + - + + + + - + + + - + + + + + +
|
||||||
|
ConjAdV Conj -> ListAdV -> AdV - - - - + + - - - - - - + + + + - - - + - + + - - + + + - - - - + - - - - - - - - - - + - - - - - + - - + - + - - +
|
||||||
|
ConjAdv Conj -> ListAdv -> Adv + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ConjCN Conj -> ListCN -> CN - - + + + + + + - - + - + + + + + + + + - - + - + + + - - - - - + + - + + + - + - - - + - - - - + + + - + - + - - +
|
||||||
|
ConjDet Conj -> ListDAP -> Det - - - - + - - - - - + - + + - - - - - + - - + - - + + - - - - - - - - + + - - - - - - + - - - - - + + - + - - - - +
|
||||||
|
ConjIAdv Conj -> ListIAdv -> IAdv - - - - + + + - - - + - + + + + + - + + - + + - + + + + - - - - + + - + + - - + - - - + - - - - + + + - + - - - - +
|
||||||
|
ConjNP Conj -> ListNP -> NP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + - + + + + + +
|
||||||
|
ConjRS Conj -> ListRS -> RS + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ConjS Conj -> ListS -> S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ConsAP AP -> ListAP -> ListAP + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + + + - + + + + - + + + - + + + + + +
|
||||||
|
ConsAdV AdV -> ListAdV -> ListAdV - - - - + + - - - - - - + + + + - - - + - + + - - + + + - - - - + - - - - - - - - - - + - - - - - + - - + - + - - +
|
||||||
|
ConsAdv Adv -> ListAdv -> ListAdv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ConsCN CN -> ListCN -> ListCN - - + + + + + + - - + - + + + + + + + + - - + - + + + - - - - - + + - + + + - + - - - + - - - - + + + - + - + - - +
|
||||||
|
ConsDAP DAP -> ListDAP -> ListDAP - - - - + - - - - - + - + + - - - - - + - - + - - + + - - - - - - - - + + - - - - - - + - - - - - + + - + - - - - +
|
||||||
|
ConsIAdv IAdv -> ListIAdv -> ListIAdv - - - - + + + - - - + - + + + + + - + + - + + - + + + + - - - - + + - + + - - + - - - + - - - - + + + - + - - - - +
|
||||||
|
ConsNP NP -> ListNP -> ListNP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + - + + + + + +
|
||||||
|
ConsRS RS -> ListRS -> ListRS + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
ConsS S -> ListS -> ListS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - + + + - - + + + - + + + + + +
|
||||||
|
CountNP Det -> NP -> NP - - - - + + + + - - + - + + - + + - + - + - + - + + + - + - - + + - - + + - - + - - + + - - - - + + + - - - + - + +
|
||||||
|
D_0 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_1 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_2 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_3 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_4 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_5 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_6 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_7 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_8 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
D_9 Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
DefArt Quant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
DetCN Det -> CN -> NP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + +
|
||||||
|
DetDAP Det -> DAP - - - - + + + - - - + + + + + + + + - - - - + - + + + - - - + - - - - + + - + + - - + + - - - - + + + - - - + - - +
|
||||||
|
DetNP Det -> NP + + - + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + +
|
||||||
|
DetQuant Quant -> Num -> Det + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + +
|
||||||
|
DetQuantOrd Quant -> Num -> Ord -> Det + + + + + + + + - - + + + + + + + + + - + + + + + + + - - + + + + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
EmbedQS QS -> SC + - - + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
EmbedS S -> SC + - + + + + + + - - + + - + + + + + + - + - + + + + - + - + + - + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
EmbedVP VP -> SC + + - + + + + + - - + + - + + + + + + - + - + + + + - + - + + + + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
ExistIP IP -> QCl + - + + - + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
ExistIPAdv IP -> Adv -> QCl - - + - - + - - - - - - + + - + - + - + - - + - - + + - + - - - + + - - - - - + - - - + - - - - + - + - + - - - - +
|
||||||
|
ExistNP NP -> Cl + - + + + + + + + - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + - + + - + + + - + - + + + + + +
|
||||||
|
ExistNPAdv NP -> Adv -> Cl - - + + - + - - + - - - + + - + + + - + - - + - + + + - + - - - + + - - - + - + - - - + - - - - + - + - + - - + - +
|
||||||
|
ExtAdvNP NP -> Adv -> NP - - - - + + + + - - + + + + - + + + - - - + + - + + + - + - - + + - - + + - - + - - + + - - - - + + + - - - + - - +
|
||||||
|
ExtAdvS Adv -> S -> S - - - - + + + + - - + + - + + + + + + - + + + - + + - + - - + + + + - + + - + + - + + + - - + + + - + - + + - - + +
|
||||||
|
ExtAdvVP VP -> Adv -> VP - - - - + + + + - - + + - + - + + + - - - - + - + + - - - - - - + - - + + - - + - - - + - - - - + - + - + - - - - +
|
||||||
|
FunRP Prep -> NP -> RP -> RP + - - - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + - + + - + - + - + - + + + - + +
|
||||||
|
GenericCl VP -> Cl + - + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
IDig Dig -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
IIDig Dig -> Digits -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
IdRP RP + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
IdetCN IDet -> CN -> IP + + + + + + + + - - + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
IdetIP IDet -> IP + + + + + + + + - - + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + - - + + - + - + + + - + +
|
||||||
|
IdetQuant IQuant -> Num -> IDet + + - + + + + + - - + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
ImpP3 NP -> VP -> Utt - - + - - - - - - - - - + + - + + + + + + - + - - + + - + + - - + + + - - + - + + - - + + - - - - - - - + - - - + +
|
||||||
|
ImpPl1 VP -> Utt + - + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
ImpVP VP -> Imp + + + + + + + + - - + + - + + + + + + - + - + + + + - - - + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
ImpersCl VP -> Cl + - + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
IndefArt Quant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
MassNP CN -> NP + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
NoPConj PConj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
NoVoc Voc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
NumCard Card -> Num + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
NumDigits Digits -> Card + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + - - + + + - - + + + + +
|
||||||
|
NumNumeral Numeral -> Card + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
NumPl Num + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
NumSg Num + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + +
|
||||||
|
OrdDigits Digits -> Ord + + + + + + + + - - + + + + + + + + + - + - + + + + + - - + + - + + + + + + + + + + + + + - - - + + + - - + + - + +
|
||||||
|
OrdNumeral Numeral -> Ord + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
OrdNumeralSuperl Numeral -> A -> Ord - - - - + - + + - - + + + + - + + + - - - - + - + + + - - - - + - - - + + - - + - - + + - - - - + + + - - - + - - +
|
||||||
|
OrdSuperl A -> Ord + + + + + + + + + - + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + - - + + + + - - + + + + +
|
||||||
|
PConjConj Conj -> PConj + - + - + + + + + + + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + + - + + + + - + + + + + +
|
||||||
|
PNeg Pol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
PPartNP NP -> V2 -> NP + + - - + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + + + + - - - + - + - - + + - + +
|
||||||
|
PPos Pol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
PartNP CN -> NP -> CN - - - - + + + + - - + - + + - + + - + - + - + - + + + - - - + - + - - + + - - + - - + + - - - + + + + - - - + - + +
|
||||||
|
PassV2 V2 -> VP + + + + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
PhrUtt PConj -> Utt -> Voc -> Phr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
PositA A -> AP + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
PositAdAAdj A -> AdA + - - - + + + + - - + + + + + + + + + - + - + - + + + - + - - - + + - + + - - + - - - + - - - - + + + - + - - - + +
|
||||||
|
PositAdvAdj A -> Adv + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + - + +
|
||||||
|
PossNP CN -> NP -> CN - - + + + + + + - - + + + + + + + + + - + - + - + + + - - - + + + - - + + + - + - - + + - - - + + + + - - - + - + +
|
||||||
|
PossPron Pron -> Quant + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
PredSCVP SC -> VP -> Cl + - + - + + + + - - + + - + + + + + + - + - + + + + - + - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
PredVP NP -> VP -> Cl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
PredetNP Predet -> NP -> NP + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
PrepIP Prep -> IP -> IAdv + - + + + + + + - - + + + + + + + + + + + - + + + + + - - + + - + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
PrepNP Prep -> NP -> Adv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
ProgrVP VP -> VP + - + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
QuestCl Cl -> QCl + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
QuestIAdv IAdv -> Cl -> QCl + + - + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
QuestIComp IComp -> NP -> QCl + - - + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
QuestQVP IP -> QVP -> QCl - - - + - - + - - - + - + + - - + - + + - - + - + + + - - - - - + + + + + - - + - - - - - - - - + - + - + - - - - +
|
||||||
|
QuestSlash IP -> ClSlash -> QCl + - - + + + + + - - + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
QuestVP IP -> VP -> QCl + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
ReflA2 A2 -> AP + - + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - - + + + - + + + - + +
|
||||||
|
ReflVP VPSlash -> VP + - + + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - + + + - + - + + + - + +
|
||||||
|
RelCN CN -> RS -> CN + - + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + - + + + + - - + + + + +
|
||||||
|
RelCl Cl -> RCl + - - + + + + + - - + + + + + + + + + + + - + + + + + + - + + - + + + + + + + + + + + + + - + - + - + - + + + - + +
|
||||||
|
RelNP NP -> RS -> NP + - + + + + + + - - + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
RelS S -> RS -> S + - + - + + + + - - + + - + + + + + + - + - + + + + - - - - + - + + + + + + + + + + - + + - - - + - + - + + - - + +
|
||||||
|
RelSlash RP -> ClSlash -> RCl + - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
RelVP RP -> VP -> RCl + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
SSubjS S -> Subj -> S -> S - + - - + + + + - - + + - + - + + + + - + - + - + + - - - - - - + + + + + + - + + - - + + - - + + - + - + + - - + +
|
||||||
|
SelfAdVVP VP -> VP - - + + - - - + - - - - + + - + + + - + - - + - - + + - + - - - + - - - - - - + - - - + - - - - + - + - + - - - - +
|
||||||
|
SelfAdvVP VP -> VP - - + + - - - + - - - - + + - + + + - + - - + - - + + - + - - - + - - - - - - + - - - + - - - - + - + - + - - - - +
|
||||||
|
SelfNP NP -> NP - - + + - - - + - - - - + + - + + + - + - - + - - + + - + - - - + - - - - - - + - - - + - - - - - - + - + - - - - +
|
||||||
|
SentAP AP -> SC -> AP + - + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + - + + - - + + + + - + + + - + +
|
||||||
|
SentCN CN -> SC -> CN + - + + + + + + - - + + + + + + + + + - + - + + + + + + - + + - + + + + + + + + + + + + + - - - + + + - - + + - + +
|
||||||
|
Slash2V3 V3 -> NP -> VPSlash + - + + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
Slash3V3 V3 -> NP -> VPSlash + + + + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
SlashPrep Cl -> Prep -> ClSlash + - + - - + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
SlashV2A V2A -> AP -> VPSlash + - - - + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
SlashV2Q V2Q -> QS -> VPSlash + - + - + + + + - - + + - + + + + + + - + - + + + + - - + + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
SlashV2S V2S -> S -> VPSlash + - + + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
SlashV2V V2V -> VP -> VPSlash + - + + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
SlashV2VNP V2V -> NP -> VPSlash -> VPSlash + - + + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
SlashV2a V2 -> VPSlash + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
SlashVP NP -> VPSlash -> ClSlash + + + + + + + + - - + + - + + + + + + - + + + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
SlashVS NP -> VS -> SSlash -> ClSlash + - + - - + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - - + - + - + + + - + +
|
||||||
|
SlashVV VV -> VPSlash -> VPSlash + - - + + + + + - - + + - + + + + + + - + - + + + + - - - + + + + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
SubjS Subj -> S -> Adv + - + + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
TCond Tense + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + +
|
||||||
|
TEmpty Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
TExclMark Phr -> Text -> Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
TFullStop Phr -> Text -> Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
TFut Tense + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + +
|
||||||
|
TPast Tense + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + +
|
||||||
|
TPres Tense + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
TQuestMark Phr -> Text -> Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
TTAnt Tense -> Ant -> Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
Use2N3 N3 -> N2 + + + + + + + + - - + + + + + + + + + - + - + + + + + - - + + - + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
Use3N3 N3 -> N2 + + + + + + + + - - + + + + + + + + + - + - + + + + + - - + + - + + + + + + + + + + + + + - - + + + + - - + - - + +
|
||||||
|
UseA2 A2 -> AP + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + + + - + + + + - + + + + + +
|
||||||
|
UseCl Temp -> Pol -> Cl -> S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UseComp Comp -> VP + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
UseComparA A -> AP + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UseCopula VP - - + + + + + + - - + + - + - + + + + - - + + - + + - + + - - + + + - + + - - + - + + + - - - + + - + - + - - - - +
|
||||||
|
UseN N -> CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
UseN2 N2 -> CN + + + + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - + + - + +
|
||||||
|
UsePN PN -> NP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
UsePron Pron -> NP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + +
|
||||||
|
UseQCl Temp -> Pol -> QCl -> QS + + + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
UseRCl Temp -> Pol -> RCl -> RS + - + + + + + + + + + + - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + - + + - + - + + + + + +
|
||||||
|
UseSlash Temp -> Pol -> ClSlash -> SSlash + - + + + + + + - - + + - + + + + + + - + - + + + + - - - + + - + + + + + + + + + + - + + - - + + - + - + + + - + +
|
||||||
|
UseV V -> VP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UttAP AP -> Utt + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
UttAdv Adv -> Utt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UttCN CN -> Utt + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UttCard Card -> Utt + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
UttIAdv IAdv -> Utt + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + - + +
|
||||||
|
UttIP IP -> Utt + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
UttImpPl Pol -> Imp -> Utt + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
UttImpPol Pol -> Imp -> Utt + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
UttImpSg Pol -> Imp -> Utt + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
UttInterj Interj -> Utt - - - + + + + + - - + + + + + + + + + - + + + + + + + + + - - - + + - + + - - + - - + + - - + + + + + - + + + - + +
|
||||||
|
UttNP NP -> Utt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UttQS QS -> Utt + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + - + +
|
||||||
|
UttS S -> Utt + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
UttVP VP -> Utt + + - + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
VPSlashPrep VP -> Prep -> VPSlash - - - + + + + + - - + + - + + + + + + + + - + - + + - - - + - - + + - + + + - + - + - + - - - + + - + - + - - - + +
|
||||||
|
VocNP NP -> Voc + + + - + + + + + + + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + + - + + - + - + + + + + +
|
||||||
|
above_Prep Prep + + + + + + + + - - + + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
active2passive Cl -> Cl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
after_Prep Prep + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
all_Predet Predet + + - + + + + + - - + + + + + + + + + - + - + + + + + + + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
almost_AdA AdA + - - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
almost_AdN AdN + - - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
although_Subj Subj + + + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
always_AdV AdV + + + - + + + + - - + + + + + + + + + - + - + + + + + + + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
and_Conj Conj + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
as_CAdv CAdv + + - - + + + + - - + + + + + + + + + - + + + - + + + - + + + - + + + - - + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
at_least_AdN AdN + - - - + + + + - - + + + + + + + + + - + - + - + + + - + + + - + + + - - + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
at_most_AdN AdN + - - - + + + + - - + + + + + + + + + - + - + - + + + - + + + - + + + - - + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
because_Subj Subj + + + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
before_Prep Prep + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
behind_Prep Prep + + + + + + + + - - + + + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
between_Prep Prep + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
both7and_DConj Conj + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
but_PConj PConj + + + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
by8agent_Prep Prep + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + + + - + +
|
||||||
|
by8means_Prep Prep + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
can8know_VV VV + - - - + + + + - - + + - + + + + + + - + - + + + + - - + + + - + + + + + - + + + + + + + - - + + - + - + + + - + +
|
||||||
|
can_VV VV + - - + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
dconcat Digits -> Digits -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
digits2num Digits -> Numeral + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
digits2numeral Card -> Card + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn Dig -> Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn10 Dig -> Sub10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn100 Dig -> Dig -> Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn1000 Dig -> Dig -> Dig -> Sub1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn1000000a Dig -> Dig -> Dig -> Dig -> Sub1000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn1000000b Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
dn1000000c Dig -> Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
during_Prep Prep + - + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
either7or_DConj Conj + + + - + + + + - - + + + + + + + + + - + + + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
every_Det Det + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
everybody_NP NP + + - + + + + + - - + + + + + + + + + - + - - + + + + - + + + - + + + + + - + + + + + + - - - - + + + - + + + - + +
|
||||||
|
everything_NP NP + + - + + + + + - - + + + + + + + + + + + - - + + + + - + + + - + + + + + + + + + + + + - - - - + + + - + + + - + +
|
||||||
|
everywhere_Adv Adv + + + - + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
except_Prep Prep + - + - + - + + - - + + + + + + + + + + + - + - + + + - + + + - + + + - - + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
few_Det Det + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + - - + + + - + + + - + +
|
||||||
|
for_Prep Prep + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + - - + + + - + + + + + +
|
||||||
|
from_Prep Prep + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + - - + + + + + + + + + + + + + + - - + + + - + + + + + +
|
||||||
|
have_V2 V2 + + - + + + + + + + + + - + + + + + + - + + + - + + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + +
|
||||||
|
he_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
here7from_Adv Adv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
here7to_Adv Adv + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
here_Adv Adv + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
how8many_IDet IDet + + + + + + + + - - + + - + + + + + + + + - - + + + - - + + + + + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
how8much_IAdv IAdv + - - + + + + + - - - + + + + + + + + + + - + - + + + - + + - - + + + - - + - + + + + + + - + - + + + - + + + - + +
|
||||||
|
how_IAdv IAdv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
i_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
if_Subj Subj + - + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
if_then_Conj Conj + - - - + - + + - - + + + + + + + + + - - - + - + + + - + + + - + + + - - + + + + + + + + - - - + + + - + + - - + +
|
||||||
|
in8front_Prep Prep + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
in_Prep Prep + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
it_Pron Pron + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
language_title_Utt Utt + + + + + + + + - - + + + + + + + + + - + + - + + + + + + + + + + + + + + + + + + - + + + - - + + + + - + - + - + +
|
||||||
|
less_CAdv CAdv + + - - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
many_Det Det + + + + + + + + - + + + + + + + + + + - + + - + + + + + + + + - + + + + + + + + + + + + + + - - + + + - + + + - + +
|
||||||
|
more_CAdv CAdv + + - - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + - + - + + + - + +
|
||||||
|
most_Predet Predet + + - + + + + + - - + + - + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
much_Det Det + + + + + + + + - - + + + + + + + + + - + - - + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
must_VV VV + - - + + + + + - - + + - + + + + + + - - - + + + + - - + + + + + + + + + + + + - + + + - - + + + - + - + + + - - +
|
||||||
|
n2 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n3 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n4 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n5 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n6 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n7 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n8 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
n9 Digit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
nd Digit -> Dig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
nd10 Sub10 -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
nd100 Sub100 -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
nd1000 Sub1000 -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
nd1000000 Sub1000000 -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
no_Quant Quant + - - - + - + + - - + + - + + + + + + - - - - - + + + - + + + - + + + - - + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
no_Utt Utt + - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
nobody_NP NP + - + - + - + + - - + + + + + + + + + - - - - - + + + - + + + - + + + - - + + + + + + + - - + - + + + - + + + - + +
|
||||||
|
not_Predet Predet + - - - + - + + - - + + + + + + + + + - + - + - + + + - + - + - + + + - - + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
nothing_NP NP + - + + + - + + - - + + + + + + + + + - - - - - + + + - + + + - + + + - - + + + + + + + - - + - + + + - + + + - + +
|
||||||
|
num Sub1000000 -> Numeral + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
num2digits Numeral -> Digits + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
on_Prep Prep + + + + + + + + - - + + + + + + + + + - + + + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
only_Predet Predet + + - + + + + + - - + + + + + + + + + - + - + + + + + + + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
or_Conj Conj + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
otherwise_PConj PConj + + - - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
part_Prep Prep + - + + + + + + - - + + + + + + + + + - + - + + + + + + + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
please_Voc Voc + + - - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
possess_Prep Prep + - + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + + + + + +
|
||||||
|
pot0 Digit -> Sub10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot01 Sub10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot0as1 Sub10 -> Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot1 Digit -> Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot110 Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot111 Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot1as2 Sub100 -> Sub1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot1plus Digit -> Sub10 -> Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot1to19 Digit -> Sub100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot2 Sub10 -> Sub1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot21 Sub1000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - +
|
||||||
|
pot2as3 Sub1000 -> Sub1000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot2plus Sub10 -> Sub100 -> Sub1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot3 Sub1000 -> Sub1000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot31 Sub1000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - +
|
||||||
|
pot3as4 Sub1000000 -> Sub1000000000 + - + - - + + + - - - + - + + + + + + + - - - - + - - + - + - - + - - - - - + + - + - + - + + + + + + - + + + - - +
|
||||||
|
pot3float Float -> Sub1000000 - - - - - + - - - - - - - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - +
|
||||||
|
pot3plus Sub1000 -> Sub1000 -> Sub1000000 + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
pot4 Sub1000 -> Sub1000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - +
|
||||||
|
pot41 Sub1000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - +
|
||||||
|
pot4as5 Sub1000000000 -> Sub1000000000000 + - + - - + + + - - - + - + + + + + + + - - - - + - - + - + - - + - - - - - + + - + - + - + + + + + + - + + + - - +
|
||||||
|
pot4float Float -> Sub1000000000 - - - - - + - - - - - - - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - +
|
||||||
|
pot4plus Sub1000 -> Sub1000000 -> Sub1000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - + - - - - +
|
||||||
|
pot5 Sub1000 -> Sub1000000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - +
|
||||||
|
pot51 Sub1000000000000 - - - - - + - - - - - - - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - +
|
||||||
|
pot5float Float -> Sub1000000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - +
|
||||||
|
pot5plus Sub1000 -> Sub1000000000 -> Sub1000000000000 - - - - - + - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - +
|
||||||
|
quite_Adv AdA + - - - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
she_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
so_AdA AdA + + - + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
somePl_Det Det + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + + - + + + + - + + + - + +
|
||||||
|
someSg_Det Det + + + + + + + + - - + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
somebody_NP NP + + + + + + + + - - + + + + + + + + + - + - - + + + + - + + + + + + + + + + + + + + + + - - + - + + + - + + + - + +
|
||||||
|
something_NP NP + + + + + + + + - + + + + + + + + + + - + + - + + + + + + + + - + + + + + + + + + + + + - + + - + + + - + + + - + +
|
||||||
|
somewhere_Adv Adv + + + - + + + + + - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + + + +
|
||||||
|
that_Quant Quant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
that_Subj Subj + - + + + + + + - - - + + + + + + + + + + - + - + + + - + + - + + + + - - + - + + + + + + - - + + + + - + + + - + +
|
||||||
|
there7from_Adv Adv + + + - + + + + - - + + + + + + + + + + + - - + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
there7to_Adv Adv + + + - + + + + - - + + + + + + + + + + + - - + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
there_Adv Adv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
therefore_PConj PConj + + + - + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
they_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
this_Quant Quant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|
||||||
|
through_Prep Prep + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + - - + +
|
||||||
|
to_Prep Prep + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + + + + + +
|
||||||
|
too_AdA AdA + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + - + + + + + + + + + + + + + - - - + + + - + + + - + +
|
||||||
|
under_Prep Prep + + + + + + + + - - + + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
very_AdA AdA + + - + + + + + - - + + + + + + + + + - + - + + + + + + + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
want_VV VV + + + + + + + + - - + + - + + + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
we_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
whatPl_IP IP + - + + + + + + - - + + - + + + + + + + + - + + + + - - + + + - + + + + + + + + - + + + + - - - + - + - + + + - + +
|
||||||
|
whatSg_IP IP + - + + + + + + - - + + - + + + + + + + + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
when_IAdv IAdv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
when_Subj Subj + - + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
where_IAdv IAdv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + + + + + - + + + - + +
|
||||||
|
which_IQuant IQuant + + + + + + + + - - + + + + + + + + + - + - + + + + + - + + + + + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
whoPl_IP IP + + + + + + + + - - + + - + + + + + + + + - + + + + - - + + + - + + + + + + + + - + + + + - - - + - + - + + + - + +
|
||||||
|
whoSg_IP IP + + + + + + + + - - + + - + + + + + + + + - + + + + - - + + + + + + + + + + + + + + + + + - + + + - + - + + + - + +
|
||||||
|
why_IAdv IAdv + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + - + + + + + - + + + - + +
|
||||||
|
with_Prep Prep + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
without_Prep Prep + + + + + + + + - - + + + + + + + + + + - - + + + + + - + + + - + + + + + + + + + + + + + - + - + + + - + + + - + +
|
||||||
|
yes_Utt Utt + - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - - + + + + - + + + - + +
|
||||||
|
youPl_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
youPol_Pron Pron + + + + + + + + - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + - + +
|
||||||
|
youSg_Pron Pron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + +
|
||||||
|
@@ -159,7 +159,7 @@ The GF Resource Grammar Library.
|
|||||||
//Linguistic Issues in Language Technology//,
|
//Linguistic Issues in Language Technology//,
|
||||||
2 (2),
|
2 (2),
|
||||||
2009.
|
2009.
|
||||||
[PDF http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158]
|
[PDF https://journals.colorado.edu/index.php/lilt/article/view/1205/1047]
|
||||||
#BR
|
#BR
|
||||||
//A systematic presentation of the library from the linguistic point of view.//
|
//A systematic presentation of the library from the linguistic point of view.//
|
||||||
//Not only about English, but English examples abound.//
|
//Not only about English, but English examples abound.//
|
||||||
|
|||||||
93
doc/show_missing.py
Normal file
93
doc/show_missing.py
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# show missing functions in the RGL languages
|
||||||
|
# basic usage: python3 show_missing.py >missing-in-rgl-Grammar.tsv
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# this is the functions you want to find: default is all funs in Grammar
|
||||||
|
GF_LIB_PATH = '/Users/aarne/GF/dist/build/rgl/'
|
||||||
|
ALLTENSES_PATH = GF_LIB_PATH + 'alltenses/'
|
||||||
|
RGL_SOURCE_PATH = '/Users/aarne/GF/gf-rgl/src/'
|
||||||
|
GRAMMAR = 'Grammar'
|
||||||
|
|
||||||
|
# these are the languages you investigate
|
||||||
|
LANGS = ['Cze', 'Urd']
|
||||||
|
|
||||||
|
# get all functions in GRAMMAR, together with their types
|
||||||
|
def get_funs(module=GRAMMAR):
|
||||||
|
cmd = 'echo "pg -funs" | gf -run ' + ALLTENSES_PATH + module + '.gfo'
|
||||||
|
missing = subprocess.Popen(cmd, text=True, shell=True,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
output = missing.communicate()[0].split(';')
|
||||||
|
return ([(fun.split()[0].strip(), ' '.join(fun.split()[2:])) for fun in output if fun.split()])
|
||||||
|
|
||||||
|
# get all missing functions in GRAMMARLng; this can take a long time
|
||||||
|
def get_missing_from_compiled(Lng, module=GRAMMAR):
|
||||||
|
print('investigating', Lng)
|
||||||
|
cmd = 'echo "pg -missing" | gf -run ' + ALLTENSES_PATH + module + Lng + '.gfo'
|
||||||
|
missing = subprocess.Popen(cmd, text=True, shell=True,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
output = missing.communicate()[0].split()
|
||||||
|
return set(output[2:])
|
||||||
|
|
||||||
|
# to get all languages in the compiled RGL, use all_langs from here
|
||||||
|
def all_rgl_compiled_langs():
|
||||||
|
modules = subprocess.run(['ls', ALLTENSES_PATH], capture_output=True, text=True)
|
||||||
|
files = str(modules.stdout)
|
||||||
|
return [file[-7:-4] for file in files.split() if file[:-7].endswith(GRAMMAR)]
|
||||||
|
|
||||||
|
# LANGS = all_rgl_compiled_langs() # uncomment this line if you want all languages
|
||||||
|
|
||||||
|
|
||||||
|
# it is much faster to use source files (sending gfos to /tmp)
|
||||||
|
def str_until(c, s):
|
||||||
|
i = s.find(c)
|
||||||
|
if i >= 0:
|
||||||
|
return s[:i]
|
||||||
|
else:
|
||||||
|
return s
|
||||||
|
|
||||||
|
def get_missing_from_source(lang, gf_file):
|
||||||
|
cmd = 'gf -batch -retain -no-pmcfg -src -gfo-dir=/tmp ' + gf_file
|
||||||
|
missing = subprocess.Popen(cmd, text=True, shell=True,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
output = missing.communicate()[1].split('\n')
|
||||||
|
missing = (lang, {str_until('\x1b[39;49m', line.split()[-1])
|
||||||
|
for line in output
|
||||||
|
if line.strip().startswith('Warning: no linearization of')})
|
||||||
|
return missing
|
||||||
|
|
||||||
|
|
||||||
|
def all_rgl_source_modules(module=GRAMMAR):
|
||||||
|
cmd = 'ls ' + RGL_SOURCE_PATH + '*/' + module + '?*.gf'
|
||||||
|
files = subprocess.Popen(cmd, text=True, shell=True,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
output = files.communicate()[0].split()
|
||||||
|
return {file[-6:-3]: file for file in output}
|
||||||
|
|
||||||
|
LANGS = all_rgl_source_modules() # Lng: file dict
|
||||||
|
|
||||||
|
# make a text with tab-separated strings withcolumns fun, type, langs and rows for each fun
|
||||||
|
def make_table(funs=get_funs(), module=GRAMMAR, langs=LANGS):
|
||||||
|
header = ['fun', 'type'] + list(langs.keys()) # if dict, otherwise langs ###
|
||||||
|
rows = [header]
|
||||||
|
print('\t'.join(header))
|
||||||
|
|
||||||
|
# missings = {lang: get_missing_from_compiled(lang, module) for lang in langs}
|
||||||
|
missings = {lang: get_missing_from_source(lang, file)[1] for lang,file in langs.items()}
|
||||||
|
for fun in funs:
|
||||||
|
row = [fun[0], fun[1]]
|
||||||
|
for lang in langs.keys():
|
||||||
|
if fun[0] in missings[lang]:
|
||||||
|
row.append('-')
|
||||||
|
else:
|
||||||
|
row.append('+')
|
||||||
|
rows.append(row)
|
||||||
|
print('\t'.join(row))
|
||||||
|
|
||||||
|
|
||||||
|
# the output is send to stdout
|
||||||
|
make_table()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,8 +7,6 @@ Aarne Ranta
|
|||||||
The following table gives the languages currently available in the
|
The following table gives the languages currently available in the
|
||||||
GF Resource Grammar Library.
|
GF Resource Grammar Library.
|
||||||
|
|
||||||
For another view, see the
|
|
||||||
[The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/] .
|
|
||||||
|
|
||||||
Corrections and additions are welcome! Notice that only those parts of implementations
|
Corrections and additions are welcome! Notice that only those parts of implementations
|
||||||
that are currently available via https://github.com/GrammaticalFramework/gf-rgl/
|
that are currently available via https://github.com/GrammaticalFramework/gf-rgl/
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ the library, view all functions in a module's scope, and quickly jump to their d
|
|||||||
Other relevant documents:
|
Other relevant documents:
|
||||||
- [The RGL Status Document ../status.html]: the current status of different languages
|
- [The RGL Status Document ../status.html]: the current status of different languages
|
||||||
and the authors of each grammar
|
and the authors of each grammar
|
||||||
- [The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/]
|
|
||||||
- [RGL Documentation and Publications ../rgl-publications.html]: links to publications and other documentation
|
- [RGL Documentation and Publications ../rgl-publications.html]: links to publications and other documentation
|
||||||
- [More modules ../gfdoc/sources.html]: extra modules, dictionaries, and
|
- [More modules ../gfdoc/sources.html]: extra modules, dictionaries, and
|
||||||
the internals of the resource grammar
|
the internals of the resource grammar
|
||||||
@@ -46,7 +45,7 @@ abstract functions and their Universal Dependency labels
|
|||||||
- Paper "The GF Resource Grammar Library" by A. Ranta
|
- Paper "The GF Resource Grammar Library" by A. Ranta
|
||||||
(//Linguistic Issues in Language Technology//, 2 (2), 2009). An overview of
|
(//Linguistic Issues in Language Technology//, 2 (2), 2009). An overview of
|
||||||
the library with linguistic motivations.
|
the library with linguistic motivations.
|
||||||
[PDF http://journals.linguisticsociety.org/elanguage/lilt/article/download/214/214-501-1-PB.pdf]
|
[PDF https://journals.colorado.edu/index.php/lilt/article/view/1205/1047]
|
||||||
- Paper "Grammars as Software Libraries" by A. Ranta
|
- Paper "Grammars as Software Libraries" by A. Ranta
|
||||||
(In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
|
(In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
|
||||||
//From Semantics to Computer Science//, Cambridge University Press,
|
//From Semantics to Computer Science//, Cambridge University Press,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,7 @@ Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n
|
|||||||
Gre,Greek,greek,,,,,,,,y
|
Gre,Greek,greek,,,,,,,,y
|
||||||
Heb,Hebrew,hebrew,,,,,n,n,,n
|
Heb,Hebrew,hebrew,,,,,n,n,,n
|
||||||
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
|
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
|
||||||
|
Hrv,Croatian,croatian,,,,,,y,,n
|
||||||
Hun,Hungarian,hungarian,,,n,y,y,y,n,n
|
Hun,Hungarian,hungarian,,,n,y,y,y,n,n
|
||||||
Ice,Icelandic,icelandic,,,,,,n,,y
|
Ice,Icelandic,icelandic,,,,,,n,,y
|
||||||
Ina,Interlingua,interlingua,,,y,,n,n,,n
|
Ina,Interlingua,interlingua,,,y,,n,n,,n
|
||||||
|
|||||||
|
@@ -126,7 +126,10 @@ abstract Cat = Common ** {
|
|||||||
N ; -- common noun e.g. "house"
|
N ; -- common noun e.g. "house"
|
||||||
N2 ; -- relational noun e.g. "son"
|
N2 ; -- relational noun e.g. "son"
|
||||||
N3 ; -- three-place relational noun e.g. "connection"
|
N3 ; -- three-place relational noun e.g. "connection"
|
||||||
PN ; -- proper name e.g. "Paris"
|
GN ; -- given name e.g. "George"
|
||||||
|
SN ; -- second name e.g. "Washington"
|
||||||
|
LN ; -- location name e.g. "Sweden"
|
||||||
|
PN ; -- proper name
|
||||||
|
|
||||||
-- DEPRECATED: QuantSg, QuantPl
|
-- DEPRECATED: QuantSg, QuantPl
|
||||||
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
||||||
|
|||||||
@@ -44,4 +44,8 @@ abstract Common = {
|
|||||||
Pol ; -- polarity e.g. positive, negative
|
Pol ; -- polarity e.g. positive, negative
|
||||||
Ant ; -- anteriority e.g. simultaneous, anterior
|
Ant ; -- anteriority e.g. simultaneous, anterior
|
||||||
|
|
||||||
|
--2 Measures
|
||||||
|
|
||||||
|
MU ; -- unit of measurement e.g. "km", "cm", "%"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ fun
|
|||||||
InflectionN2 : N2 -> Inflection ;
|
InflectionN2 : N2 -> Inflection ;
|
||||||
InflectionN3 : N3 -> Inflection ;
|
InflectionN3 : N3 -> Inflection ;
|
||||||
InflectionPN : PN -> Inflection ;
|
InflectionPN : PN -> Inflection ;
|
||||||
|
InflectionGN : GN -> Inflection ;
|
||||||
|
InflectionSN : SN -> Inflection ;
|
||||||
InflectionA : A -> Inflection ;
|
InflectionA : A -> Inflection ;
|
||||||
InflectionA2 : A2 -> Inflection ;
|
InflectionA2 : A2 -> Inflection ;
|
||||||
InflectionV : V -> Inflection ;
|
InflectionV : V -> Inflection ;
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ abstract Extend = Cat ** {
|
|||||||
weFem_Pron : Pron ; -- we (Fem)
|
weFem_Pron : Pron ; -- we (Fem)
|
||||||
youPlFem_Pron : Pron ; -- you plural (Fem)
|
youPlFem_Pron : Pron ; -- you plural (Fem)
|
||||||
theyFem_Pron : Pron ; -- they (Fem)
|
theyFem_Pron : Pron ; -- they (Fem)
|
||||||
|
theyNeutr_Pron : Pron ; -- they (Neutr)
|
||||||
youPolFem_Pron : Pron ; -- you polite (Fem)
|
youPolFem_Pron : Pron ; -- you polite (Fem)
|
||||||
youPolPl_Pron : Pron ; -- you polite plural (Masc)
|
youPolPl_Pron : Pron ; -- you polite plural (Masc)
|
||||||
youPolPlFem_Pron : Pron ; -- you polite plural (Fem)
|
youPolPlFem_Pron : Pron ; -- you polite plural (Fem)
|
||||||
@@ -289,7 +290,14 @@ fun UseDAP : DAP -> NP ;
|
|||||||
|
|
||||||
cat X ; -- for words that are difficult to classify, mainly for MorphoDict
|
cat X ; -- for words that are difficult to classify, mainly for MorphoDict
|
||||||
|
|
||||||
|
fun
|
||||||
|
UseComp_estar : Comp -> VP ; -- esta lleno, as opposed to es lleno
|
||||||
|
UseComp_ser : Comp -> VP ; -- es lleno, as opposed to esta lleno
|
||||||
|
|
||||||
fun
|
fun
|
||||||
CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc
|
CardCNCard : Card -> CN -> Card ; -- three million, four lakh, six dozen etc
|
||||||
|
|
||||||
|
fun
|
||||||
|
AnaphPron : NP -> Pron ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ abstract Grammar =
|
|||||||
Structural,
|
Structural,
|
||||||
Idiom,
|
Idiom,
|
||||||
Tense,
|
Tense,
|
||||||
|
Names,
|
||||||
Transfer
|
Transfer
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
14
src/abstract/Names.gf
Normal file
14
src/abstract/Names.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
abstract Names = Cat ** {
|
||||||
|
|
||||||
|
fun GivenName : GN -> NP ;
|
||||||
|
MaleSurname : SN -> NP ;
|
||||||
|
FemaleSurname : SN -> NP ;
|
||||||
|
PlSurname : SN -> NP ;
|
||||||
|
FullName : GN -> SN -> NP ;
|
||||||
|
|
||||||
|
fun UseLN : LN -> NP ;
|
||||||
|
PlainLN : LN -> NP ;
|
||||||
|
InLN : LN -> Adv ;
|
||||||
|
AdjLN : AP -> LN -> LN ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,6 +58,7 @@ abstract Noun = Cat ** {
|
|||||||
|
|
||||||
data
|
data
|
||||||
NumDigits : Digits -> Card ; -- 51
|
NumDigits : Digits -> Card ; -- 51
|
||||||
|
NumFloat : Digits -> Digits -> Card ; -- 3.14
|
||||||
NumNumeral : Numeral -> Card ; -- fifty-one
|
NumNumeral : Numeral -> Card ; -- fifty-one
|
||||||
|
|
||||||
-- The construction of numerals is defined in [Numeral Numeral.html].
|
-- The construction of numerals is defined in [Numeral Numeral.html].
|
||||||
@@ -155,4 +156,9 @@ abstract Noun = Cat ** {
|
|||||||
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||||
DetDAP : Det -> DAP ; -- this (or that)
|
DetDAP : Det -> DAP ; -- this (or that)
|
||||||
|
|
||||||
|
--2 Quantities
|
||||||
|
|
||||||
|
QuantityNP : Digits -> MU -> NP ;
|
||||||
|
QuantityFloatNP : Digits -> Digits -> MU -> NP ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,13 @@
|
|||||||
abstract Numeral = Cat [Numeral,Digits] ** {
|
abstract Numeral = Cat [Numeral,Digits] ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
Digit ; -- 2..9
|
Digit ; -- 2..9
|
||||||
Sub10 ; -- 1..9
|
Sub10 ; -- 1..9
|
||||||
Sub100 ; -- 1..99
|
Sub100 ; -- 1..99
|
||||||
Sub1000 ; -- 1..999
|
Sub1000 ; -- 1..999
|
||||||
Sub1000000 ; -- 1..999999
|
Sub1000000 ; -- 1..999999
|
||||||
|
Sub1000000000 ; -- 1..999999999
|
||||||
|
Sub1000000000000 ; -- 1..999999999999
|
||||||
|
|
||||||
data
|
data
|
||||||
num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category]
|
num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category]
|
||||||
@@ -33,18 +35,36 @@ data
|
|||||||
|
|
||||||
pot01 : Sub10 ; -- 1
|
pot01 : Sub10 ; -- 1
|
||||||
pot0 : Digit -> Sub10 ; -- d * 1
|
pot0 : Digit -> Sub10 ; -- d * 1
|
||||||
|
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
|
||||||
|
|
||||||
pot110 : Sub100 ; -- 10
|
pot110 : Sub100 ; -- 10
|
||||||
pot111 : Sub100 ; -- 11
|
pot111 : Sub100 ; -- 11
|
||||||
pot1to19 : Digit -> Sub100 ; -- 10 + d
|
pot1to19 : Digit -> Sub100 ; -- 10 + d
|
||||||
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
|
|
||||||
pot1 : Digit -> Sub100 ; -- d * 10
|
pot1 : Digit -> Sub100 ; -- d * 10
|
||||||
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
||||||
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
|
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||||
|
|
||||||
|
pot21 : Sub1000 ; -- a hundred instead of one hundred
|
||||||
pot2 : Sub10 -> Sub1000 ; -- m * 100
|
pot2 : Sub10 -> Sub1000 ; -- m * 100
|
||||||
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
||||||
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||||
|
|
||||||
|
pot31 : Sub1000000 ; -- a thousand instead of one thousand
|
||||||
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
|
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||||
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||||
|
pot3as4 : Sub1000000 -> Sub1000000000 ; -- coercion of 1..999999
|
||||||
|
pot3float : Float -> Sub1000000 ; -- 3.5 thousand
|
||||||
|
|
||||||
|
pot41 : Sub1000000000 ; -- a million instead of one million
|
||||||
|
pot4 : Sub1000 -> Sub1000000000 ; -- m * 1000000000
|
||||||
|
pot4plus : Sub1000 -> Sub1000000 -> Sub1000000000 ; -- m * 1000000000 + n
|
||||||
|
pot4as5 : Sub1000000000 -> Sub1000000000000 ; -- coercion of 1..999999999
|
||||||
|
pot4float : Float -> Sub1000000000 ; -- 3.5 million
|
||||||
|
|
||||||
|
pot51 : Sub1000000000000 ; -- a billion instead of one billion
|
||||||
|
pot5 : Sub1000 -> Sub1000000000000 ; -- m * 1000000000
|
||||||
|
pot5plus : Sub1000 -> Sub1000000000 -> Sub1000000000000 ; -- m * 1000000000 + n
|
||||||
|
pot5float : Float -> Sub1000000000000 ; -- 3.5 billion
|
||||||
|
|
||||||
-- Numerals as sequences of digits have a separate, simpler grammar
|
-- Numerals as sequences of digits have a separate, simpler grammar
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
concrete AllAfr of AllAfrAbs =
|
concrete AllAfr of AllAfrAbs =
|
||||||
LangAfr,
|
LangAfr,
|
||||||
IrregAfr,
|
IrregAfr,
|
||||||
ExtraAfr
|
ExtendAfr
|
||||||
**
|
**
|
||||||
{
|
{
|
||||||
--{} ;
|
--{} ;
|
||||||
|
|||||||
@@ -83,6 +83,6 @@ concrete CatAfr of Cat =
|
|||||||
N = Noun ;
|
N = Noun ;
|
||||||
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
N2 = {s : NForm => Str ; g : Gender} ** {c2 : Preposition} ;
|
||||||
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
N3 = {s : NForm => Str ; g : Gender} ** {c2,c3 : Preposition} ;
|
||||||
PN = {s : NPCase => Str} ;
|
GN, SN, LN, PN = {s : NPCase => Str} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,18 @@ lin
|
|||||||
s2 = paragraph (pn.s ! NPNom)
|
s2 = paragraph (pn.s ! NPNom)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionGN = \pn -> {
|
||||||
|
t = "vnm" ;
|
||||||
|
s1 = heading1 "Voornaam" ;
|
||||||
|
s2 = paragraph (pn.s ! NPNom)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionSN = \pn -> {
|
||||||
|
t = "van" ;
|
||||||
|
s1 = heading1 "Van" ;
|
||||||
|
s2 = paragraph (pn.s ! NPNom)
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionA, InflectionA2 = \adj ->
|
InflectionA, InflectionA2 = \adj ->
|
||||||
let
|
let
|
||||||
gforms : AForm -> Str = \a ->
|
gforms : AForm -> Str = \a ->
|
||||||
|
|||||||
15
src/afrikaans/ExtendAfr.gf
Normal file
15
src/afrikaans/ExtendAfr.gf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
concrete ExtendAfr of Extend =
|
||||||
|
CatAfr ** ExtendFunctor - [PassVPSlash,PassAgentVPSlash]
|
||||||
|
with
|
||||||
|
(Grammar = GrammarAfr) **
|
||||||
|
|
||||||
|
open
|
||||||
|
ParadigmsAfr, ResAfr in {
|
||||||
|
|
||||||
|
-- KA: guessed from PassV2 in Afrikaans and the equivalents in Dutch
|
||||||
|
lin PassVPSlash vps =
|
||||||
|
insertInf (vps.s.s ! VPerf) (predV word_V) ;
|
||||||
|
PassAgentVPSlash vps np =
|
||||||
|
insertAdv (appPrep "door" np.s) (insertInf (vps.s.s ! VPerf) (predV word_V)) ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,4 +14,5 @@ concrete GrammarAfr of Grammar =
|
|||||||
TextX,
|
TextX,
|
||||||
IdiomAfr,
|
IdiomAfr,
|
||||||
StructuralAfr,
|
StructuralAfr,
|
||||||
TenseX ;
|
TenseX,
|
||||||
|
NamesAfr ;
|
||||||
|
|||||||
6
src/afrikaans/NamesAfr.gf
Normal file
6
src/afrikaans/NamesAfr.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
concrete NamesAfr of Names = CatAfr ** open ResAfr, Prelude in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> {s = n.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
lin FullName gn sn =
|
||||||
|
{s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
}
|
||||||
@@ -77,6 +77,8 @@ concrete NounAfr of Noun = CatAfr ** open ResAfr, Prelude in {
|
|||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s = \\g,c => n1.s ! NCard Neutr Nom ++ BIND ++ "." ++ BIND ++ n1.s ! NCard g c; n = Pl } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
@@ -177,4 +179,16 @@ concrete NounAfr of Noun = CatAfr ** open ResAfr, Prelude in {
|
|||||||
isMod = cn.isMod
|
isMod = cn.isMod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n.s ! NCard Neutr Nom) ;
|
||||||
|
a = agrP3 n.n ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\c => preOrPost m.isPre m.s (n1.s ! NCard Neutr Nom ++ BIND ++ "." ++ BIND ++ n1.s ! NCard Neutr Nom) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ flags optimize = all_subs ;
|
|||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str ; en : Str} ;
|
Digit = {s : DForm => CardOrd => Str ; en : Str} ;
|
||||||
Sub10 = {s : DForm => CardOrd => Str ; n : Number ; en : Str ; attr : Str} ;
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number ; en : Str ; attr : Str} ;
|
||||||
Sub100, Sub1000, Sub1000000 =
|
Sub100, Sub1000, Sub1000000, Sub1000000000, Sub1000000000000 =
|
||||||
{s : CardOrd => Str ; n : Number ; attr : Str} ;
|
{s : CardOrd => Str ; n : Number ; attr : Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -50,6 +50,8 @@ lin
|
|||||||
pot3plus n m =
|
pot3plus n m =
|
||||||
addAttr {s = \\g => n.attr ++ "duisend" ++ m.s ! g ; n = Pl} ;
|
addAttr {s = \\g => n.attr ++ "duisend" ++ m.s ! g ; n = Pl} ;
|
||||||
|
|
||||||
|
pot3as4 n = n ;
|
||||||
|
pot4as5 n = n ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Dig = TDigit ;
|
Dig = TDigit ;
|
||||||
|
|||||||
@@ -494,4 +494,6 @@ oper
|
|||||||
--
|
--
|
||||||
--}
|
--}
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,8 +323,8 @@ concrete ExtraGrc of ExtraGrcAbs = CatGrc, NumeralGrc[Sub1000000,tenthousand] **
|
|||||||
Sub10000 = {s : CardOrd => Str ; n : Number} ; -- TODO: constructors
|
Sub10000 = {s : CardOrd => Str ; n : Number} ; -- TODO: constructors
|
||||||
|
|
||||||
lin -- d * 10000
|
lin -- d * 10000
|
||||||
pot4 d = { s = \\f => d.s ! NAdv ++ (tenthousand ! f) ; n = Pl } ;
|
pot3X d = { s = \\f => d.s ! NAdv ++ (tenthousand ! f) ; n = Pl } ;
|
||||||
pot4plus d m = {
|
pot3Xplus d m = {
|
||||||
s = \\f => d.s ! NAdv ++ tenthousand ! f ++ "kai`" ++ m.s ! f ; n = Pl} ;
|
s = \\f => d.s ! NAdv ++ tenthousand ! f ++ "kai`" ++ m.s ! f ; n = Pl} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ abstract ExtraGrcAbs = Extra, Numeral[Sub1000000] ** {
|
|||||||
Sub10000 ; -- 1..9999
|
Sub10000 ; -- 1..9999
|
||||||
|
|
||||||
data
|
data
|
||||||
pot4 : Sub10000 -> Sub1000000 ; -- m * 10000
|
pot3X : Sub10000 -> Sub1000000 ; -- m * 10000
|
||||||
pot4plus : Sub10000 -> Sub10000 -> Sub1000000 ; -- m * 10000 + n
|
pot3Xplus : Sub10000 -> Sub10000 -> Sub1000000 ; -- m * 10000 + n
|
||||||
|
|
||||||
-- Conjunctions:
|
-- Conjunctions:
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ concrete NumeralGrc of Numeral = CatGrc ** open ResGrc, MorphoGrc in {
|
|||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||||
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
||||||
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Sub1000000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Sub1000000000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
lin num x = x ;
|
lin num x = x ;
|
||||||
|
|
||||||
@@ -52,6 +54,8 @@ lin -- mkDigit d (d+10) (d*10) d-th d-times
|
|||||||
pot3plus d m = {
|
pot3plus d m = {
|
||||||
s = \\f => d.s ! NAdv ++ thousand ! f ++ "kai`" ++ m.s ! f ; n = Pl} ;
|
s = \\f => d.s ! NAdv ++ thousand ! f ++ "kai`" ++ m.s ! f ; n = Pl} ;
|
||||||
|
|
||||||
|
pot3as4 n = n ;
|
||||||
|
pot4as5 n = n ;
|
||||||
|
|
||||||
-- numerals as sequences of digits
|
-- numerals as sequences of digits
|
||||||
|
|
||||||
|
|||||||
9
src/api/CombinatorsHrv.gf
Normal file
9
src/api/CombinatorsHrv.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
|
resource CombinatorsHrv = Combinators with
|
||||||
|
(Cat = CatHrv),
|
||||||
|
(Structural = StructuralHrv),
|
||||||
|
(Constructors = ConstructorsHrv)
|
||||||
|
** open MissingHrv in {}
|
||||||
|
|
||||||
|
|
||||||
@@ -121,9 +121,9 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
mkText : QS -> Text -- Did she sleep?
|
mkText : QS -> Text -- Did she sleep?
|
||||||
= \q -> TQuestMark (PhrUtt NoPConj (UttQS q) NoVoc) TEmpty ; --%
|
= \q -> TQuestMark (PhrUtt NoPConj (UttQS q) NoVoc) TEmpty ; --%
|
||||||
mkText : (Pol) -> Imp -> Text -- Don't sleep!
|
mkText : (Pol) -> Imp -> Text -- Don't sleep!
|
||||||
= \p,i -> TExclMark (PhrUtt NoPConj (UttImpSg p i) NoVoc) TEmpty; --%
|
= \p,i -> TExclMark (PhrUtt NoPConj (UttImpSg p i) NoVoc) TEmpty ; --%
|
||||||
mkText : Imp -> Text -- Sleep! --%
|
mkText : Imp -> Text -- Sleep! --%
|
||||||
= \i -> TExclMark (PhrUtt NoPConj (UttImpSg PPos i) NoVoc) TEmpty; --%
|
= \i -> TExclMark (PhrUtt NoPConj (UttImpSg PPos i) NoVoc) TEmpty ; --%
|
||||||
|
|
||||||
-- Finally, two texts can be combined into a text.
|
-- Finally, two texts can be combined into a text.
|
||||||
|
|
||||||
@@ -374,11 +374,11 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
mkCl = overload {
|
mkCl = overload {
|
||||||
|
|
||||||
mkCl : NP -> V -> Cl -- she sleeps
|
mkCl : NP -> V -> Cl -- she sleeps
|
||||||
= \s,v -> PredVP s (UseV v); --%
|
= \s,v -> PredVP s (UseV v) ; --%
|
||||||
mkCl : NP -> V2 -> NP -> Cl -- she loves him
|
mkCl : NP -> V2 -> NP -> Cl -- she loves him
|
||||||
= \s,v,o -> PredVP s (ComplV2 v o); --%
|
= \s,v,o -> PredVP s (ComplV2 v o) ; --%
|
||||||
mkCl : NP -> V3 -> NP -> NP -> Cl -- she sends it to him
|
mkCl : NP -> V3 -> NP -> NP -> Cl -- she sends it to him
|
||||||
= \s,v,o,i -> PredVP s (ComplV3 v o i); --%
|
= \s,v,o,i -> PredVP s (ComplV3 v o i) ; --%
|
||||||
mkCl : NP -> VV -> VP -> Cl -- she wants to sleep
|
mkCl : NP -> VV -> VP -> Cl -- she wants to sleep
|
||||||
= \s,v,vp -> PredVP s (ComplVV v vp) ; --%
|
= \s,v,vp -> PredVP s (ComplVV v vp) ; --%
|
||||||
mkCl : NP -> VS -> S -> Cl -- she says that she sleeps
|
mkCl : NP -> VS -> S -> Cl -- she says that she sleeps
|
||||||
@@ -1006,9 +1006,9 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
|
|
||||||
|
|
||||||
mkCN : A -> N -> CN -- big house
|
mkCN : A -> N -> CN -- big house
|
||||||
= \x,y -> AdjCN (PositA x) (UseN y); --%
|
= \x,y -> AdjCN (PositA x) (UseN y) ; --%
|
||||||
mkCN : A -> CN -> CN -- big blue house
|
mkCN : A -> CN -> CN -- big blue house
|
||||||
= \x,y -> AdjCN (PositA x) y; --%
|
= \x,y -> AdjCN (PositA x) y ; --%
|
||||||
mkCN : AP -> N -> CN -- very big house
|
mkCN : AP -> N -> CN -- very big house
|
||||||
= \x,y -> AdjCN x (UseN y) ; --%
|
= \x,y -> AdjCN x (UseN y) ; --%
|
||||||
mkCN : AP -> CN -> CN -- very big blue house
|
mkCN : AP -> CN -> CN -- very big blue house
|
||||||
@@ -1211,11 +1211,11 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
mkQCl : IP -> VP -> QCl -- who sleeps --:
|
mkQCl : IP -> VP -> QCl -- who sleeps --:
|
||||||
= QuestVP ; --%
|
= QuestVP ; --%
|
||||||
mkQCl : IP -> V -> QCl -- who sleeps
|
mkQCl : IP -> V -> QCl -- who sleeps
|
||||||
= \s,v -> QuestVP s (UseV v); --%
|
= \s,v -> QuestVP s (UseV v) ; --%
|
||||||
mkQCl : IP -> V2 -> NP -> QCl -- who loves her
|
mkQCl : IP -> V2 -> NP -> QCl -- who loves her
|
||||||
= \s,v,o -> QuestVP s (ComplV2 v o); --%
|
= \s,v,o -> QuestVP s (ComplV2 v o) ; --%
|
||||||
mkQCl : IP -> V3 -> NP -> NP -> QCl -- who sends it to her
|
mkQCl : IP -> V3 -> NP -> NP -> QCl -- who sends it to her
|
||||||
= \s,v,o,i -> QuestVP s (ComplV3 v o i); --%
|
= \s,v,o,i -> QuestVP s (ComplV3 v o i) ; --%
|
||||||
mkQCl : IP -> VV -> VP -> QCl -- who wants to sleep
|
mkQCl : IP -> VV -> VP -> QCl -- who wants to sleep
|
||||||
= \s,v,vp -> QuestVP s (ComplVV v vp) ; --%
|
= \s,v,vp -> QuestVP s (ComplVV v vp) ; --%
|
||||||
mkQCl : IP -> VS -> S -> QCl -- who says that she sleeps
|
mkQCl : IP -> VS -> S -> QCl -- who says that she sleeps
|
||||||
@@ -1408,11 +1408,11 @@ incomplete resource Constructors = open Grammar in { --%
|
|||||||
= RelVP ; --%
|
= RelVP ; --%
|
||||||
|
|
||||||
mkRCl : RP -> V -> RCl -- who sleeps
|
mkRCl : RP -> V -> RCl -- who sleeps
|
||||||
= \s,v -> RelVP s (UseV v); --%
|
= \s,v -> RelVP s (UseV v) ; --%
|
||||||
mkRCl : RP -> V2 -> NP -> RCl -- who loves her
|
mkRCl : RP -> V2 -> NP -> RCl -- who loves her
|
||||||
= \s,v,o -> RelVP s (ComplV2 v o); --%
|
= \s,v,o -> RelVP s (ComplV2 v o) ; --%
|
||||||
mkRCl : RP -> V3 -> NP -> NP -> RCl -- who sends it to her
|
mkRCl : RP -> V3 -> NP -> NP -> RCl -- who sends it to her
|
||||||
= \s,v,o,i -> RelVP s (ComplV3 v o i); --%
|
= \s,v,o,i -> RelVP s (ComplV3 v o i) ; --%
|
||||||
mkRCl : RP -> VV -> VP -> RCl -- who wants to sleep
|
mkRCl : RP -> VV -> VP -> RCl -- who wants to sleep
|
||||||
= \s,v,vp -> RelVP s (ComplVV v vp) ; --%
|
= \s,v,vp -> RelVP s (ComplVV v vp) ; --%
|
||||||
mkRCl : RP -> VS -> S -> RCl -- who says that she sleeps
|
mkRCl : RP -> VS -> S -> RCl -- who says that she sleeps
|
||||||
|
|||||||
5
src/api/ConstructorsHrv.gf
Normal file
5
src/api/ConstructorsHrv.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
|
resource ConstructorsHrv = Constructors with (Grammar = GrammarHrv)
|
||||||
|
** open MissingHrv in {}
|
||||||
|
|
||||||
6
src/api/SymbolicHrv.gf
Normal file
6
src/api/SymbolicHrv.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:../slovak:../common:../abstract:../prelude
|
||||||
|
|
||||||
|
resource SymbolicHrv = Symbolic with
|
||||||
|
(Symbol = SymbolHrv),
|
||||||
|
(Grammar = GrammarHrv)
|
||||||
|
** open MissingHrv in {}
|
||||||
4
src/api/SyntaxHrv.gf
Normal file
4
src/api/SyntaxHrv.gf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
--# -path=.:./alltenses:../prelude
|
||||||
|
|
||||||
|
instance SyntaxHrv of Syntax =
|
||||||
|
ConstructorsHrv, CatHrv, StructuralHrv, CombinatorsHrv ;
|
||||||
13
src/api/TryHrv.gf
Normal file
13
src/api/TryHrv.gf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
--# -path=.:../slovak:../common:../abstract:../prelude
|
||||||
|
|
||||||
|
resource TryHrv = SyntaxHrv, LexiconHrv, ParadigmsHrv -[mkAdv, mkAdN, mkOrd, mkDet, mkQuant]**
|
||||||
|
open (P = ParadigmsHrv) in {
|
||||||
|
|
||||||
|
-- oper
|
||||||
|
|
||||||
|
-- mkAdv = overload SyntaxHrv {
|
||||||
|
-- mkAdv : Str -> Adv = P.mkAdv ;
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ incomplete concrete CatBantu of Cat =
|
|||||||
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
||||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
|
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
|
||||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ;
|
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ;
|
||||||
PN = {s : Case => Str ; g : Gender} ;
|
GN, SN, LN, PN = {s : Case => Str ; g : Gender} ;
|
||||||
--Tense = {s : Str ; t : ResKam.Tense} ;
|
--Tense = {s : Str ; t : ResKam.Tense} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (
|
|||||||
N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ;
|
N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ;
|
||||||
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ;
|
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ;
|
||||||
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
|
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
|
||||||
PN = {s : Str; gn : GenNum} ;
|
GN = {s : Str; g : Sex} ;
|
||||||
|
SN = {s : Sex => Str; pl : Str} ;
|
||||||
|
LN, PN = {s : Str; gn : GenNum} ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}};
|
SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}};
|
||||||
|
|||||||
@@ -92,6 +92,26 @@ lin
|
|||||||
s3 = ""
|
s3 = ""
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionGN = \gn -> {
|
||||||
|
t = "същ.с.л." ;
|
||||||
|
s1= heading1 (case gn.g of {
|
||||||
|
Male => "Мъжко Име" ;
|
||||||
|
Female => "Женско Име"
|
||||||
|
}) ;
|
||||||
|
s2 = gn.s ;
|
||||||
|
s3 = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionSN = \sn -> {
|
||||||
|
t = "същ.с.ф." ;
|
||||||
|
s1= heading1 ("Фамилно Име") ;
|
||||||
|
s2 = frameTable (
|
||||||
|
tr (th "мъжко" ++ td (sn.s ! Male)) ++
|
||||||
|
tr (th "женско" ++ td (sn.s ! Female)) ++
|
||||||
|
tr (th "семейно" ++ td sn.pl)) ;
|
||||||
|
s3 = ""
|
||||||
|
} ;
|
||||||
|
|
||||||
InflectionA, InflectionA2 = \a -> {
|
InflectionA, InflectionA2 = \a -> {
|
||||||
t = "пр" ;
|
t = "пр" ;
|
||||||
s1= heading1 ("Прилагателно") ;
|
s1= heading1 ("Прилагателно") ;
|
||||||
|
|||||||
@@ -300,5 +300,22 @@ lin UseDAP dap = {
|
|||||||
p = NounP3 dap.p
|
p = NounP3 dap.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
lin UseComp_estar = UseComp ;
|
||||||
|
UseComp_ser = UseComp ;
|
||||||
|
|
||||||
|
lin ProDrop pro = pro ;
|
||||||
|
|
||||||
|
lin AnaphPron np =
|
||||||
|
case <np.gn, np.p> of {
|
||||||
|
<GSg _, PronP1> => i_Pron ;
|
||||||
|
<GSg _, PronP2> => youSg_Pron ;
|
||||||
|
<GSg Masc, _> => he_Pron ;
|
||||||
|
<GSg Fem, _> => she_Pron ;
|
||||||
|
<GSg Neutr, _> => it_Pron ;
|
||||||
|
<GPl, PronP1> => we_Pron ;
|
||||||
|
<GPl, PronP2> => youPl_Pron ;
|
||||||
|
<GPl, _> => they_Pron
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ concrete GrammarBul of Grammar =
|
|||||||
TextBul,
|
TextBul,
|
||||||
StructuralBul,
|
StructuralBul,
|
||||||
IdiomBul,
|
IdiomBul,
|
||||||
TenseX - [CAdv,IAdv,AdV,SC]
|
TenseX - [CAdv,IAdv,AdV,SC],
|
||||||
|
NamesBul
|
||||||
** {
|
** {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|||||||
@@ -271,6 +271,18 @@ oper
|
|||||||
feminine : Gender = Fem ;
|
feminine : Gender = Fem ;
|
||||||
neutr : Gender = Neut ;
|
neutr : Gender = Neut ;
|
||||||
|
|
||||||
|
male : Sex = Male ;
|
||||||
|
female : Sex = Female ;
|
||||||
|
|
||||||
|
mkGN : Str -> Sex -> GN =
|
||||||
|
\s,g -> lin GN {s = s; g = g} ;
|
||||||
|
mkSN = overload {
|
||||||
|
mkSN : Str -> SN =
|
||||||
|
\s -> lin SN {s = \\_ => s; pl = s} ;
|
||||||
|
mkSN : Str -> Str -> Str -> SN =
|
||||||
|
\m,f,pl -> lin SN {s = table Sex [m; f]; pl = pl} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
mkPN = overload {
|
mkPN = overload {
|
||||||
mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ;
|
mkPN : Str -> PN = \s -> {s = s; gn = GSg Masc ; lock_PN = <>} ;
|
||||||
mkPN : Str -> Gender -> PN =
|
mkPN : Str -> Gender -> PN =
|
||||||
|
|||||||
39
src/bulgarian/NamesBul.gf
Normal file
39
src/bulgarian/NamesBul.gf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
concrete NamesBul of Names = CatBul ** open ResBul in {
|
||||||
|
|
||||||
|
lin GivenName = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s;
|
||||||
|
_ => n.s
|
||||||
|
} ;
|
||||||
|
gn = GSg (sex2gender n.g) ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin MaleSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s ! Male;
|
||||||
|
_ => n.s ! Male
|
||||||
|
} ;
|
||||||
|
gn = GSg Masc ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin FemaleSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.s ! Female;
|
||||||
|
_ => n.s ! Female
|
||||||
|
} ;
|
||||||
|
gn = GSg Fem ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin PlSurname = \n -> {
|
||||||
|
s = table { RObj c => linCase c Pos ++ n.pl ;
|
||||||
|
_ => n.pl
|
||||||
|
} ;
|
||||||
|
gn = GPl ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = table { RObj c => linCase c Pos ++ gn.s ++ sn.s ! gn.g ;
|
||||||
|
_ => gn.s ++ sn.s ! gn.g
|
||||||
|
} ;
|
||||||
|
gn = GSg (sex2gender gn.g) ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -118,6 +118,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
|||||||
NumDigits n = {s = \\gspec => n.s ! NCard gspec; nn = case n.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
NumDigits n = {s = \\gspec => n.s ! NCard gspec; nn = case n.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
||||||
OrdDigits n = {s = \\aform => n.s ! NOrd aform} ;
|
OrdDigits n = {s = \\aform => n.s ! NOrd aform} ;
|
||||||
|
|
||||||
|
NumFloat n1 n2 = {s = \\gspec => n1.s ! NCard (CFMasc Indef NonHuman) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard gspec ; nn = NCountable} ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\gspec => numeral.s ! NCard gspec; nn = case numeral.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
NumNumeral numeral = {s = \\gspec => numeral.s ! NCard gspec; nn = case numeral.n of {Sg => NNum Sg; Pl => NCountable}} ;
|
||||||
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
|
OrdNumeral numeral = {s = \\aform => numeral.s ! NOrd aform} ;
|
||||||
|
|
||||||
@@ -238,4 +240,17 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
|||||||
p = dap.p
|
p = dap.p
|
||||||
} ;
|
} ;
|
||||||
DetDAP det = det ;
|
DetDAP det = det ;
|
||||||
|
|
||||||
|
QuantityNP n m = {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n.s ! NCard (CFMasc Indef NonHuman)) ;
|
||||||
|
gn = gennum (AMasc NonHuman) n.n ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP n1 n2 m = {
|
||||||
|
s = \\role => preOrPost m.isPre m.s (n1.s ! NCard (CFMasc Indef NonHuman) ++ BIND ++ "." ++ BIND ++ n2.s ! NCard (CFMasc Indef NonHuman)) ;
|
||||||
|
gn = gennum (AMasc NonHuman) Pl ;
|
||||||
|
p = NounP3 Pos
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul
|
|||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
Sub10 = {s : DForm => CardOrd => Str; n : Number} ;
|
Sub10 = {s : DForm => CardOrd => Str; n : Number} ;
|
||||||
Sub100 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
Sub100 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
||||||
Sub1000 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
Sub1000 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
||||||
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
||||||
|
Sub1000000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
||||||
|
Sub1000000000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
||||||
|
|
||||||
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
|
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
|
||||||
lin n2 = mkDigit "два" "двама" "две" "втори" "двайсет" "двеста" "двестата" ;
|
lin n2 = mkDigit "два" "двама" "две" "втори" "двайсет" "двеста" "двестата" ;
|
||||||
@@ -52,24 +54,33 @@ lin pot01 =
|
|||||||
;n = Sg
|
;n = Sg
|
||||||
} ;
|
} ;
|
||||||
lin pot0 d = d ** {n = Pl} ;
|
lin pot0 d = d ** {n = Pl} ;
|
||||||
|
lin pot0as1 n = {s = \\c,nf => n.s ! unit ! c; n = n.n; i = True} ;
|
||||||
|
|
||||||
lin pot110 = {s=\\c,nf => pot01.s ! ten nf ! c; n = Pl; i = True} ;
|
lin pot110 = {s=\\c,nf => pot01.s ! ten nf ! c; n = Pl; i = True} ;
|
||||||
lin pot111 = {s=\\c,nf => pot01.s ! teen nf ! c; n = Pl; i = True} ;
|
lin pot111 = {s=\\c,nf => pot01.s ! teen nf ! c; n = Pl; i = True} ;
|
||||||
lin pot1to19 d = {s = \\c,nf => d.s ! teen nf ! c; n = Pl; i = True} ;
|
lin pot1to19 d = {s = \\c,nf => d.s ! teen nf ! c; n = Pl; i = True} ;
|
||||||
lin pot0as1 n = {s = \\c,nf => n.s ! unit ! c; n = n.n; i = True} ;
|
|
||||||
lin pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
|
lin pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
|
||||||
lin pot1plus d e = {
|
lin pot1plus d e = {
|
||||||
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "и" ++ e.s ! unit ! c ; n = Pl; i = False} ;
|
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "и" ++ e.s ! unit ! c ; n = Pl; i = False} ;
|
||||||
|
|
||||||
lin pot1as2 n = n ;
|
lin pot1as2 n = n ;
|
||||||
|
|
||||||
|
lin pot21 = {
|
||||||
|
s = \\o,_ => mkCardOrd100 "сто" "стоте" "стотен" ! o ;
|
||||||
|
i = False ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
|
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
|
||||||
lin pot2plus d e = {
|
lin pot2plus d e = {
|
||||||
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "и"} ++ e.s ! c ! nf ;
|
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "и"} ++ e.s ! c ! nf ;
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
i = False
|
i = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin pot2as3 n = n ;
|
lin pot2as3 n = n ;
|
||||||
|
|
||||||
|
lin pot31 = {
|
||||||
|
s = \\o,_ => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! o ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
lin pot3 n = {
|
lin pot3 n = {
|
||||||
s = \\c,nf => case n.n of {
|
s = \\c,nf => case n.n of {
|
||||||
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! c ;
|
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! c ;
|
||||||
@@ -85,7 +96,52 @@ lin pot3plus n m = {
|
|||||||
++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ;
|
++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
|
lin pot3as4 n = n ;
|
||||||
|
lin pot3float f = {
|
||||||
|
s = \\c,nf => f.s ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! c ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin pot41 = {
|
||||||
|
s = \\o,_ => mkCardOrd100 "милион" "милионите" "милионен" ! o ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot4 n = {
|
||||||
|
s = \\c,nf => case n.n of {
|
||||||
|
Sg => mkCardOrd100 "милион" "милионите" "милионен" ! c ;
|
||||||
|
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "милиони" "милионите" "милионен" ! c
|
||||||
|
} ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot4plus n1 n2 = {
|
||||||
|
s = \\o,f => (pot4 n1).s ! o ! f ++ "и" ++ n2.s ! o ! f;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot4as5 n = n ;
|
||||||
|
lin pot4float f = {
|
||||||
|
s = \\c,nf => f.s ++ mkCardOrd100 "милиона" "милиона" "милионен" ! c ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin pot51 = {
|
||||||
|
s = \\o,_ => mkCardOrd100 "милиярд" "милиярдите" "милиярден" ! o ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot5 n = {
|
||||||
|
s = \\c,nf => case n.n of {
|
||||||
|
Sg => mkCardOrd100 "милиярд" "милиярдите" "милиярден" ! c ;
|
||||||
|
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "милиярд" "милиярдите" "милиярден" ! c
|
||||||
|
} ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot5plus n1 n2 = {
|
||||||
|
s = \\o,f => (pot5 n1).s ! o ! f ++ "и" ++ n2.s ! o ! f;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
lin pot5float f = {
|
||||||
|
s = \\c,nf => f.s ++ mkCardOrd100 "милиярда" "милиярда" "милиярден" ! c ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
-- numerals as sequences of digits
|
-- numerals as sequences of digits
|
||||||
|
|
||||||
|
|||||||
@@ -2116,4 +2116,7 @@ oper
|
|||||||
|
|
||||||
adjAdv : A -> Str -> A =
|
adjAdv : A -> Str -> A =
|
||||||
\a,adv -> a ** {adv = adv} ;
|
\a,adv -> a ** {adv = adv} ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
|
|
||||||
param
|
param
|
||||||
Gender = Masc | Fem | Neut ;
|
Gender = Masc | Fem | Neut ;
|
||||||
|
Sex = Male | Female ;
|
||||||
|
|
||||||
Species = Indef | Def ;
|
Species = Indef | Def ;
|
||||||
|
|
||||||
@@ -851,4 +852,11 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
APl Indef => "свои" ;
|
APl Indef => "свои" ;
|
||||||
APl Def => "своите"
|
APl Def => "своите"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
sex2gender : Sex -> Gender = \g ->
|
||||||
|
case g of {
|
||||||
|
Male => Masc ;
|
||||||
|
Female => Fem
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,4 +225,7 @@ oper
|
|||||||
|
|
||||||
polNegDirSubj = RPos ;
|
polNegDirSubj = RPos ;
|
||||||
|
|
||||||
|
param
|
||||||
|
HasArt = NoArt | UseArt ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,5 +15,4 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
|||||||
ParadigmsCat in {
|
ParadigmsCat in {
|
||||||
-- put your own definitions here
|
-- put your own definitions here
|
||||||
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarCat of Grammar =
|
|||||||
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
|
||||||
IdiomCat,
|
IdiomCat,
|
||||||
StructuralCat,
|
StructuralCat,
|
||||||
TenseCat
|
TenseCat,
|
||||||
|
NamesCat
|
||||||
|
|
||||||
** {
|
** {
|
||||||
|
|
||||||
|
|||||||
9
src/catalan/NamesCat.gf
Normal file
9
src/catalan/NamesCat.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesCat of Names = CatCat ** open ResCat in {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname = \n -> pn2np n ;
|
||||||
|
lin FullName gn sn = pn2np {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
g = gn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,6 +12,8 @@ lincat
|
|||||||
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
||||||
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Sub1000000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Sub1000000000000 = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
|
|
||||||
-- Auxiliaries
|
-- Auxiliaries
|
||||||
@@ -126,6 +128,8 @@ lin
|
|||||||
{s= \\co => (table {Sg => []; Pl => (n.s ! co)} ! n.n) ++ "mil" ++ (m.s !co);
|
{s= \\co => (table {Sg => []; Pl => (n.s ! co)} ! n.n) ++ "mil" ++ (m.s !co);
|
||||||
n= Pl} ;
|
n= Pl} ;
|
||||||
|
|
||||||
|
pot3as4 n = n ;
|
||||||
|
pot4as5 n = n ;
|
||||||
|
|
||||||
param
|
param
|
||||||
DForm = unit | teen | ten | tenplus | Aunit | OrdF ;
|
DForm = unit | teen | ten | tenplus | Aunit | OrdF ;
|
||||||
|
|||||||
@@ -553,6 +553,6 @@ oper
|
|||||||
mk2V2 : V -> Prep -> V2 ;
|
mk2V2 : V -> Prep -> V2 ;
|
||||||
dirV2 : V -> V2 ;
|
dirV2 : V -> V2 ;
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ concrete AdjectiveChi of Adjective = CatChi ** open ResChi, Prelude in {
|
|||||||
PositA a = a ** {hasAdA = False} ;
|
PositA a = a ** {hasAdA = False} ;
|
||||||
|
|
||||||
ComparA a np = a ** {
|
ComparA a np = a ** {
|
||||||
s = table {_=> than_s ++ np.s ++ a.s!Attr};
|
s = table {_=> than_s ++ linNP np ++ a.s!Attr};
|
||||||
hasAdA = False
|
hasAdA = False
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -26,11 +26,11 @@ concrete AdjectiveChi of Adjective = CatChi ** open ResChi, Prelude in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
CAdvAP ad ap np = ap ** {
|
CAdvAP ad ap np = ap ** {
|
||||||
s = table {adjPlace => ad.s ++ np.s ++ ad.p ++ ap.s!adjPlace}
|
s = table {adjPlace => ad.s ++ linNP np ++ ad.p ++ ap.s!adjPlace}
|
||||||
};
|
};
|
||||||
|
|
||||||
ComplA2 a np = a ** {
|
ComplA2 a np = a ** {
|
||||||
s= table { adjPlace => appPrep a.c2 np.s ++ a.s!adjPlace};
|
s= table { adjPlace => appPrep a.c2 (linNP np) ++ a.s!adjPlace};
|
||||||
hasAdA = False
|
hasAdA = False
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ concrete AdverbChi of Adverb = CatChi **
|
|||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.s!Attr ++ "地" ; advType = ATManner ; hasDe = False} ; ---- for all adjs?
|
PositAdvAdj a = {s = a.s!Attr ++ "地" ; advType = ATManner ; hasDe = False} ; ---- for all adjs?
|
||||||
|
|
||||||
PrepNP prep np = ss (appPrep prep np.s) ** {advType = prep.advType ; hasDe = prep.hasDe} ; --- should depend on np too ?
|
PrepNP prep np = ss (appPrep prep (linNP np)) ** {advType = prep.advType ; hasDe = prep.hasDe} ; --- should depend on np too ?
|
||||||
|
|
||||||
ComparAdvAdj cadv a np = ss (a.s!Attr ++ cadv.s ++ cadv.p ++ np.s) ** {advType = ATManner ; hasDe = False} ;
|
ComparAdvAdj cadv a np = ss (a.s!Attr ++ cadv.s ++ cadv.p ++ (linNP np)) ** {advType = ATManner ; hasDe = False} ;
|
||||||
|
|
||||||
ComparAdvAdjS cadv a s = ss (a.s!Attr ++ cadv.s ++ cadv.p ++ linS s) ** {advType = ATManner ; hasDe = False} ;
|
ComparAdvAdjS cadv a s = ss (a.s!Attr ++ cadv.s ++ cadv.p ++ linS s) ** {advType = ATManner ; hasDe = False} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
--# -path=.:../abstract:../common:../api:../prelude
|
--# -path=.:../abstract:../common:../api:../prelude
|
||||||
|
|
||||||
concrete AllChi of AllChiAbs = LangChi, ExtraChi ;
|
concrete AllChi of AllChiAbs = LangChi, ExtendChi ;
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
abstract AllChiAbs =
|
abstract AllChiAbs =
|
||||||
Lang,
|
Lang,
|
||||||
ExtraChiAbs ;
|
Extend ;
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
|
|||||||
-- Noun
|
-- Noun
|
||||||
|
|
||||||
CN = ResChi.Noun ;
|
CN = ResChi.Noun ;
|
||||||
NP, Pron = ResChi.NP ;
|
NP = ResChi.NP ;
|
||||||
|
Pron = SS ;
|
||||||
Det = Determiner ;
|
Det = Determiner ;
|
||||||
Quant = Determiner ** {pl : Str} ;
|
Quant = Determiner ** {pl : Str} ;
|
||||||
Predet = {s : Str} ; ----
|
Predet = {s : Str} ; ----
|
||||||
@@ -79,7 +80,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
|
|||||||
N = ResChi.Noun ;
|
N = ResChi.Noun ;
|
||||||
N2 = ResChi.Noun ** {c2 : Preposition} ;
|
N2 = ResChi.Noun ** {c2 : Preposition} ;
|
||||||
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
|
N3 = ResChi.Noun ** {c2,c3 : Preposition} ;
|
||||||
PN = ResChi.NP ;
|
GN, SN, LN, PN = SS ;
|
||||||
|
|
||||||
-- overridden
|
-- overridden
|
||||||
|
|
||||||
@@ -89,4 +90,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
|
|||||||
|
|
||||||
linref
|
linref
|
||||||
S = linS ;
|
S = linS ;
|
||||||
|
Prep = linPrep ;
|
||||||
|
VP = infVP ;
|
||||||
|
NP = \np -> np.det ++ np.s ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
|
|||||||
postJiu = ss.postJiu}
|
postJiu = ss.postJiu}
|
||||||
} ;
|
} ;
|
||||||
ConjAdv c as = conjunctDistrSS (c.s ! CSent) as ** {advType = as.advType ; hasDe = as.hasDe} ; ---- ??
|
ConjAdv c as = conjunctDistrSS (c.s ! CSent) as ** {advType = as.advType ; hasDe = as.hasDe} ; ---- ??
|
||||||
ConjNP c = conjunctDistrSS (c.s ! CPhr CNPhrase) ;
|
ConjNP c nps = conjunctDistrSS (c.s ! CPhr CNPhrase) nps ** {det = []} ;
|
||||||
ConjAP c as = conjunctDistrTable AdjPlace (c.s ! CPhr CAPhrase) as ** {monoSyl = notB as.monoSyl ; hasAdA = True} ; ---- add de iff as doesn't
|
ConjAP c as = conjunctDistrTable AdjPlace (c.s ! CPhr CAPhrase) as ** {monoSyl = notB as.monoSyl ; hasAdA = True} ; ---- add de iff as doesn't
|
||||||
ConjRS c = conjunctDistrSS (c.s ! CSent) ;
|
ConjRS c = conjunctDistrSS (c.s ! CSent) ;
|
||||||
ConjCN c ns = conjunctDistrSS (c.s ! CPhr CNPhrase) ns ** {c = ns.c} ;
|
ConjCN c ns = conjunctDistrSS (c.s ! CPhr CNPhrase) ns ** {c = ns.c} ;
|
||||||
@@ -28,8 +28,8 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
|
|||||||
|
|
||||||
BaseAdv x y = twoSS x y ** {advType = x.advType ; hasDe = y.hasDe} ; ---- ??
|
BaseAdv x y = twoSS x y ** {advType = x.advType ; hasDe = y.hasDe} ; ---- ??
|
||||||
ConsAdv x xs = consrSS duncomma x xs ** {advType = x.advType ; hasDe = xs.hasDe} ; ---- ??
|
ConsAdv x xs = consrSS duncomma x xs ** {advType = x.advType ; hasDe = xs.hasDe} ; ---- ??
|
||||||
BaseNP = twoSS ;
|
BaseNP np1 np2 = twoSS (mergeNP np1) (mergeNP np2) ;
|
||||||
ConsNP = consrSS duncomma ;
|
ConsNP np nps = consrSS duncomma (mergeNP np) nps ;
|
||||||
BaseAP x y = twoTable AdjPlace x y ** {monoSyl = y.monoSyl} ;
|
BaseAP x y = twoTable AdjPlace x y ** {monoSyl = y.monoSyl} ;
|
||||||
ConsAP x xs = consrTable AdjPlace duncomma x xs ** {monoSyl = xs.monoSyl} ;
|
ConsAP x xs = consrTable AdjPlace duncomma x xs ** {monoSyl = xs.monoSyl} ;
|
||||||
BaseRS = twoSS ;
|
BaseRS = twoSS ;
|
||||||
@@ -46,5 +46,8 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
|
|||||||
[RS] = {s1,s2 : Str} ;
|
[RS] = {s1,s2 : Str} ;
|
||||||
[CN] = {s1,s2 : Str ; c : Str} ;
|
[CN] = {s1,s2 : Str ; c : Str} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mergeNP : ResChi.NP -> SS = \np -> ss (linNP np) ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ lin
|
|||||||
monthYearAdv m y = lin Adv {s = y.s ++ "年" ++ m.s ; advType = timeAdvType ; hasDe = False} ;
|
monthYearAdv m y = lin Adv {s = y.s ++ "年" ++ m.s ; advType = timeAdvType ; hasDe = False} ;
|
||||||
dayMonthYearAdv d m y = lin Adv {s = y.s ++ "年" ++ m.s ++ d.s ++ "日" ; advType = timeAdvType ; hasDe = False} ;
|
dayMonthYearAdv d m y = lin Adv {s = y.s ++ "年" ++ m.s ++ d.s ++ "日" ; advType = timeAdvType ; hasDe = False} ;
|
||||||
|
|
||||||
intYear i = lin NP i ;
|
intYear i = lin NP (R.mkNP i.s) ;
|
||||||
intMonthday i = lin NP i ;
|
intMonthday i = lin NP (R.mkNP i.s) ;
|
||||||
|
|
||||||
lincat Language = N ;
|
lincat Language = N ;
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,24 @@ lin
|
|||||||
s2 = inflVerb verb
|
s2 = inflVerb verb
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
InflectionPN = \n -> {
|
||||||
|
t = "v" ;
|
||||||
|
s1 = heading1 "Proper Name" ;
|
||||||
|
s2 = n.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionGN = \n -> {
|
||||||
|
t = "v" ;
|
||||||
|
s1 = heading1 "Given Name" ;
|
||||||
|
s2 = n.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InflectionSN = \n -> {
|
||||||
|
t = "v" ;
|
||||||
|
s1 = heading1 "Surname Name" ;
|
||||||
|
s2 = n.s
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
inflVerb : Verb -> Str = \verb ->
|
inflVerb : Verb -> Str = \verb ->
|
||||||
let vtbl = useVerb verb
|
let vtbl = useVerb verb
|
||||||
|
|||||||
@@ -1,10 +1,80 @@
|
|||||||
--# -path=alltenses:../common:../abstract
|
--# -path=alltenses:../common:../abstract
|
||||||
|
|
||||||
concrete ExtendChi of Extend = CatChi **
|
concrete ExtendChi of Extend = CatChi **
|
||||||
ExtendFunctor - [ProDrop,ComplDirectVS, ComplDirectVQ]
|
ExtendFunctor - [
|
||||||
with (Grammar=GrammarChi) ** open Prelude, ResChi in {
|
VPS, ListVPS, VPI, ListVPI
|
||||||
|
, MkVPS, BaseVPS, ConsVPS, ConjVPS
|
||||||
|
, PredVPS, SQuestVPS, RelVPS --, QuestVPS -- TODO
|
||||||
|
, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV
|
||||||
|
, VPS2, ListVPS2, VPI2, ListVPI2
|
||||||
|
, MkVPS2, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, ReflVPS2
|
||||||
|
, MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2
|
||||||
|
, ProDrop, ComplDirectVS, ComplDirectVQ
|
||||||
|
, PassVPSlash, PassAgentVPSlash
|
||||||
|
, GerundAdv, GerundNP, ByVP, ApposNP ]
|
||||||
|
with (Grammar=GrammarChi) ** open
|
||||||
|
Prelude
|
||||||
|
, Coordination
|
||||||
|
, ResChi
|
||||||
|
, (S=StructuralChi)
|
||||||
|
in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS, VPI = SS ;
|
||||||
|
[VPS], [VPI] = ListX ;
|
||||||
|
VPS2, VPI2 = SS ** {c2 : Preposition ; isPre : Bool} ; -- whether the missing arg is before verb
|
||||||
|
[VPS2], [VPI2] = ListX ** {c2 : Preposition ; isPre : Bool} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
PassVPSlash vps = insertAdv (mkNP passive_s) vps ;
|
||||||
|
PassAgentVPSlash vps np = insertAdv (ss (appPrep S.by8agent_Prep (linNP np))) (insertAdv (mkNP passive_s) vps) ;
|
||||||
|
|
||||||
|
MkVPS t p vp = {s = t.s ++ p.s ++ (mkClause [] vp).s ! p.p ! t.t} ;
|
||||||
|
ConjVPS c = conjunctDistrSS (c.s ! CSent) ;
|
||||||
|
BaseVPS = twoSS ;
|
||||||
|
ConsVPS = consrSS duncomma ;
|
||||||
|
|
||||||
|
-- : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||||
|
PredVPS np vps = {preJiu = (linNP np) ; postJiu = vps.s} ;
|
||||||
|
|
||||||
|
-- : NP -> VPS -> QS ; -- has she walked
|
||||||
|
SQuestVPS np vps = {s = \\_ => linNP np ++ vps.s ++ question_s} ;
|
||||||
|
|
||||||
|
-- : IP -> VPS -> QS ; -- who has walked
|
||||||
|
-- QuestVPS ip vps = -- TODO: probably need to change structure of VPS
|
||||||
|
|
||||||
|
-- : RP -> VPS -> RS ; -- which won't sleep
|
||||||
|
RelVPS rp vps = {s = rp.s ! True ++ vps.s ++ "的"} ;
|
||||||
|
|
||||||
|
MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ;
|
||||||
|
ConjVPI c = conjunctDistrSS (c.s ! CSent) ;
|
||||||
|
BaseVPI = twoSS ;
|
||||||
|
ConsVPI = consrSS duncomma ;
|
||||||
|
|
||||||
|
MkVPS2 t p vps = {s = t.s ++ p.s ++ (mkClause [] <vps : ResChi.VP>).s ! p.p ! t.t} ** vps ;
|
||||||
|
ConjVPS2 c vs = conjunctDistrSS (c.s ! CSent) vs ** vs ;
|
||||||
|
BaseVPS2 v w = twoSS v w ** w ;
|
||||||
|
ConsVPS2 v vs = consrSS duncomma v vs ** vs ;
|
||||||
|
|
||||||
|
MkVPI2 vps = {s = (mkClause [] <vps : ResChi.VP>).s ! Pos ! APlain} ** vps ;
|
||||||
|
ConjVPI2 c vs = conjunctDistrSS (c.s ! CSent) vs ** vs ;
|
||||||
|
BaseVPI2 v w = twoSS v w ** w ;
|
||||||
|
ConsVPI2 v vs = consrSS duncomma v vs ** vs ;
|
||||||
|
|
||||||
|
ComplVPIVV vv vpi = predV vv [] ** {
|
||||||
|
compl = vpi.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
GerundAdv vp = mkAdv (infVP vp) ;
|
||||||
|
GerundNP vp = ResChi.mkNP (infVP vp) ;
|
||||||
|
|
||||||
|
ByVP vp =
|
||||||
|
let adv : Adv = GerundAdv vp
|
||||||
|
in adv ** {s = adv.s ++ "来" ; advType = ATTime} ;
|
||||||
|
|
||||||
|
GenNP np = {s,pl = linNP np ++ possessive_s ; detType = DTPoss} ;
|
||||||
|
GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ;
|
||||||
|
|
||||||
ProDrop pron = pron ** {s = []} ;
|
ProDrop pron = pron ** {s = []} ;
|
||||||
ComplDirectVS vs utt =
|
ComplDirectVS vs utt =
|
||||||
AdvVP (UseV <lin V vs : V>)
|
AdvVP (UseV <lin V vs : V>)
|
||||||
@@ -13,7 +83,11 @@ concrete ExtendChi of Extend = CatChi **
|
|||||||
AdvVP (UseV <lin V vq : V>)
|
AdvVP (UseV <lin V vq : V>)
|
||||||
(mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes
|
(mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes
|
||||||
|
|
||||||
|
lin
|
||||||
|
ApposNP np1 np2 = {s = np1.s ++ np2.s; det = np1.det} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkAdv : Str -> Adv ;
|
mkAdv : Str -> CatChi.Adv ;
|
||||||
mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ;
|
mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ;
|
||||||
};
|
|
||||||
|
};
|
||||||
|
|||||||
@@ -11,21 +11,21 @@ concrete ExtraChi of ExtraChiAbs = CatChi **
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
PassVPSlash vps = insertAdv (mkNP passive_s) vps ;
|
PassVPSlash vps = insertAdv (mkNP passive_s) vps ;
|
||||||
PassAgentVPSlash vps np = insertAdv (ss (appPrep S.by8agent_Prep np.s)) (insertAdv (mkNP passive_s) vps) ;
|
PassAgentVPSlash vps np = insertAdv (ss (appPrep S.by8agent_Prep (linNP np))) (insertAdv (mkNP passive_s) vps) ;
|
||||||
|
|
||||||
MkVPS t p vp = {s = t.s ++ p.s ++ (mkClause [] vp).s ! p.p ! t.t} ;
|
MkVPS t p vp = {s = t.s ++ p.s ++ (mkClause [] vp).s ! p.p ! t.t} ;
|
||||||
ConjVPS c = conjunctDistrSS (c.s ! CSent) ;
|
ConjVPS c = conjunctDistrSS (c.s ! CSent) ;
|
||||||
BaseVPS = twoSS ;
|
BaseVPS = twoSS ;
|
||||||
ConsVPS = consrSS duncomma ;
|
ConsVPS = consrSS duncomma ;
|
||||||
|
|
||||||
PredVPS np vps = {preJiu = np.s ; postJiu = vps.s} ;
|
PredVPS np vps = {preJiu = (linNP np) ; postJiu = vps.s} ;
|
||||||
|
|
||||||
MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ; --- ?? almost just a copy of VPS
|
MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ; --- ?? almost just a copy of VPS
|
||||||
ConjVPI c = conjunctDistrSS (c.s ! CSent) ;
|
ConjVPI c = conjunctDistrSS (c.s ! CSent) ;
|
||||||
BaseVPI = twoSS ;
|
BaseVPI = twoSS ;
|
||||||
ConsVPI = consrSS duncomma ;
|
ConsVPI = consrSS duncomma ;
|
||||||
|
|
||||||
GenNP np = {s,pl = np.s ++ possessive_s ; detType = DTPoss} ;
|
GenNP np = {s,pl = linNP np ++ possessive_s ; detType = DTPoss} ;
|
||||||
|
|
||||||
GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ; ---- ??
|
GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ; ---- ??
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ concrete GrammarChi of Grammar =
|
|||||||
TextChi,
|
TextChi,
|
||||||
StructuralChi,
|
StructuralChi,
|
||||||
IdiomChi,
|
IdiomChi,
|
||||||
TenseChi
|
TenseChi,
|
||||||
|
NamesChi
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ concrete IdiomChi of Idiom = CatChi ** open Prelude, ResChi in {
|
|||||||
-- GenericCl vp = mkClause "有人" vp ; (meaning: there is a person)
|
-- GenericCl vp = mkClause "有人" vp ; (meaning: there is a person)
|
||||||
|
|
||||||
---- it is John who did it
|
---- it is John who did it
|
||||||
CleftNP np rs = mkClause rs.s copula np.s ; -- did it + de + is I
|
CleftNP np rs = mkClause rs.s copula (linNP np) ; -- did it + de + is I
|
||||||
|
|
||||||
CleftAdv ad s = mkClause (linS s ++ possessive_s) copula ad.s ; -- she sleeps + de + is here
|
CleftAdv ad s = mkClause (linS s ++ possessive_s) copula ad.s ; -- she sleeps + de + is here
|
||||||
|
|
||||||
ExistNP np = mkClause [] (regVerb you_s) np.s ; ---- infl of you
|
ExistNP np = mkClause [] (regVerb you_s) (linNP np) ; ---- infl of you
|
||||||
|
|
||||||
ExistIP ip = {s = \\_ => (mkClause [] (regVerb you_s) ip.s).s} ; ---- infl of you
|
ExistIP ip = {s = \\_ => (mkClause [] (regVerb you_s) ip.s).s} ; ---- infl of you
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ concrete IdiomChi of Idiom = CatChi ** open Prelude, ResChi in {
|
|||||||
|
|
||||||
SelfAdvVP vp = insertAdv (ss reflPron) vp ;
|
SelfAdvVP vp = insertAdv (ss reflPron) vp ;
|
||||||
SelfAdVVP vp = insertAdv (ss reflPron) vp ;
|
SelfAdVVP vp = insertAdv (ss reflPron) vp ;
|
||||||
SelfNP np = {s = np.s ++ reflPron} ;
|
SelfNP np = np ** {s = linNP np ++ reflPron} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
src/chinese/NamesChi.gf
Normal file
9
src/chinese/NamesChi.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete NamesChi of Names = CatChi ** {
|
||||||
|
|
||||||
|
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ** {det = []} ;
|
||||||
|
lin FullName gn sn = {
|
||||||
|
s = gn.s ++ sn.s ;
|
||||||
|
det = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,28 +1,33 @@
|
|||||||
concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
|
concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = case det.detType of {
|
DetCN det cn = cn ** {
|
||||||
DTFull Sg => {s = det.s ++ cn.c ++ cn.s} ; -- this house
|
det = case det.detType of {
|
||||||
DTFull Pl => {s = det.s ++ xie_s ++ cn.s} ; -- these houses
|
DTFull Sg => det.s ++ cn.c ; -- this house
|
||||||
DTNum => {s = det.s ++ cn.c ++ cn.s} ; -- (these) five houses
|
DTFull Pl => det.s ++ xie_s ; -- these houses
|
||||||
DTPoss => {s = det.s ++ cn.s} -- our (five) houses
|
DTNum => det.s ++ cn.c ; -- (these) five houses
|
||||||
} ;
|
DTPoss => det.s -- our (five) houses
|
||||||
UsePN pn = pn ;
|
}
|
||||||
UsePron p = p ;
|
} ;
|
||||||
|
|
||||||
DetNP det = {s = case det.detType of {
|
UsePN pn = pn ** {det = []} ;
|
||||||
|
UsePron p = p ** {det = []} ;
|
||||||
|
|
||||||
|
DetNP det = {
|
||||||
|
s = [] ;
|
||||||
|
det = case det.detType of {
|
||||||
DTFull Pl => det.s ++ xie_s ;
|
DTFull Pl => det.s ++ xie_s ;
|
||||||
DTPoss => det.s ;
|
DTPoss => det.s ;
|
||||||
_ => det.s ++ ge_s
|
_ => det.s ++ ge_s
|
||||||
} ;
|
} ;
|
||||||
} ; ----
|
} ; ----
|
||||||
|
|
||||||
PredetNP pred np = mkNP (pred.s ++ np.s) ; ---- possessive_s ++ np.s) ;
|
PredetNP pred np = np ** {s = pred.s ++ np.s} ; ---- possessive_s ++ np.s) ;
|
||||||
|
|
||||||
PPartNP np v2 = mkNP ((predV v2 v2.part).verb.s ++ possessive_s ++ np.s) ; ---- ??
|
PPartNP np v2 = np ** {s = (predV v2 v2.part).verb.s ++ possessive_s ++ np.s} ; ---- ??
|
||||||
|
|
||||||
AdvNP np adv = mkNP (adv.s ++ possessiveIf adv.hasDe ++ np.s) ;
|
AdvNP np adv = np ** {s = adv.s ++ possessiveIf adv.hasDe ++ np.s} ;
|
||||||
ExtAdvNP np adv = mkNP (adv.s ++ possessiveIf adv.hasDe ++ embedInCommas np.s) ; ---- commas?
|
ExtAdvNP np adv = np ** {s = adv.s ++ possessiveIf adv.hasDe ++ embedInCommas np.s} ; ---- commas?
|
||||||
|
|
||||||
DetQuant quant num = {
|
DetQuant quant num = {
|
||||||
s = case num.numType of {
|
s = case num.numType of {
|
||||||
@@ -70,15 +75,15 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
|
|||||||
DefArt = mkQuant [] [] DTPoss ; -- use that_Quant if you want the_s
|
DefArt = mkQuant [] [] DTPoss ; -- use that_Quant if you want the_s
|
||||||
IndefArt = mkQuant yi_s [] DTNum ; -- (DTFull Sg) ; -- empty in the plural
|
IndefArt = mkQuant yi_s [] DTNum ; -- (DTFull Sg) ; -- empty in the plural
|
||||||
|
|
||||||
MassNP cn = cn ;
|
MassNP cn = mkNP cn.s ;
|
||||||
|
|
||||||
UseN n = n ;
|
UseN n = n ;
|
||||||
UseN2 n = n ;
|
UseN2 n = n ;
|
||||||
Use2N3 f = {s = f.s ; c = f.c ; c2 = f.c2} ;
|
Use2N3 f = {s = f.s ; c = f.c ; c2 = f.c2} ;
|
||||||
Use3N3 f = {s = f.s ; c = f.c ; c2 = f.c3} ;
|
Use3N3 f = {s = f.s ; c = f.c ; c2 = f.c3} ;
|
||||||
|
|
||||||
ComplN2 f x = {s = appPrep f.c2 x.s ++ f.s ; c = f.c} ;
|
ComplN2 f x = {s = appPrep f.c2 (linNP x) ++ f.s ; c = f.c} ;
|
||||||
ComplN3 f x = {s = appPrep f.c2 x.s ++ f.s ; c = f.c ; c2 = f.c3} ;
|
ComplN3 f x = {s = appPrep f.c2 (linNP x) ++ f.s ; c = f.c ; c2 = f.c3} ;
|
||||||
|
|
||||||
AdjCN ap cn = case ap.monoSyl of {
|
AdjCN ap cn = case ap.monoSyl of {
|
||||||
True => {s = ap.s ! Attr ++ cn.s ; c = cn.c} ;
|
True => {s = ap.s ! Attr ++ cn.s ; c = cn.c} ;
|
||||||
@@ -88,13 +93,13 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
|
|||||||
RelCN cn rs = {s = rs.s ++ cn.s ; c = cn.c} ;
|
RelCN cn rs = {s = rs.s ++ cn.s ; c = cn.c} ;
|
||||||
AdvCN cn ad = {s = ad.s ++ possessiveIf ad.hasDe ++ cn.s ; c = cn.c} ;
|
AdvCN cn ad = {s = ad.s ++ possessiveIf ad.hasDe ++ cn.s ; c = cn.c} ;
|
||||||
SentCN cn cs = {s = cs.s ++ cn.s ; c = cn.c} ;
|
SentCN cn cs = {s = cs.s ++ cn.s ; c = cn.c} ;
|
||||||
ApposCN cn np = {s = np.s ++ cn.s ; c = cn.c} ;
|
ApposCN cn np = {s = linNP np ++ cn.s ; c = cn.c} ;
|
||||||
|
|
||||||
RelNP np rs = mkNP (rs.s ++ np.s) ;
|
RelNP np rs = np ** {s = rs.s ++ np.s} ;
|
||||||
|
|
||||||
PossNP cn np = {s = np.s ++ possessive_s ++ cn.s ; c = cn.c} ;
|
PossNP cn np = {s = linNP np ++ possessive_s ++ cn.s ; c = cn.c} ;
|
||||||
PartNP cn np = {s = np.s ++ possessive_s ++ cn.s ; c = cn.c} ;
|
PartNP cn np = {s = linNP np ++ possessive_s ++ cn.s ; c = cn.c} ;
|
||||||
|
|
||||||
CountNP det np = {s = det.s ++ ge_s ++ possessive_s ++ np.s} ; --- classifier from NP?
|
CountNP det np = np ** {det = det.s ++ ge_s ++ possessive_s ++ np.det} ; --- classifier from NP?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ lincat Digit = {s,p : Str} ; -- s/p: without/with classifier (er/liang)
|
|||||||
lincat Sub10 = {s,p,t : Str} ; -- t: with "shi wan"
|
lincat Sub10 = {s,p,t : Str} ; -- t: with "shi wan"
|
||||||
lincat Sub100 = {end0,beg0 : Zero ; s,p : Bform => Str} ; -- end0: ends with zeros, e.g. 20 ; beg0: begins with zeros, e.g. 02
|
lincat Sub100 = {end0,beg0 : Zero ; s,p : Bform => Str} ; -- end0: ends with zeros, e.g. 20 ; beg0: begins with zeros, e.g. 02
|
||||||
lincat Sub1000 = {end0,beg0 : Zero ; s,p : Qform => Str} ; -- end0: ends with zeros, e.g. 210 ; beg0: begins with zeros, e.g. 021
|
lincat Sub1000 = {end0,beg0 : Zero ; s,p : Qform => Str} ; -- end0: ends with zeros, e.g. 210 ; beg0: begins with zeros, e.g. 021
|
||||||
lincat Sub1000000 = {s,p : Str} ;
|
lincat Sub1000000, Sub1000000000, Sub1000000000000 = {s,p : Str} ;
|
||||||
lin num x0 = x0 ;
|
lin num x0 = x0 ;
|
||||||
|
|
||||||
-- 一二三四五六七八九十一百千
|
-- 一二三四五六七八九十一百千
|
||||||
@@ -137,7 +137,9 @@ lin pot3 n =
|
|||||||
{s,p = n.s ! shiwan} ;
|
{s,p = n.s ! shiwan} ;
|
||||||
lin pot3plus n m =
|
lin pot3plus n m =
|
||||||
{s,p = (n.s ! shiwan0) ++ (ling ! <n.end0,m.beg0>) ++ m.s ! bai0} ;
|
{s,p = (n.s ! shiwan0) ++ (ling ! <n.end0,m.beg0>) ++ m.s ! bai0} ;
|
||||||
|
lin pot3as4 n = n ;
|
||||||
|
|
||||||
|
lin pot4as5 n = n ;
|
||||||
|
|
||||||
-- numerals as sequences of digits
|
-- numerals as sequences of digits
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ oper
|
|||||||
emptyPrep : Preposition = mkPrep [] ;
|
emptyPrep : Preposition = mkPrep [] ;
|
||||||
|
|
||||||
mkpNP : Str -> CatChi.NP
|
mkpNP : Str -> CatChi.NP
|
||||||
= \s -> lin NP {s = word s} ;
|
= \s -> lin NP {s = word s ; det = []} ;
|
||||||
mkAdV : Str -> AdV
|
mkAdV : Str -> AdV
|
||||||
= \s -> lin AdV {s = word s} ;
|
= \s -> lin AdV {s = word s} ;
|
||||||
mkAdN : Str -> AdN
|
mkAdN : Str -> AdN
|
||||||
@@ -215,6 +215,8 @@ oper
|
|||||||
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
|
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||||
|
|
||||||
--. auxiliary
|
--. auxiliary
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete PhraseChi of Phrase = CatChi ** open Prelude, ResChi in {
|
|||||||
|
|
||||||
UttIP ip = ip ;
|
UttIP ip = ip ;
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = np ;
|
UttNP np = ss (linNP np) ;
|
||||||
UttCN cn = cn ;
|
UttCN cn = cn ;
|
||||||
UttAP ap = {s = ap.s!Attr} ;
|
UttAP ap = {s = ap.s!Attr} ;
|
||||||
UttCard x = x ;
|
UttCard x = x ;
|
||||||
@@ -23,6 +23,6 @@ concrete PhraseChi of Phrase = CatChi ** open Prelude, ResChi in {
|
|||||||
PConjConj conj = ss (conj.s ! CSent).s2 ;
|
PConjConj conj = ss (conj.s ! CSent).s2 ;
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
VocNP np = {s = np.s ++ chcomma} ; ---- ??
|
VocNP np = {s = linNP np ++ chcomma} ; ---- ??
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ concrete QuestionChi of Question = CatChi **
|
|||||||
s = \\_,p,a => ip.s ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl
|
s = \\_,p,a => ip.s ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
QuestSlash ip cls = {s = \\_ => (mkClauseCompl cls.np (insertObj (ss (appPrep cls.c2 ip.s)) cls.vp) []).s} ;
|
QuestSlash ip cls = {s = \\_ => (mkClauseCompl cls.np (insertObj (mkNP (appPrep cls.c2 ip.s)) cls.vp) []).s} ;
|
||||||
|
|
||||||
QuestIAdv iadv cl = {s = \\_ => (mkClauseCompl cl.np (insertAdv iadv cl.vp) []).s} ;
|
QuestIAdv iadv cl = {s = \\_ => (mkClauseCompl cl.np (insertAdv iadv cl.vp) []).s} ;
|
||||||
|
|
||||||
QuestIComp icomp np = {s = \\_,p,a => np.s ++ icomp.s} ; ---- order
|
QuestIComp icomp np = {s = \\_,p,a => linNP np ++ icomp.s} ; ---- order
|
||||||
|
|
||||||
PrepIP p ip = ss (appPrep p ip.s) ;
|
PrepIP p ip = ss (appPrep p ip.s) ;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ concrete RelativeChi of Relative = CatChi ** open ResChi, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
} ; ---- ??
|
} ; ---- ??
|
||||||
RelSlash rp slash = {s = \\p,a => slash.s ! p ! a ++ appPrep slash.c2 (rp.s ! False)} ;
|
RelSlash rp slash = {s = \\p,a => slash.s ! p ! a ++ appPrep slash.c2 (rp.s ! False)} ;
|
||||||
FunRP p np rp = {s = \\a => appPrep p np.s ++ rp.s ! a} ; ---- ??
|
FunRP p np rp = {s = \\a => appPrep p (linNP np) ++ rp.s ! a} ; ---- ??
|
||||||
IdRP = {s = table {True => [] ; False => relative_s}} ;
|
IdRP = {s = table {True => [] ; False => relative_s}} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ oper
|
|||||||
isAdj : Bool ; -- whether it is an adjectival predication and behaves differently in relative
|
isAdj : Bool ; -- whether it is an adjectival predication and behaves differently in relative
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
NP = {s : Str} ;
|
NP = {det,s : Str} ; -- keep Det separate, because RelNP may put in a RS and that goes before the Det
|
||||||
|
linNP : NP -> Str = \np -> np.det ++ np.s ;
|
||||||
|
|
||||||
-- for morphology
|
-- for morphology
|
||||||
|
|
||||||
@@ -192,11 +193,11 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObj : NP -> VP -> VP = \np,vp -> vp ** {
|
insertObj : NP -> VP -> VP = \np,vp -> vp ** {
|
||||||
compl = np.s ++ vp.compl ;
|
compl = linNP np ++ vp.compl ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjPost : NP -> VP -> VP = \np,vp -> vp ** {
|
insertObjPost : NP -> VP -> VP = \np,vp -> vp ** {
|
||||||
compl = vp.compl ++ np.s ;
|
compl = vp.compl ++ linNP np ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : SS -> VP -> VP = \adv,vp -> vp ** {
|
insertAdv : SS -> VP -> VP = \adv,vp -> vp ** {
|
||||||
@@ -215,7 +216,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertExtra : SS -> VP -> VP = \ext,vp ->
|
insertExtra : SS -> VP -> VP = \ext,vp ->
|
||||||
insertObjPost ext vp ;
|
insertObjPost (mkNP ext.s) vp ;
|
||||||
|
|
||||||
-- clauses: keep np and vp separate to enable insertion of IAdv
|
-- clauses: keep np and vp separate to enable insertion of IAdv
|
||||||
|
|
||||||
@@ -250,7 +251,7 @@ oper
|
|||||||
mkClauseCompl : Str -> VP -> Str -> Clause = \np,vp,compl -> {
|
mkClauseCompl : Str -> VP -> Str -> Clause = \np,vp,compl -> {
|
||||||
s = \\p,a => vp.topic ++ np ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
s = \\p,a => vp.topic ++ np ++ vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
||||||
np = vp.topic ++ np ;
|
np = vp.topic ++ np ;
|
||||||
vp = insertObj (ss compl) vp ;
|
vp = insertObj (mkNP compl) vp ;
|
||||||
postJiu = \\p,a => vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
postJiu = \\p,a => vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ compl ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -278,7 +279,8 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
pronNP : (s : Str) -> NP = \s -> {
|
pronNP : (s : Str) -> NP = \s -> {
|
||||||
s = word s
|
s = word s ;
|
||||||
|
det = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Preposition = {prepPre : Str ; prepPost : Str ; advType : AdvType ; hasDe : Bool} ;
|
Preposition = {prepPre : Str ; prepPost : Str ; advType : AdvType ; hasDe : Bool} ;
|
||||||
@@ -290,6 +292,8 @@ oper
|
|||||||
hasDe = advTypeHasDe at ;
|
hasDe = advTypeHasDe at ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
linPrep : Preposition -> Str = \p -> p.prepPre ++ p.prepPost ;
|
||||||
|
|
||||||
advTypeHasDe : AdvType -> Bool = \at -> case at of {
|
advTypeHasDe : AdvType -> Bool = \at -> case at of {
|
||||||
ATPoss => True ;
|
ATPoss => True ;
|
||||||
_ => False
|
_ => False
|
||||||
@@ -314,7 +318,7 @@ oper
|
|||||||
|
|
||||||
-- added by AR
|
-- added by AR
|
||||||
|
|
||||||
mkNP : Str -> NP = ss ; -- not to be used in lexicon building
|
mkNP : Str -> NP = \s -> {s = s ; det = []} ; -- not to be used in lexicon building
|
||||||
|
|
||||||
appPrep : Preposition -> Str -> Str = \prep,s ->
|
appPrep : Preposition -> Str -> Str = \prep,s ->
|
||||||
prep.prepPre ++ s ++ prep.prepPost ;
|
prep.prepPre ++ s ++ prep.prepPost ;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ concrete SentenceChi of Sentence = CatChi **
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
PredVP np vp = mkClause np.s vp ;
|
PredVP np vp = mkClause (linNP np) vp ;
|
||||||
|
|
||||||
PredSCVP sc vp = mkClause sc.s vp ;
|
PredSCVP sc vp = mkClause sc.s vp ;
|
||||||
|
|
||||||
@@ -17,10 +17,10 @@ concrete SentenceChi of Sentence = CatChi **
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
mkClauseCompl np.s vp []
|
mkClauseCompl (linNP np) vp []
|
||||||
** {c2 = vp.c2} ;
|
** {c2 = vp.c2} ;
|
||||||
|
|
||||||
SlashVS np vs sslash = <mkClause np.s vs sslash.s : Clause> ** {c2 = sslash.c2} ;
|
SlashVS np vs sslash = <mkClause (linNP np) vs sslash.s : Clause> ** {c2 = sslash.c2} ;
|
||||||
|
|
||||||
|
|
||||||
-- yet another reason for discontinuity of clauses
|
-- yet another reason for discontinuity of clauses
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ either7or_DConj = {s = table { -- modified by chenpeng 11.19
|
|||||||
conjType = NotJiu ;
|
conjType = NotJiu ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
everybody_NP = ssword "每个人" ; -- [mark] "每个人": 每(every)+个(classifier)+人(person)
|
everybody_NP = mkNP (ssword "每个人").s ; -- [mark] "每个人": 每(every)+个(classifier)+人(person)
|
||||||
everything_NP = ssword "每件事" ; -- [mark] "每件事": 每(every)+件(classifier)+事(thing)
|
everything_NP = mkNP (ssword "每件事").s ; -- [mark] "每件事": 每(every)+件(classifier)+事(thing)
|
||||||
everywhere_Adv = mkAdv "到处" ;
|
everywhere_Adv = mkAdv "到处" ;
|
||||||
here7from_Adv = mkAdv "从这里" ; -- from here
|
here7from_Adv = mkAdv "从这里" ; -- from here
|
||||||
here7to_Adv = mkAdv "到这里" ; -- to here
|
here7to_Adv = mkAdv "到这里" ; -- to here
|
||||||
@@ -161,13 +161,13 @@ if_then_Conj = {s = table { -- added by chenpeng 11.19
|
|||||||
} ;
|
} ;
|
||||||
conjType = Jiu ;
|
conjType = Jiu ;
|
||||||
} ;
|
} ;
|
||||||
nobody_NP = ssword "没人" ;
|
nobody_NP = mkNP (ssword "没人").s ;
|
||||||
nothing_NP = ssword "没有什么" ;
|
nothing_NP = mkNP (ssword "没有什么").s ;
|
||||||
on_Prep = mkPrep "在" "上" ;
|
on_Prep = mkPrep "在" "上" ;
|
||||||
only_Predet = ssword "只有" ; -- only John
|
only_Predet = ssword "只有" ; -- only John
|
||||||
so_AdA = ssword "如此" ;
|
so_AdA = ssword "如此" ;
|
||||||
somebody_NP = ssword "某人" ;
|
somebody_NP = mkNP (ssword "某人").s ;
|
||||||
something_NP = ssword "某事" ; -- [mark] in sent, it depends on the context
|
something_NP = mkNP (ssword "某事").s ; -- [mark] in sent, it depends on the context
|
||||||
somewhere_Adv = mkAdv "某处" ;
|
somewhere_Adv = mkAdv "某处" ;
|
||||||
that_Subj = mkSubj [] chcomma ; -- that + S [mark] comma
|
that_Subj = mkSubj [] chcomma ; -- that + S [mark] comma
|
||||||
there7from_Adv = mkAdv "从那里" ; -- from there
|
there7from_Adv = mkAdv "从那里" ; -- from there
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ concrete SymbolChi of Symbol = CatChi ** open Prelude, ResChi in {
|
|||||||
NumPN i = i ;
|
NumPN i = i ;
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = cn.s ++ i.s ;
|
s = cn.s ++ i.s ;
|
||||||
c = cn.c
|
det = cn.c
|
||||||
} ;
|
} ;
|
||||||
CNSymbNP det cn xs = ss (det.s ++ cn.s ++ xs.s) ; ----
|
CNSymbNP det cn xs = {det = det.s ; s = cn.s ++ xs.s} ; ----
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = cn.s ++ i.s ;
|
s = cn.s ++ i.s ;
|
||||||
c = cn.c
|
det = cn.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = simpleS sy.s ;
|
SymbS sy = simpleS sy.s ;
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
|
|
||||||
SlashV2a v = predV v v.part ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
SlashV2a v = predV v v.part ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
||||||
|
|
||||||
Slash2V3 v np = insertAdv (mkNP (ba_s ++ np.s)) (predV v v.part) ** {c2 = v.c3 ; isPre = v.hasPrep} ; -- slot for third argument
|
Slash2V3 v np = insertAdv (mkNP (ba_s ++ linNP np)) (predV v v.part) ** {c2 = v.c3 ; isPre = v.hasPrep} ; -- slot for third argument
|
||||||
Slash3V3 v np = insertObj (mkNP (appPrep v.c3 np.s)) (predV v v.part) ** {c2 = v.c2 ; isPre = True} ; -- slot for ba object
|
Slash3V3 v np = insertObj (mkNP (appPrep v.c3 (linNP np))) (predV v v.part) ** {c2 = v.c2 ; isPre = True} ; -- slot for ba object
|
||||||
|
|
||||||
SlashV2A v ap = insertObj {s = ap.s ! Pred} (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
SlashV2A v ap = insertObj (mkNP (ap.s ! Pred)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
||||||
|
|
||||||
SlashV2V v vp = insertObj (mkNP (infVP vp)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
SlashV2V v vp = insertObj (mkNP (infVP vp)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
||||||
SlashV2S v s = insertObj (ss (say_s ++ linS s)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
SlashV2S v s = insertObj (mkNP (say_s ++ linS s)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
||||||
SlashV2Q v q = insertObj (ss (say_s ++ q.s ! False)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
SlashV2Q v q = insertObj (mkNP (say_s ++ q.s ! False)) (predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ;
|
||||||
|
|
||||||
ComplVV v vp = {
|
ComplVV v vp = {
|
||||||
verb = v ;
|
verb = v ;
|
||||||
@@ -23,14 +23,14 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
isAdj = False ;
|
isAdj = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplVS v s = insertObj (ss (linS s)) (predV v []) ;
|
ComplVS v s = insertObj (mkNP (linS s)) (predV v []) ;
|
||||||
ComplVQ v q = insertObj (ss (q.s ! False)) (predV v []) ;
|
ComplVQ v q = insertObj (mkNP (q.s ! False)) (predV v []) ;
|
||||||
ComplVA v ap = insertObj {s = ap.s ! Pred} (predV v []) ;
|
ComplVA v ap = insertObj (mkNP (ap.s ! Pred)) (predV v []) ;
|
||||||
|
|
||||||
ComplSlash vp np = case vp.isPre of {
|
ComplSlash vp np = case vp.isPre of {
|
||||||
--- True => insertAdv (mkNP (ba_s ++ np.s)) vp ; --- ba or vp.c2 ?
|
--- True => insertAdv (mkNP (ba_s ++ np.s)) vp ; --- ba or vp.c2 ?
|
||||||
True => insertPP (mkNP (appPrep vp.c2 np.s)) vp ; --- ba or vp.c2 ?
|
True => insertPP (mkNP (appPrep vp.c2 (linNP np))) vp ; --- ba or vp.c2 ?
|
||||||
False => insertObj (mkNP (appPrep vp.c2 np.s)) vp
|
False => insertObj (mkNP (appPrep vp.c2 (linNP np))) vp
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseComp comp = comp ;
|
UseComp comp = comp ;
|
||||||
@@ -44,13 +44,13 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
(insertObj (mkNP (infVP vp)) (predV v v.part)) ** {c2 = vp.c2 ; isPre = vp.isPre} ;
|
(insertObj (mkNP (infVP vp)) (predV v v.part)) ** {c2 = vp.c2 ; isPre = vp.isPre} ;
|
||||||
|
|
||||||
AdvVP vp adv = case adv.advType of {
|
AdvVP vp adv = case adv.advType of {
|
||||||
ATManner => insertObj (ss (deVAdv_s ++ adv.s)) vp ; -- he sleeps *well*
|
ATManner => insertObj (mkNP (deVAdv_s ++ adv.s)) vp ; -- he sleeps *well*
|
||||||
ATPlace True => insertAdvPost adv vp ; -- he today *in the house* sleeps
|
ATPlace True => insertAdvPost adv vp ; -- he today *in the house* sleeps
|
||||||
ATPlace False => insertAdvPost (ss (zai_V.s ++ adv.s)) vp ; -- he today *here* sleeps
|
ATPlace False => insertAdvPost (ss (zai_V.s ++ adv.s)) vp ; -- he today *here* sleeps
|
||||||
ATTime | ATPoss => insertTopic adv vp -- *today* he here sleeps
|
ATTime | ATPoss => insertTopic adv vp -- *today* he here sleeps
|
||||||
} ;
|
} ;
|
||||||
ExtAdvVP vp adv = case adv.advType of { ---- ExtAdvVP also ?
|
ExtAdvVP vp adv = case adv.advType of { ---- ExtAdvVP also ?
|
||||||
ATManner => insertObj (ss (deVAdv_s ++ adv.s)) vp ; -- he sleeps *well*
|
ATManner => insertObj (mkNP (deVAdv_s ++ adv.s)) vp ; -- he sleeps *well*
|
||||||
ATPlace True => insertAdvPost adv vp ; -- he today *in the house* sleeps
|
ATPlace True => insertAdvPost adv vp ; -- he today *in the house* sleeps
|
||||||
ATPlace False => insertAdvPost (ss (zai_V.s ++ adv.s)) vp ; -- he today *here* sleeps
|
ATPlace False => insertAdvPost (ss (zai_V.s ++ adv.s)) vp ; -- he today *here* sleeps
|
||||||
ATTime | ATPoss => insertTopic adv vp -- *today* he here sleeps
|
ATTime | ATPoss => insertTopic adv vp -- *today* he here sleeps
|
||||||
@@ -73,17 +73,17 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
|
|
||||||
CompNP np = insertObj np (predV copula []) ; ----
|
CompNP np = insertObj np (predV copula []) ; ----
|
||||||
|
|
||||||
CompCN cn = insertObj cn (predV copula []) ; ----
|
CompCN cn = insertObj (mkNP cn.s) (predV copula []) ; ----
|
||||||
|
|
||||||
CompAdv adv = case adv.advType of {
|
CompAdv adv = case adv.advType of {
|
||||||
ATPlace True => insertObj adv (predV noVerb []) ;
|
ATPlace True => insertObj (mkNP adv.s) (predV noVerb []) ;
|
||||||
_ => insertObj adv (predV zai_V []) ---- for all others ??
|
_ => insertObj (mkNP adv.s) (predV zai_V []) ---- for all others ??
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep ; isPre = True} ;
|
VPSlashPrep vp prep = vp ** {c2 = prep ; isPre = True} ;
|
||||||
|
|
||||||
AdvVPSlash vp adv = case adv.advType of {
|
AdvVPSlash vp adv = case adv.advType of {
|
||||||
ATManner => insertObj (ss (deVAdv_s ++ adv.s)) vp ; -- he sleeps well
|
ATManner => insertObj (mkNP (deVAdv_s ++ adv.s)) vp ; -- he sleeps well
|
||||||
ATPlace True => insertAdv adv vp ; -- he sleeps on the table
|
ATPlace True => insertAdv adv vp ; -- he sleeps on the table
|
||||||
_ => insertAdv (ss (zai_V.s ++ adv.s)) vp -- he sleeps in the house / today
|
_ => insertAdv (ss (zai_V.s ++ adv.s)) vp -- he sleeps in the house / today
|
||||||
} ** {c2 = vp.c2 ; isPre = vp.isPre} ;
|
} ** {c2 = vp.c2 ; isPre = vp.isPre} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CommonX of Common = open (R = ParamX) in {
|
concrete CommonX of Common = open (R = ParamX), Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Text = {s : Str} ;
|
Text = {s : Str} ;
|
||||||
@@ -20,4 +20,6 @@ concrete CommonX of Common = open (R = ParamX) in {
|
|||||||
Ant = {s : Str ; a : R.Anteriority} ;
|
Ant = {s : Str ; a : R.Anteriority} ;
|
||||||
Pol = {s : Str ; p : R.Polarity} ;
|
Pol = {s : Str ; p : R.Polarity} ;
|
||||||
|
|
||||||
|
MU = {s : Str ; isPre : Bool} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ lin
|
|||||||
weFem_Pron = we_Pron ; -- DEFAULT we (masc)
|
weFem_Pron = we_Pron ; -- DEFAULT we (masc)
|
||||||
youPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
youPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
||||||
theyFem_Pron = they_Pron ; -- DEFAULT they (masc)
|
theyFem_Pron = they_Pron ; -- DEFAULT they (masc)
|
||||||
|
theyNeutr_Pron = they_Pron ; -- DEFAULT they (masc)
|
||||||
youPolFem_Pron = youPol_Pron ; -- DEFAULT you polite (masc)
|
youPolFem_Pron = youPol_Pron ; -- DEFAULT you polite (masc)
|
||||||
youPolPl_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
youPolPl_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
||||||
youPolPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
youPolPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
|
||||||
@@ -135,6 +136,10 @@ lin
|
|||||||
lincat
|
lincat
|
||||||
X = {s : Str} ;
|
X = {s : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseComp_estar = UseComp ;
|
||||||
|
UseComp_ser = UseComp ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
CardCNCard = variants {} ;
|
CardCNCard = variants {} ;
|
||||||
|
|
||||||
|
|||||||
33
src/croatian/AdjectiveHrv.gf
Normal file
33
src/croatian/AdjectiveHrv.gf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
concrete AdjectiveHrv of Adjective = CatHrv ** open ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
PositA a = adjFormsAdjective a.posit ** {isPost = False} ;
|
||||||
|
|
||||||
|
AdAP ada ap = ap ** {s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c} ;
|
||||||
|
|
||||||
|
AdjOrd a = adjFormsAdjective a ** {isPost = False} ;
|
||||||
|
|
||||||
|
ComparA a np =
|
||||||
|
let ap = adjFormsAdjective a.compar
|
||||||
|
in
|
||||||
|
ap ** {
|
||||||
|
s = \\g,n,c => ap.s ! g ! n ! c ++ od_Str ++ np.s ! Gen ;
|
||||||
|
isPost = True ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplA2 a np =
|
||||||
|
let ap = adjFormsAdjective a
|
||||||
|
in
|
||||||
|
ap ** {
|
||||||
|
s = \\g,n,c => ap.s ! g ! n ! c ++ a.c.s ++ np.s ! a.c.c ;
|
||||||
|
isPost = True ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseA2 a = adjFormsAdjective a ** {isPost = False} ;
|
||||||
|
|
||||||
|
UseComparA a = adjFormsAdjective a.compar ** {isPost = False} ;
|
||||||
|
|
||||||
|
AdvAP ap adv = ap ** {s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s ; isPost = True} ;
|
||||||
|
|
||||||
|
}
|
||||||
9
src/croatian/AdverbHrv.gf
Normal file
9
src/croatian/AdverbHrv.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
concrete AdverbHrv of Adverb = CatHrv **
|
||||||
|
open ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PrepNP prep np = {
|
||||||
|
s = prep.s ++ np.prep ! prep.c
|
||||||
|
} ;
|
||||||
|
AdnCAdv a = a ;
|
||||||
|
}
|
||||||
8
src/croatian/AllHrv.gf
Normal file
8
src/croatian/AllHrv.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--# -path=.:../abstract:../common:../api
|
||||||
|
|
||||||
|
concrete AllHrv of AllHrvAbs =
|
||||||
|
LangHrv,
|
||||||
|
ExtendHrv,
|
||||||
|
MissingHrv
|
||||||
|
;
|
||||||
|
|
||||||
7
src/croatian/AllHrvAbs.gf
Normal file
7
src/croatian/AllHrvAbs.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../abstract:../common:prelude
|
||||||
|
|
||||||
|
abstract AllHrvAbs =
|
||||||
|
Lang,
|
||||||
|
Extend
|
||||||
|
;
|
||||||
|
|
||||||
72
src/croatian/CatHrv.gf
Normal file
72
src/croatian/CatHrv.gf
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
concrete CatHrv of Cat =
|
||||||
|
--- CommonX **
|
||||||
|
|
||||||
|
open ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Text = {s : Str} ;
|
||||||
|
Phr = {s : Str} ;
|
||||||
|
Utt = {s : Str} ;
|
||||||
|
|
||||||
|
S = {s : Str} ;
|
||||||
|
Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ;
|
||||||
|
Comp = {s : Agr => Str} ;
|
||||||
|
|
||||||
|
QS = {s : Str} ; ---- TODO: indirect questions
|
||||||
|
QCl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ; -- = Cl ---- check if enough
|
||||||
|
IAdv = {s : Str} ;
|
||||||
|
|
||||||
|
RS = {s : Agr => Str} ;
|
||||||
|
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
|
||||||
|
RP = AdjForms ;
|
||||||
|
|
||||||
|
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
|
||||||
|
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
|
||||||
|
V = {s : VerbForms} ;
|
||||||
|
V2 = {s : VerbForms ; c : ComplementCase} ;
|
||||||
|
VS,VQ = {s : VerbForms} ;
|
||||||
|
|
||||||
|
A = {posit, compar, superl : AdjForms} ;
|
||||||
|
AP = ResHrv.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}
|
||||||
|
A2 = ResHrv.AdjForms ** {c : ComplementCase} ;
|
||||||
|
|
||||||
|
AdA = {s : Str} ;
|
||||||
|
|
||||||
|
N = ResHrv.NounForms ** {g : Gender} ;
|
||||||
|
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
|
||||||
|
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} ;
|
||||||
|
Prep = ResHrv.ComplementCase ; -- {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||||
|
Conj = {s1,s2 : Str} ; ---- may need a number
|
||||||
|
|
||||||
|
Pol = {s : Str ; p : Bool} ;
|
||||||
|
Temp = {s : Str ; t : CTense} ;
|
||||||
|
Tense = {s : Str ; t : CTense} ;
|
||||||
|
Ant = {s : Str ; t : CTense} ;
|
||||||
|
|
||||||
|
PConj = {s : Str} ;
|
||||||
|
Voc = {s : Str} ;
|
||||||
|
|
||||||
|
AdN = {s : Str} ;
|
||||||
|
AdV = {s : Str} ;
|
||||||
|
CAdv = {s : Str} ;
|
||||||
|
SC = {s : Str} ;
|
||||||
|
|
||||||
|
linref
|
||||||
|
N = \s -> s.snom ;
|
||||||
|
A = \s -> s.posit.msnom ;
|
||||||
|
V = \v -> v.s ! VInf ;
|
||||||
|
|
||||||
|
|
||||||
|
lincat Numeral = {s : AdjForms ; size : NumSize} ;
|
||||||
|
lincat Digits = {s : Str ; size : NumSize} ;
|
||||||
|
|
||||||
|
}
|
||||||
56
src/croatian/ConjunctionHrv.gf
Normal file
56
src/croatian/ConjunctionHrv.gf
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
concrete ConjunctionHrv of Conjunction = CatHrv **
|
||||||
|
open ResHrv, Coordination, Prelude in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[Adv] = {s1,s2 : Str} ;
|
||||||
|
[AP] = {s1,s2 : Gender => Number => Case => Str ; isPost : Bool} ;
|
||||||
|
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr} ;
|
||||||
|
[S] = {s1,s2 : Str} ;
|
||||||
|
[RS] = {s1,s2 : Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseAdv = twoSS ;
|
||||||
|
ConsAdv = consrSS comma ;
|
||||||
|
|
||||||
|
BaseAP x y = twoTable3 Gender Number Case x y
|
||||||
|
** {isPost = orB x.isPost y.isPost} ; ---- should be so in Pol too
|
||||||
|
ConsAP x xs = consrTable3 Gender Number Case comma x xs
|
||||||
|
** {isPost = orB x.isPost xs.isPost} ;
|
||||||
|
|
||||||
|
BaseNP x y = {
|
||||||
|
s1 = x.s ;
|
||||||
|
s2 = y.s ;
|
||||||
|
prep1 = x.prep ;
|
||||||
|
prep2 = y.prep ;
|
||||||
|
a = y.a
|
||||||
|
} ; -- clitics disappear ---- Agr TODO
|
||||||
|
ConsNP x xs = {
|
||||||
|
s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ;
|
||||||
|
s2 = xs.s2 ;
|
||||||
|
prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ;
|
||||||
|
prep2 = xs.prep2 ;
|
||||||
|
a = xs.a ----
|
||||||
|
} ;
|
||||||
|
|
||||||
|
BaseS = twoSS ;
|
||||||
|
ConsS = consrSS comma ;
|
||||||
|
|
||||||
|
BaseRS = twoTable Agr ;
|
||||||
|
ConsRS = consrTable Agr comma ;
|
||||||
|
|
||||||
|
ConjAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
|
ConjAP conj xs = conjunctDistrTable3 Gender Number Case conj xs
|
||||||
|
** {isPost = xs.isPost} ;
|
||||||
|
|
||||||
|
ConjNP conj xs = {
|
||||||
|
s,clit = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
|
||||||
|
prep = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! c ;
|
||||||
|
a = xs.a ; ---- dep. on conj as well
|
||||||
|
hasClit = False ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjS = conjunctDistrSS ;
|
||||||
|
ConjRS = conjunctDistrTable Agr ;
|
||||||
|
|
||||||
|
}
|
||||||
43
src/croatian/ExtendHrv.gf
Normal file
43
src/croatian/ExtendHrv.gf
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
concrete ExtendHrv of Extend = CatHrv **
|
||||||
|
ExtendFunctor - [
|
||||||
|
--- ReflPossPron
|
||||||
|
CardCNCard
|
||||||
|
---- constant not found (yet)
|
||||||
|
,youPolFem_Pron
|
||||||
|
,UttVPShort
|
||||||
|
,UttAccIP
|
||||||
|
,UttDatIP
|
||||||
|
,SubjRelNP
|
||||||
|
,StrandRelSlash
|
||||||
|
,StrandQuestSlash
|
||||||
|
,SlashBareV2S
|
||||||
|
,PredIAdvVP
|
||||||
|
,PredAPVP
|
||||||
|
,ExistsNP
|
||||||
|
,ExistS
|
||||||
|
,ExistPluralCN
|
||||||
|
,ExistNPQS
|
||||||
|
,ExistMassCN
|
||||||
|
,ExistIPQS
|
||||||
|
,ExistCN
|
||||||
|
,EmptyRelSlash
|
||||||
|
,DetNPMasc
|
||||||
|
,DetNPFem
|
||||||
|
,ComplBareVS
|
||||||
|
,CompIQuant
|
||||||
|
,CompBareCN
|
||||||
|
]
|
||||||
|
with (Grammar = GrammarHrv)
|
||||||
|
**
|
||||||
|
open
|
||||||
|
ResHrv
|
||||||
|
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_
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
19
src/croatian/GrammarHrv.gf
Normal file
19
src/croatian/GrammarHrv.gf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
--# -path=.:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete GrammarHrv of Grammar =
|
||||||
|
NounHrv,
|
||||||
|
VerbHrv,
|
||||||
|
AdjectiveHrv,
|
||||||
|
AdverbHrv,
|
||||||
|
NumeralHrv,
|
||||||
|
SentenceHrv,
|
||||||
|
QuestionHrv,
|
||||||
|
RelativeHrv,
|
||||||
|
ConjunctionHrv,
|
||||||
|
PhraseHrv,
|
||||||
|
TextHrv,
|
||||||
|
StructuralHrv,
|
||||||
|
IdiomHrv,
|
||||||
|
TenseHrv
|
||||||
|
** {
|
||||||
|
}
|
||||||
13
src/croatian/IdiomHrv.gf
Normal file
13
src/croatian/IdiomHrv.gf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
concrete IdiomHrv of Idiom = CatHrv ** open Prelude, ResHrv in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
ExistNP np = { ---- TODO verify this
|
||||||
|
subj = np.s ! Nom ;
|
||||||
|
verb = copula_VerbForms ;
|
||||||
|
clit, compl = [] ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ;
|
||||||
|
|
||||||
|
}
|
||||||
10
src/croatian/LangHrv.gf
Normal file
10
src/croatian/LangHrv.gf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
--# -path=.:../abstract:../common:../api
|
||||||
|
|
||||||
|
concrete LangHrv of Lang =
|
||||||
|
GrammarHrv,
|
||||||
|
LexiconHrv
|
||||||
|
-- ,ConstructionHrv
|
||||||
|
-- ,DocumentationHrv --# notpresent
|
||||||
|
** {
|
||||||
|
|
||||||
|
}
|
||||||
19
src/croatian/LexiconHrv.gf
Normal file
19
src/croatian/LexiconHrv.gf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
concrete LexiconHrv of Lexicon =
|
||||||
|
CatHrv
|
||||||
|
**
|
||||||
|
open
|
||||||
|
ResHrv, ParadigmsHrv
|
||||||
|
in {
|
||||||
|
|
||||||
|
|
||||||
|
lin
|
||||||
|
cat_N = mkN "mačka" ;
|
||||||
|
black_A = mkA "crni" ;
|
||||||
|
love_V2 = mkV2 (mkV "voljeti" "volim" "volio") ;
|
||||||
|
see_V2 = mkV2 (mkV "vidjeti" "vidim" "vidio") ;
|
||||||
|
walk_V = mkV "hodati" ;
|
||||||
|
|
||||||
|
man_N = mkN "čovjek" ;
|
||||||
|
woman_N = mkN "žena" ;
|
||||||
|
}
|
||||||
|
|
||||||
99
src/croatian/MissingHrv.gf
Normal file
99
src/croatian/MissingHrv.gf
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
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 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" ;
|
||||||
|
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||||
|
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||||
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
|
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 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 FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||||
|
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||||
|
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||||
|
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" ;
|
||||||
|
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
||||||
|
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||||
|
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||||
|
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||||
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
|
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||||
|
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
||||||
|
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
||||||
|
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
||||||
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
|
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
||||||
|
oper Slash3V3 : V3 -> NP -> VPSlash = notYet "Slash3V3" ;
|
||||||
|
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||||
|
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||||
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
|
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||||
|
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||||
|
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" ;
|
||||||
|
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
||||||
|
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||||
|
oper UttCard : Card -> Utt = notYet "UttCard" ;
|
||||||
|
oper UttIAdv : IAdv -> Utt = notYet "UttIAdv" ;
|
||||||
|
oper UttIP : IP -> Utt = notYet "UttIP" ;
|
||||||
|
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
||||||
|
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
||||||
|
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
|
||||||
|
oper UttQS : QS -> Utt = notYet "UttQS" ;
|
||||||
|
oper UttVP : VP -> Utt = notYet "UttVP" ;
|
||||||
|
oper by8agent_Prep : Prep = notYet "by8agent_Prep" ;
|
||||||
|
oper whatSg_IP : IP = notYet "whatSg_IP" ;
|
||||||
|
oper which_IQuant : IQuant = notYet "which_IQuant" ;
|
||||||
|
oper whoSg_IP : IP = notYet "whoSg_IP" ;
|
||||||
|
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
||||||
|
|
||||||
|
oper BaseSymb : Symb -> Symb -> [Symb] = notYet "BaseSymb" ;
|
||||||
|
oper CNIntNP : CN -> PredefCnc.Int -> NP = notYet "CNIntNP" ;
|
||||||
|
oper CNNumNP : CN -> Card -> NP = notYet "CNumNP" ;
|
||||||
|
oper CNSymbNP : Det -> CN -> [Symb] -> NP = notYet "CNSymbNP" ;
|
||||||
|
oper ConsSymb : Symb -> [Symb] -> [Symb] = notYet "ConsSymb" ;
|
||||||
|
oper FloatPN : PredefCnc.Float -> PN = notYet "FloatPN" ;
|
||||||
|
oper NumPN : Card -> PN = notYet "NumPN" ;
|
||||||
|
oper SymbOrd : Symb -> Ord = notYet "SymbOrd" ;
|
||||||
|
oper SymbS : Symb -> S = notYet "SymbS" ;
|
||||||
|
|
||||||
|
}
|
||||||
101
src/croatian/NounHrv.gf
Normal file
101
src/croatian/NounHrv.gf
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
concrete NounHrv of Noun =
|
||||||
|
CatHrv
|
||||||
|
**
|
||||||
|
|
||||||
|
open ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
DetCN det cn = {
|
||||||
|
s,prep,clit = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ;
|
||||||
|
a = numSizeAgr cn.g det.size P3 ;
|
||||||
|
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 ;
|
||||||
|
hasClit = False ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetQuant quant num = {
|
||||||
|
s = \\g,c => num.s ! g ! c ++ quant.s ! g ! numSizeNumber num.size ! c ;
|
||||||
|
size = num.size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DefArt = {s = \\_,_,_ => []} ;
|
||||||
|
IndefArt = {s = \\_,_,_ => []} ;
|
||||||
|
NumPl = {s = \\_,_ => [] ; size = NS_2_4} ; ---- size
|
||||||
|
NumSg = {s = \\_,_ => [] ; size = NS_1} ;
|
||||||
|
|
||||||
|
UsePron pron = {
|
||||||
|
s, prep = table { ---- TODO check prep
|
||||||
|
Nom | Voc => pron.nom ;
|
||||||
|
Gen | Acc => pron.gen ;
|
||||||
|
Dat | Loc => pron.dat ;
|
||||||
|
Ins => pron.ins
|
||||||
|
} ;
|
||||||
|
clit = table { ---- TODO check prep
|
||||||
|
Nom | Voc => pron.nom ;
|
||||||
|
Gen | Acc => pron.cgen ;
|
||||||
|
Dat | Loc => pron.cdat ;
|
||||||
|
Ins => pron.ins
|
||||||
|
} ;
|
||||||
|
a = pron.a ;
|
||||||
|
hasClit = True ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPron pron = adjFormsAdjective pron.poss ;
|
||||||
|
|
||||||
|
UsePN pn = {
|
||||||
|
s,clit,prep = \\c => pn.s ! c ;
|
||||||
|
a = Ag pn.g Sg P3 ;
|
||||||
|
hasClit = False ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjCN ap cn = {
|
||||||
|
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelCN cn rs = {
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvCN cn adv = {
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ adv.s ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvNP np adv = {
|
||||||
|
s,clit = \\c => np.s ! c ++ adv.s ;
|
||||||
|
prep = \\c => np.prep ! c ++ adv.s ;
|
||||||
|
a = np.a ;
|
||||||
|
hasClit = False ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseN n = nounFormsNoun n n.g ;
|
||||||
|
|
||||||
|
ApposCN cn np = {
|
||||||
|
s = \\n,c => cn.s ! n ! c ++ np.s ! c ; ---- TODO check apposition order
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
NumCard c = c ;
|
||||||
|
NumDigits ds = ds ** {s = \\_,_ => ds.s} ;
|
||||||
|
NumNumeral nu = {
|
||||||
|
s = \\g,c => (adjFormsAdjective nu.s).s ! g ! Sg ! c ; ---- TODO Sg?
|
||||||
|
size = nu.size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdNum adn card = card ** {s = \\g,c => adn.s ++ card.s ! g ! c} ;
|
||||||
|
OrdSuperl a = a.superl ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
139
src/croatian/NumeralHrv.gf
Normal file
139
src/croatian/NumeralHrv.gf
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
concrete NumeralHrv of Numeral =
|
||||||
|
|
||||||
|
CatHrv [Numeral, Digits] **
|
||||||
|
|
||||||
|
open
|
||||||
|
ResHrv,
|
||||||
|
Prelude
|
||||||
|
in {
|
||||||
|
|
||||||
|
-- AR 2022-09-27
|
||||||
|
---- TODO ordinal forms
|
||||||
|
|
||||||
|
oper LinNumeral = {s : AdjForms ; size : NumSize} ;
|
||||||
|
oper LinDigit = {unit : AdjForms ; teen, ten, hundred : Str ; size : NumSize} ;
|
||||||
|
|
||||||
|
lincat Digit = LinDigit ;
|
||||||
|
lincat Sub10 = LinDigit ;
|
||||||
|
|
||||||
|
lincat Sub100 = LinNumeral ;
|
||||||
|
lincat Sub1000 = LinNumeral ;
|
||||||
|
lincat Sub1000000 = LinNumeral ;
|
||||||
|
|
||||||
|
oper mkDigit : AdjForms -> Str -> Str -> Str -> NumSize -> LinDigit =
|
||||||
|
\dva, dvanaest, dvadeset, dvjesto, size -> {
|
||||||
|
unit = dva ;
|
||||||
|
teen = dvanaest ;
|
||||||
|
ten = dvadeset ;
|
||||||
|
hundred = dvjesto ;
|
||||||
|
size = size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper mkBigDigit : (unit, teen, ten, hundred : Str) -> LinDigit =
|
||||||
|
\unit,ten,teen,hundred -> mkDigit (invarAdjForms unit) ten teen hundred NS_5_20 ;
|
||||||
|
|
||||||
|
oper bigNumeral : Str -> LinNumeral = \s -> {
|
||||||
|
s = invarAdjForms s ;
|
||||||
|
size = NS_20_
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin num x = x ;
|
||||||
|
|
||||||
|
lin n2 =
|
||||||
|
let
|
||||||
|
dva = invarAdjForms "dva" ** { --- BCMS: cases rarely used
|
||||||
|
fsnom, fsacc = "dvije" ;
|
||||||
|
msgen = "dvaju" ;
|
||||||
|
fsgen = "dviju" ;
|
||||||
|
msdat = "dvama" ;
|
||||||
|
fsdat = "dvjema"
|
||||||
|
}
|
||||||
|
in mkDigit dva "dvanaest" "dvadeset" "dvjesto" NS_2_4 ;
|
||||||
|
|
||||||
|
lin n3 =
|
||||||
|
let
|
||||||
|
tri = invarAdjForms "tri" ** { --- BCMS: cases rarely used
|
||||||
|
msgen, fsgen = "triju" ;
|
||||||
|
msdat, fsdat, msloc, mksins = "trima"
|
||||||
|
}
|
||||||
|
in
|
||||||
|
mkDigit tri "trinaest" "trideset" "tristo" NS_2_4 ;
|
||||||
|
|
||||||
|
lin n4 =
|
||||||
|
let
|
||||||
|
cetiri = invarAdjForms "četiri" ** { --- BCMS: cases rarely used
|
||||||
|
msgen, fsgen = "četiriju" ;
|
||||||
|
msdat, fsdat, msloc, mksins = "četirima"
|
||||||
|
}
|
||||||
|
in
|
||||||
|
mkDigit cetiri "četrnaest" "četrdeset" "četiristo" NS_2_4 ;
|
||||||
|
|
||||||
|
lin n5 = mkBigDigit "pet" "petnaest" "pedeset" "petsto" ;
|
||||||
|
lin n6 = mkBigDigit "šest" "šesnaest" "šezdeset" "šeststo" ;
|
||||||
|
lin n7 = mkBigDigit "sedam" "sedamnaest" "sedamdeset" "sedamsto" ;
|
||||||
|
lin n8 = mkBigDigit "osam" "osamnaest" "osamdeset" "osamsto" ;
|
||||||
|
lin n9 = mkBigDigit "devet" "devetnaest" "devedeset" "devetsto" ;
|
||||||
|
|
||||||
|
lin pot01 = mkDigit (velikA "jedan") "jedanaest" "deset" "sto" NS_1 ;
|
||||||
|
lin pot0 d = d ;
|
||||||
|
|
||||||
|
|
||||||
|
lin pot110 = bigNumeral "deset" ;
|
||||||
|
lin pot111 = bigNumeral "jedanaest" ;
|
||||||
|
lin pot1to19 d = bigNumeral d.teen ;
|
||||||
|
|
||||||
|
lin pot0as1 n = {s = n.unit ; size = n.size} ;
|
||||||
|
lin pot1 d = bigNumeral d.ten ;
|
||||||
|
lin pot1plus d e = {
|
||||||
|
s = invarAdjForms (d.ten ++ e.unit.msnom) ; ---- TODO inflection of e
|
||||||
|
size = e.size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin pot1as2 n = n ;
|
||||||
|
lin pot2 d = bigNumeral d.hundred ;
|
||||||
|
lin pot2plus d e = {
|
||||||
|
s = invarAdjForms (d.hundred ++ e.s.msnom) ; ---- TODO inflection of e
|
||||||
|
size = e.size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin pot2as3 n = n ;
|
||||||
|
|
||||||
|
|
||||||
|
lin pot3 n = bigNumeral (mkThousand n.s.fsnom n.size) ;
|
||||||
|
|
||||||
|
lin pot3plus n m = {
|
||||||
|
s = invarAdjForms (mkThousand n.s.fsnom n.size ++ m.s.msnom) ; ---- TODO inflect m
|
||||||
|
size = m.size
|
||||||
|
} ;
|
||||||
|
|
||||||
|
----oper tfSize : NumSize -> NumSize = \sz ->
|
||||||
|
---- table {Num1 => Num5 ; other => other} ! sz ;
|
||||||
|
|
||||||
|
oper mkThousand : Str -> NumSize -> Str = \attr,size ->
|
||||||
|
case size of {
|
||||||
|
NS_1 => "tisuću" ; -- BMS: hiljadu etc
|
||||||
|
NS_2_4 => attr ++ "tisuće" ;
|
||||||
|
_ => attr ++ "tisuća"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- -- Numerals as sequences of digits have a separate, simpler grammar
|
||||||
|
lincat Dig = {s : Str ; size : NumSize} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
IDig d = d ;
|
||||||
|
|
||||||
|
IIDig d dd = {s = d.s ++ Predef.BIND ++ dd.s ; size = dd.size} ;
|
||||||
|
|
||||||
|
D_0 = { s = "0" ; size = NS_1} ; ---- ??
|
||||||
|
D_1 = { s = "1" ; size = NS_1} ;
|
||||||
|
D_2 = { s = "2" ; size = NS_2_4} ;
|
||||||
|
D_3 = { s = "3" ; size = NS_2_4} ;
|
||||||
|
D_4 = { s = "4" ; size = NS_2_4} ;
|
||||||
|
D_5 = { s = "5" ; size = NS_5_20} ;
|
||||||
|
D_6 = { s = "6" ; size = NS_5_20} ;
|
||||||
|
D_7 = { s = "7" ; size = NS_5_20} ;
|
||||||
|
D_8 = { s = "8" ; size = NS_5_20} ;
|
||||||
|
D_9 = { s = "9" ; size = NS_5_20} ;
|
||||||
|
|
||||||
|
}
|
||||||
246
src/croatian/ParadigmsHrv.gf
Normal file
246
src/croatian/ParadigmsHrv.gf
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
resource ParadigmsHrv = open CatHrv, ResHrv, (R=ResHrv), Prelude in {
|
||||||
|
|
||||||
|
----------------
|
||||||
|
-- Parameters
|
||||||
|
|
||||||
|
oper
|
||||||
|
singular : Number
|
||||||
|
= Sg ;
|
||||||
|
plural : Number
|
||||||
|
= Pl ;
|
||||||
|
|
||||||
|
mascAnimate : Gender
|
||||||
|
= Masc Anim ;
|
||||||
|
mascInanimate : Gender
|
||||||
|
= Masc Inanim ;
|
||||||
|
masculine : Gender
|
||||||
|
= Masc Inanim ;
|
||||||
|
feminine : Gender
|
||||||
|
= Fem ;
|
||||||
|
neuter : Gender
|
||||||
|
= Neutr ;
|
||||||
|
|
||||||
|
nominative : Case
|
||||||
|
= Nom ;
|
||||||
|
genitive : Case
|
||||||
|
= Gen ;
|
||||||
|
dative : Case
|
||||||
|
= Dat ;
|
||||||
|
accusative : Case
|
||||||
|
= Acc ;
|
||||||
|
vocative : Case
|
||||||
|
= R.Voc ;
|
||||||
|
locative : Case
|
||||||
|
= Loc ;
|
||||||
|
instrumental : Case
|
||||||
|
= Ins ;
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
-- Nouns
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
mkN = overload {
|
||||||
|
mkN : (sgnom : Str) -> N -- guessing gender
|
||||||
|
= \sgnom -> lin N (smartLexNoun sgnom) ;
|
||||||
|
mkN : (sgnom : Str) -> Gender -> N
|
||||||
|
= \sgnom, g -> lin N (mkgLexNoun sgnom g) ;
|
||||||
|
mkN : NForms -> Gender -> N -- the worst case
|
||||||
|
= \nfs,g -> lin N (nfs ** {g = g}) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- The following standard declensions can be used with good accuracy.
|
||||||
|
-- However, they have some defaults that may have to be overwritten.
|
||||||
|
-- This can be done easily by overriding those formes with record extension (**).
|
||||||
|
|
||||||
|
NForms = {snom,sgen,sdat,sacc,svoc,sins,pnom,pgen,pdat,pacc : Str} ;
|
||||||
|
|
||||||
|
izvorNForms : Str -> NForms
|
||||||
|
= izvorN ;
|
||||||
|
nokatNForms : Str -> NForms
|
||||||
|
= nokatN ;
|
||||||
|
gradaninNForms : Str -> NForms
|
||||||
|
= gradaninN ;
|
||||||
|
vojnikNForms : Str -> NForms
|
||||||
|
= vojnikN ;
|
||||||
|
bubregNForms : Str -> NForms
|
||||||
|
= bubregN ;
|
||||||
|
trbuhNForms : Str -> NForms
|
||||||
|
= trbuhN ;
|
||||||
|
cvorakNForms : Str -> NForms
|
||||||
|
= cvorakN ;
|
||||||
|
panjNForms : Str -> NForms
|
||||||
|
= panjN ;
|
||||||
|
suzanjNForms : Str -> NForms
|
||||||
|
= suzanjN ;
|
||||||
|
pristNForms : Str -> NForms
|
||||||
|
= pristN ;
|
||||||
|
stricNForms : Str -> NForms
|
||||||
|
= stricN ;
|
||||||
|
klinacNForms : Str -> NForms
|
||||||
|
= klinacN ;
|
||||||
|
posjetilacNForms : Str -> NForms
|
||||||
|
= posjetilacN ;
|
||||||
|
pepeoNForms : Str -> NForms
|
||||||
|
= pepeoN ;
|
||||||
|
ugaoNForms : Str -> NForms
|
||||||
|
= ugaoN ;
|
||||||
|
bifeNForms : Str -> NForms
|
||||||
|
= bifeN ;
|
||||||
|
ziriNForms : Str -> NForms
|
||||||
|
= ziriN ;
|
||||||
|
taksiNForms : Str -> NForms
|
||||||
|
= taksiN ;
|
||||||
|
koljenoNForms : Str -> NForms
|
||||||
|
= koljenoN ;
|
||||||
|
jedroNForms : Str -> NForms
|
||||||
|
= jedroN ;
|
||||||
|
poljeNForms : Str -> NForms
|
||||||
|
= poljeN ;
|
||||||
|
zenaNForms : Str -> NForms
|
||||||
|
= zenaN ;
|
||||||
|
|
||||||
|
PNForms : Type = {snom, sgen, sdat, sacc, svoc, sins : Str} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
mkPN : PNForms -> Gender -> PN
|
||||||
|
= \fs, g -> lin PN {
|
||||||
|
s = table {
|
||||||
|
Nom => fs.snom ;
|
||||||
|
Gen => fs.sgen ;
|
||||||
|
Dat | Loc => fs.sdat ;
|
||||||
|
Acc => fs.sacc ;
|
||||||
|
Voc => fs.svoc ;
|
||||||
|
Ins => fs.sins
|
||||||
|
} ;
|
||||||
|
g = g
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
-- Adjectives
|
||||||
|
|
||||||
|
-- Only positive forms so far ----
|
||||||
|
|
||||||
|
mkA = overload {
|
||||||
|
mkA : Str -> A
|
||||||
|
= \s ->
|
||||||
|
let
|
||||||
|
velik = velikA s ;
|
||||||
|
velikiji = regComparAForms velik ;
|
||||||
|
in lin A {
|
||||||
|
posit = velik ;
|
||||||
|
compar = velikiji ;
|
||||||
|
superl = superlAForms velikiji
|
||||||
|
} ;
|
||||||
|
mkA : (pos, comp : Str) -> A
|
||||||
|
= \pos, comp -> lin A {
|
||||||
|
posit = velikA pos ;
|
||||||
|
compar = velikA comp ;
|
||||||
|
superl = superlAForms (velikA comp)
|
||||||
|
} ;
|
||||||
|
mkA : (posit : AForms) -> (compar : Str) -> A
|
||||||
|
= \posit,compar -> lin A {
|
||||||
|
posit = posit ;
|
||||||
|
compar = velikA compar ;
|
||||||
|
superl = superlAForms (velikA compar)
|
||||||
|
} ;
|
||||||
|
mkA : (posit, compar : AForms) -> A
|
||||||
|
= \posit,compar -> lin A {
|
||||||
|
posit = posit ;
|
||||||
|
compar = compar ;
|
||||||
|
superl = superlAForms compar
|
||||||
|
} ;
|
||||||
|
mkA : (posit : AForms) -> A
|
||||||
|
= \posit ->
|
||||||
|
let
|
||||||
|
compar = regComparAForms posit
|
||||||
|
in lin A {
|
||||||
|
posit = posit ;
|
||||||
|
compar = compar ;
|
||||||
|
superl = superlAForms compar
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
invarA : Str -> A
|
||||||
|
= \s -> lin A {posit,compar,superl = invarAForms s} ; ---- TODO compar, superl?
|
||||||
|
|
||||||
|
AForms : Type
|
||||||
|
= R.AdjForms ;
|
||||||
|
|
||||||
|
-- the complete definition of AForms is
|
||||||
|
-- {msnom, fsnom, nsnom, msgen, fsgen, msdat,
|
||||||
|
-- fsdat, fsacc, msloc, msins, fsins, mpnom, pgen : Str} ;
|
||||||
|
|
||||||
|
velikAForms : Str -> AForms
|
||||||
|
= velikA ;
|
||||||
|
|
||||||
|
invarAForms : Str -> AForms
|
||||||
|
= \s -> invarAdjForms s ;
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
-- Verbs
|
||||||
|
|
||||||
|
mkV = overload {
|
||||||
|
mkV : (raditi : Str) -> V
|
||||||
|
= \s -> lin V {s = smartVerbForms s} ;
|
||||||
|
mkV : (raditi, radem, radio : Str) -> V
|
||||||
|
= \raditi, radem, radio ->
|
||||||
|
lin V {s = aeiVerbForms raditi radem radio} ;
|
||||||
|
mkV : VerbForms -> V
|
||||||
|
= \vf -> lin V {s = vf} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkV2 = overload {
|
||||||
|
mkV2 : V -> V2
|
||||||
|
= \v -> lin V2 {s = v.s ;
|
||||||
|
c = {s = [] ; c = accusative ; hasPrep = False}} ;
|
||||||
|
mkV2 : V -> Case -> V2
|
||||||
|
= \v,c -> lin V2 {s = v.s ;
|
||||||
|
c = {s = [] ; c = c ; hasPrep = False}} ;
|
||||||
|
mkV2 : V -> Prep -> V2
|
||||||
|
= \v,c -> lin V2 {s = v.s ; c = c} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
-- Adverbs, prepositions, conjunctions, ...
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv
|
||||||
|
= \s -> lin Adv {s = s} ;
|
||||||
|
|
||||||
|
mkPrep = overload {
|
||||||
|
mkPrep : Str -> Prep -- genitive prepositions
|
||||||
|
= \s -> lin Prep {s = s ; c = genitive ; hasPrep = True} ;
|
||||||
|
mkPrep : Case -> Prep -- oblique cases, empty string
|
||||||
|
= \c -> lin Prep {s = [] ; c = c ; hasPrep = False} ;
|
||||||
|
mkPrep : Str -> Case -> Prep
|
||||||
|
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkConj : Str -> Conj
|
||||||
|
= \s -> lin Conj {s1 = [] ; s2 = s} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
19
src/croatian/PhraseHrv.gf
Normal file
19
src/croatian/PhraseHrv.gf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
concrete PhraseHrv of Phrase = CatHrv ** open Prelude, ResHrv in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
UttS s = s ;
|
||||||
|
UttAdv adv = adv ;
|
||||||
|
UttCN cn = {s = cn.s ! Sg ! Nom} ;
|
||||||
|
UttAP ap = {s = ap.s ! Masc Anim ! Sg ! Nom} ;
|
||||||
|
UttNP np = {s = np.s ! Nom} ;
|
||||||
|
|
||||||
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|
||||||
|
|
||||||
|
NoPConj = {s = []} ;
|
||||||
|
PConjConj conj = {s = conj.s2} ;
|
||||||
|
|
||||||
|
NoVoc = {s = []} ;
|
||||||
|
VocNP np = {s = np.s ! Nom} ;
|
||||||
|
|
||||||
|
}
|
||||||
7
src/croatian/QuestionHrv.gf
Normal file
7
src/croatian/QuestionHrv.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
concrete QuestionHrv of Question = CatHrv **
|
||||||
|
open ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
QuestCl cl = cl ; ----
|
||||||
|
|
||||||
|
}
|
||||||
18
src/croatian/RelativeHrv.gf
Normal file
18
src/croatian/RelativeHrv.gf
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
concrete RelativeHrv of Relative = CatHrv ** open
|
||||||
|
ParadigmsHrv,
|
||||||
|
ResHrv,
|
||||||
|
Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
RelVP rp vp = vp ** {
|
||||||
|
subj =
|
||||||
|
let rel = (adjFormsAdjective rp).s
|
||||||
|
in \\a => case a of {
|
||||||
|
Ag g n _ => rel ! g ! n ! Nom
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdRP = (mkA "koji").posit ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
659
src/croatian/ResHrv.gf
Normal file
659
src/croatian/ResHrv.gf
Normal file
@@ -0,0 +1,659 @@
|
|||||||
|
resource ResHrv = open Prelude in {
|
||||||
|
|
||||||
|
-- AR September 2022
|
||||||
|
-- sources:
|
||||||
|
-- Wiki = https://en.wikipedia.org/wiki/Serbo-Croatian_grammar
|
||||||
|
-- BCMS = Bosnian, Croatian, Montenegrin and Serbian:
|
||||||
|
-- An Essential Grammar (Routledge Essential Grammars) 1st Edition, by Željko Vrabec
|
||||||
|
|
||||||
|
-- parameters
|
||||||
|
|
||||||
|
param
|
||||||
|
Number = Sg | Pl ;
|
||||||
|
|
||||||
|
Animacy = Anim | Inanim ;
|
||||||
|
Gender = Masc Animacy | Fem | Neutr ;
|
||||||
|
|
||||||
|
Case = Nom | Gen | Dat | Acc | Voc | Loc | Ins ; -- traditional order
|
||||||
|
|
||||||
|
Person = P1 | P2 | P3 ;
|
||||||
|
|
||||||
|
VForm =
|
||||||
|
VInf
|
||||||
|
| VPres Number Person
|
||||||
|
| VPastPart Gender Number
|
||||||
|
;
|
||||||
|
---- TODO aorist, imperfect
|
||||||
|
|
||||||
|
Agr = Ag Gender Number Person ;
|
||||||
|
|
||||||
|
CTense = CTPres | CTPast ; ----- TODO complete the tense system to match BCS verb morphology
|
||||||
|
|
||||||
|
-- phonology
|
||||||
|
|
||||||
|
oper
|
||||||
|
softConsonant : pattern Str = #("c"|"č"|"ć"|"đ"|"j"|"lj"|"nj"|"š"|"ž"|"št") ;
|
||||||
|
--- wiki "and sometimes r"; BCMS slightly different
|
||||||
|
|
||||||
|
ifSoft : Str -> (soft,hard : Str) -> Str = \word, ssoft, shard ->
|
||||||
|
case word of {
|
||||||
|
_ + #softConsonant => ssoft ;
|
||||||
|
_ => shard
|
||||||
|
} ;
|
||||||
|
|
||||||
|
animate = Masc Anim ;
|
||||||
|
inanimate = Masc Inanim ;
|
||||||
|
feminine = Fem ;
|
||||||
|
neuter = Neutr ;
|
||||||
|
|
||||||
|
palatalize : Str -> Str = \s -> case s of {
|
||||||
|
x + "ki" => x + "ci" ;
|
||||||
|
x + "ke" => x + "če" ;
|
||||||
|
x + "gi" => x + "zi" ;
|
||||||
|
x + "ge" => x + "že" ;
|
||||||
|
x + "hi" => x + "si" ;
|
||||||
|
x + "he" => x + "še" ;
|
||||||
|
x + "ce" => x + "če" ;
|
||||||
|
_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
voicing : Str -> Str = \s -> case s of {
|
||||||
|
x + "b" => x + "p" ;
|
||||||
|
x + "d" => x + "t" ;
|
||||||
|
x + "đ" => x + "ć" ;
|
||||||
|
x + "z" => x + "s" ;
|
||||||
|
x + "dž" => x + "č" ;
|
||||||
|
x + "ž" => x + "š" ;
|
||||||
|
_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---------------
|
||||||
|
-- Nouns
|
||||||
|
---------------
|
||||||
|
|
||||||
|
-- novel idea (for RGL): lexical items stored as records rather than tables
|
||||||
|
-- advantages:
|
||||||
|
-- - easier to make exceptions to paradigms (by ** {})
|
||||||
|
-- - easier to keep the number of forms minimal
|
||||||
|
-- - easier to see what is happening than with lots of anonymous arguments to mkN, mkA, mkV
|
||||||
|
|
||||||
|
-- so this is the lincat of N
|
||||||
|
|
||||||
|
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sins,pnom,pgen,pdat,pacc : Str} ;
|
||||||
|
|
||||||
|
-- But traditional tables make agreement easier to handle in syntax
|
||||||
|
-- so this is the lincat of CN
|
||||||
|
|
||||||
|
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
-- for lexical nouns N, we also need the gender but keep the minimal set of forms
|
||||||
|
|
||||||
|
LexNoun : Type = NounForms ** {g : Gender} ;
|
||||||
|
|
||||||
|
-- this is used in UseN
|
||||||
|
|
||||||
|
nounFormsNoun : NounForms -> Gender -> Noun
|
||||||
|
= \forms, g -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => forms.snom ;
|
||||||
|
Gen => forms.sgen ;
|
||||||
|
Dat => forms.sdat ;
|
||||||
|
Acc => case g of {
|
||||||
|
Masc Anim | Fem => forms.sacc ;
|
||||||
|
_ => forms.snom
|
||||||
|
} ;
|
||||||
|
Voc => forms.svoc ;
|
||||||
|
Loc => forms.sdat ;
|
||||||
|
Ins => forms.sins
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
Nom => forms.pnom ;
|
||||||
|
Gen => forms.pgen ;
|
||||||
|
Dat => forms.pdat ;
|
||||||
|
Acc => forms.pacc ;
|
||||||
|
Voc => forms.pnom ;
|
||||||
|
Loc => forms.pdat ;
|
||||||
|
Ins => forms.pdat
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
g = g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- a declension type produces these forms from a string
|
||||||
|
|
||||||
|
DeclensionType : Type = Str -> NounForms ;
|
||||||
|
|
||||||
|
-- smart paradigms
|
||||||
|
|
||||||
|
smartLexNoun : Str -> LexNoun = \s -> case s of {
|
||||||
|
_ + "a" => zenaN s ** {g = feminine} ;
|
||||||
|
_ + "i" => ziriN s ** {g = inanimate} ; ---- TODO feminine i
|
||||||
|
_ + "e" => poljeN s ** {g = neuter} ; ---- TODO sunce, uze, zvonce, rame
|
||||||
|
_ + "ao" => ugaoN s ** {g = inanimate} ;
|
||||||
|
_ + "eo" => pepeoN s ** {g = inanimate} ;
|
||||||
|
_ + "o" => koljenoN s ** {g = neuter} ; ---- TODO jedro
|
||||||
|
_ + "lac" => posjetilacN s ** {g = inanimate} ;
|
||||||
|
_ + "anj" => suzanjN s ** {g = inanimate} ;
|
||||||
|
_ + "nj" => panjN s ** {g = inanimate} ;
|
||||||
|
_ + "št" => pristN s ** {g = inanimate} ;
|
||||||
|
_ + "ac" => klinacN s ** {g = neuter} ;
|
||||||
|
_ + "c" => stricN s ** {g = inanimate} ;
|
||||||
|
_ + "in" => gradaninN s ** {g = neuter} ;
|
||||||
|
_ + "ak" => cvorakN s ** {g = inanimate} ;
|
||||||
|
_ + "a" + ? => nokatN s ** {g = inanimate} ;
|
||||||
|
_ + "g" => bubregN s ** {g = inanimate} ;
|
||||||
|
_ + "h" => trbuhN s ** {g = inanimate} ;
|
||||||
|
_ + "k" => vojnikN s ** {g = inanimate} ;
|
||||||
|
_ => izvorN s ** {g = inanimate}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkgLexNoun : Str -> Gender -> LexNoun = \s,g -> case <s,g> of {
|
||||||
|
<_ + "i", Masc _> => ziriN s ** {g = g} ;
|
||||||
|
<_ + "e", Masc _> => bifeN s ** {g = g} ;
|
||||||
|
<_ + "o", Masc _> => bifeN s ** {g = g} ;
|
||||||
|
<_, g> => smartLexNoun s ** {g = g}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- the traditional declensions, following Wiki
|
||||||
|
-- they are also exported in ParadigmsHrv with names izvorN etc
|
||||||
|
|
||||||
|
izvorN : DeclensionType = \izvor ->
|
||||||
|
{
|
||||||
|
snom = izvor ;
|
||||||
|
sgen = izvor + "a" ;
|
||||||
|
sdat = izvor + "u" ;
|
||||||
|
sacc = izvor + "a" ;
|
||||||
|
svoc = ifSoft izvor
|
||||||
|
(izvor + "u")
|
||||||
|
(palatalize (izvor + "e")) ;
|
||||||
|
sins = ifSoft izvor
|
||||||
|
(izvor + "em")
|
||||||
|
(izvor + "om") ;
|
||||||
|
|
||||||
|
pnom = palatalize (izvor + "i") ;
|
||||||
|
pgen = izvor + "a" ;
|
||||||
|
pdat =
|
||||||
|
ifSoft izvor
|
||||||
|
(palatalize (izvor + "e") + "vima")
|
||||||
|
(palatalize (izvor + "i") + "ma") ;
|
||||||
|
pacc = izvor + "e" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
nokatN : DeclensionType = \nokat ->
|
||||||
|
let
|
||||||
|
nokt = Predef.tk 2 nokat + last nokat
|
||||||
|
in izvorN nokt ** {
|
||||||
|
snom = nokat ;
|
||||||
|
sacc = nokt + "a" ;
|
||||||
|
pgen = nokat + "a" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
gradaninN : DeclensionType = \gradanin ->
|
||||||
|
let
|
||||||
|
gradan = Predef.tk 2 gradanin ;
|
||||||
|
gradanN = izvorN gradan
|
||||||
|
in numbersNounForms (izvorN gradanin) gradanN ;
|
||||||
|
|
||||||
|
numbersNounForms : (sg, pl : NounForms) -> NounForms =
|
||||||
|
\sg, pl -> sg ** {
|
||||||
|
pnom = pl.pnom ;
|
||||||
|
pgen = pl.pgen ;
|
||||||
|
pdat = pl.pdat ;
|
||||||
|
pacc = pl.pacc ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
vojnikN : DeclensionType = izvorN ;
|
||||||
|
bubregN : DeclensionType = izvorN ;
|
||||||
|
trbuhN : DeclensionType = izvorN ;
|
||||||
|
cvorakN : DeclensionType = nokatN ;
|
||||||
|
|
||||||
|
panjN : DeclensionType = \panj ->
|
||||||
|
numbersNounForms (izvorN panj) (izvorN (palatalize (panj + "e") + "v")) ;
|
||||||
|
|
||||||
|
suzanjN : DeclensionType = \suzanj ->
|
||||||
|
let
|
||||||
|
suznj = Predef.tk 3 suzanj + Predef.dp 2 suzanj
|
||||||
|
in
|
||||||
|
numbersNounForms
|
||||||
|
(izvorN suzanj)
|
||||||
|
(izvorN suznj ** {
|
||||||
|
pgen = "sužanja" ;
|
||||||
|
pdat = "sužnjima"
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
pristN : DeclensionType = panjN ;
|
||||||
|
|
||||||
|
stricN : DeclensionType = \stric ->
|
||||||
|
panjN stric ** {
|
||||||
|
svoc = palatalize (stric + "e")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
klinacN : DeclensionType = \klinac ->
|
||||||
|
let
|
||||||
|
klinc = Predef.tk 2 klinac + last klinac
|
||||||
|
in nokatN klinac ** {
|
||||||
|
svoc = palatalize (klinc + "e") ;
|
||||||
|
pdat = klinc + "ima" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
posjetilacN : DeclensionType = \posjetilac ->
|
||||||
|
let
|
||||||
|
posjetioc = Predef.tk 3 posjetilac + "oc"
|
||||||
|
in izvorN posjetioc ** {
|
||||||
|
snom = posjetilac ;
|
||||||
|
svoc = palatalize (posjetioc + "e") ;
|
||||||
|
sins = palatalize (posjetioc + "e") + "m" ;
|
||||||
|
pgen = posjetilac + "a" ;
|
||||||
|
pdat = palatalize (posjetioc + "i") + "ma" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
pepeoN : DeclensionType = \pepeo ->
|
||||||
|
let
|
||||||
|
pepel = init pepeo + "l"
|
||||||
|
in izvorN pepel ** {snom = pepeo} ;
|
||||||
|
|
||||||
|
ugaoN : DeclensionType = \ugao ->
|
||||||
|
let
|
||||||
|
ugal = init ugao + "l" ;
|
||||||
|
ugl = Predef.tk 2 ugal + last ugal
|
||||||
|
in numbersNounForms
|
||||||
|
(nokatN ugal ** {snom = ugao})
|
||||||
|
(izvorN (ugl + "ov")) ;
|
||||||
|
|
||||||
|
bifeN : DeclensionType = \bife ->
|
||||||
|
izvorN bife ** {svoc = bife + "u"} ;
|
||||||
|
|
||||||
|
ziriN : DeclensionType = \ziri ->
|
||||||
|
bifeN (ziri + "j") ** {
|
||||||
|
snom = ziri ;
|
||||||
|
pdat = ziri + "jima" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
taksiN : DeclensionType = ziriN ;
|
||||||
|
|
||||||
|
---- Danilo, Hrvoje, raščupànko skipped
|
||||||
|
|
||||||
|
koljenoN : DeclensionType = \koljeno ->
|
||||||
|
let
|
||||||
|
koljen = init koljeno
|
||||||
|
in izvorN koljen ** {
|
||||||
|
snom, sacc, svoc = koljeno ;
|
||||||
|
pnom, pacc, pvoc = koljen + "a" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
jedroN : DeclensionType = \jedro ->
|
||||||
|
let
|
||||||
|
jed = Predef.tk 2 jedro ;
|
||||||
|
r = last (init jedro) ;
|
||||||
|
in koljenoN jedro ** {
|
||||||
|
pgen = jed + "a" + r + "a" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- drvo - drveta skipped, can also decline as koljeno
|
||||||
|
---- oči, čudo skipped
|
||||||
|
|
||||||
|
poljeN : DeclensionType = \polje ->
|
||||||
|
koljenoN polje ** {
|
||||||
|
pdat = init polje + "ima" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- sunce, uže, zvonce, rame, podne, doba
|
||||||
|
|
||||||
|
---- no tables given in the sources for feminine nouns, so guessing from ending tables
|
||||||
|
|
||||||
|
zenaN : DeclensionType = \zena ->
|
||||||
|
let
|
||||||
|
zen = init zena
|
||||||
|
in {
|
||||||
|
snom = zena ;
|
||||||
|
sgen = zen + "e" ;
|
||||||
|
sdat = zen + "i" ;
|
||||||
|
sacc = zen + "u" ;
|
||||||
|
svoc = zen + "o" ; ---- o/a in Wiki ; o in https://sh.wiktionary.org/wiki/%C5%BEena
|
||||||
|
sins = zen + "om" ;
|
||||||
|
pnom, pacc, pvoc = zen + "e" ;
|
||||||
|
pdat = zen + "ama" ;
|
||||||
|
pgen = zen + "a" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
-- Adjectives
|
||||||
|
|
||||||
|
-- to be used for AP: 56 forms for each degree
|
||||||
|
Adjective : Type = {s : Gender => Number => Case => Str} ;
|
||||||
|
|
||||||
|
-- to be used for A, in three degrees: 12 forms in each
|
||||||
|
---- TODO other degrees than positive
|
||||||
|
|
||||||
|
AdjForms : Type = {
|
||||||
|
msnom, fsnom, nsnom : Str ;
|
||||||
|
msgen, fsgen : Str ; -- nsgen = msgen
|
||||||
|
msdat : Str ; -- msloc,nsdat,nsloc = msdat
|
||||||
|
fsdat : Str ; -- fsloc = fsdat
|
||||||
|
fsacc : Str ; --
|
||||||
|
msins : Str ; -- nsins, pdat, ploc, pins = msins
|
||||||
|
fsins : Str ; -- no o/e variation like in msdat
|
||||||
|
mpnom : Str ; -- mpvoc = mpnom
|
||||||
|
mpgen : Str ; --
|
||||||
|
} ;
|
||||||
|
|
||||||
|
invarAdjForms : Str -> AdjForms = \s -> {
|
||||||
|
msnom, fsnom, nsnom, msgen, fsgen, msdat,
|
||||||
|
fsdat, fsacc, msins, fsins, mpnom, mpgen = s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- used in PositA but will also work in Compar and Superl by calling their record fields
|
||||||
|
|
||||||
|
adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||||
|
s = \\g,n,c => case <n,c,g> of {
|
||||||
|
|
||||||
|
<Sg, Nom|Voc, Masc _>
|
||||||
|
| <Sg, Acc, Masc Inanim> => afs.msnom ;
|
||||||
|
<Sg, Nom|Voc, Fem>
|
||||||
|
| <Pl, Nom|Acc|Voc, Neutr> => afs.fsnom ;
|
||||||
|
<Sg, Nom|Acc|Voc, Neutr> => afs.nsnom ;
|
||||||
|
<Sg, Gen, Masc _ | Neutr>
|
||||||
|
| <Sg, Acc, Masc Anim> => afs.msgen ;
|
||||||
|
<Sg, Gen, Fem>
|
||||||
|
| <Pl, Nom|Acc|Voc, Fem>
|
||||||
|
| <Pl, Acc, Masc _> => afs.fsgen ;
|
||||||
|
<Sg, Dat|Loc, Masc _|Neutr> => afs.msdat ;
|
||||||
|
<Sg, Dat|Loc, Fem> => afs.fsdat ;
|
||||||
|
<Sg, Acc, Fem> => afs.fsacc ;
|
||||||
|
<Sg, Ins, Masc _|Neutr>
|
||||||
|
| <Pl,Dat|Loc|Ins, _> => afs.msins ;
|
||||||
|
<Sg, Ins, Fem> => afs.fsins ;
|
||||||
|
<Pl, Nom|Voc, Masc _> => afs.mpnom ;
|
||||||
|
<Pl, Gen,_> => afs.mpgen
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
velikA : Str -> AdjForms = \velik ->
|
||||||
|
let
|
||||||
|
velk : Str = case velik of {
|
||||||
|
vel + "stan" => vel + "sn" ;
|
||||||
|
vel + "ao" => vel + "l" ;
|
||||||
|
vel + "ak" => voicing vel + "k" ;
|
||||||
|
vel + "a" + k@? => vel + k ;
|
||||||
|
vel + "i" => vel ;
|
||||||
|
_ => velik
|
||||||
|
} ;
|
||||||
|
oe : Str = ifSoft velik "e" "o"
|
||||||
|
in {
|
||||||
|
msnom = velik ;
|
||||||
|
fsnom = velk + "a" ;
|
||||||
|
nsnom = velk + oe ;
|
||||||
|
msgen = velk + oe + "g" ;
|
||||||
|
fsgen = velk + "e" ;
|
||||||
|
msdat = velk + oe + "m" ;
|
||||||
|
fsdat = velk + "oj" ;
|
||||||
|
fsacc = velk + "u" ;
|
||||||
|
msins = velk + "im" ;
|
||||||
|
fsins = velk + "om" ;
|
||||||
|
mpnom = velk + "i" ;
|
||||||
|
mpgen = velk + "ih" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regComparAForms : AdjForms -> AdjForms
|
||||||
|
= \aposit -> case init aposit.fsnom of {
|
||||||
|
grub@(_ + "b"|"p"|"v"|"h") => velikA (grub + "lji") ;
|
||||||
|
star => velikA (star + "iji")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
superlAForms : AdjForms -> AdjForms
|
||||||
|
= \acompar -> velikA ("naj" + acompar.msnom) ;
|
||||||
|
|
||||||
|
od_Str = "od" ;
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
-- Verbs
|
||||||
|
-- Wiki
|
||||||
|
|
||||||
|
VerbForms : Type = VForm => Str ;
|
||||||
|
|
||||||
|
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||||
|
|
||||||
|
verbAgr : VerbForms -> Agr -> CTense -> Str ---- TODO tenses
|
||||||
|
= \vf,a,b -> case <a,b> of {
|
||||||
|
<Ag _ n p, CTPres> => vf ! VPres n p ;
|
||||||
|
<Ag g n _, CTPast> => vf ! VPastPart g n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
smartVerbForms : Str -> VerbForms = \s -> case s of {
|
||||||
|
cit + "ati" => aeiVerbForms s (cit + "am") (cit + "ao") ;
|
||||||
|
vid + "jeti" => aeiVerbForms s (vid + "im") (vid + "io") ;
|
||||||
|
radi + "ti" => aeiVerbForms s (init radi + "em") (radi + "o") ;
|
||||||
|
radi + ? => aeiVerbForms s (init radi + "em") (radi + "o") ; ----
|
||||||
|
_ => Predef.error ("expect infinitive form \"-ti\", found" ++ s)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- an traditional paradigm type, with a slight abstraction
|
||||||
|
---- TODO other traditional paradigms
|
||||||
|
|
||||||
|
aeiVerbForms : Str -> Str -> Str -> VerbForms = \citati, citam, citao ->
|
||||||
|
let
|
||||||
|
cita = init citam ;
|
||||||
|
u = case last cita of {
|
||||||
|
"a" => "aju" ;
|
||||||
|
"e" => "u" ;
|
||||||
|
"i" => "e" ;
|
||||||
|
_ => "e" ---- should not happen
|
||||||
|
} ;
|
||||||
|
cital = init citao + "l" ;
|
||||||
|
in table {
|
||||||
|
VInf => citati ;
|
||||||
|
VPres Sg P1 => cita + "m" ;
|
||||||
|
VPres Sg P2 => cita + "š" ;
|
||||||
|
VPres Sg P3 => cita ;
|
||||||
|
VPres Pl P1 => cita + "mo" ;
|
||||||
|
VPres Pl P2 => cita + "te" ;
|
||||||
|
VPres pl P3 => init cita + u ;
|
||||||
|
VPastPart (Masc _) Sg => citao ;
|
||||||
|
VPastPart Fem Sg => cital + "a" ;
|
||||||
|
VPastPart Neutr Sg => cital + "o" ;
|
||||||
|
VPastPart (Masc _) Pl => cital + "i" ;
|
||||||
|
VPastPart Fem Pl => cital + "e" ;
|
||||||
|
VPastPart Neutr Pl => cital + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- copula
|
||||||
|
|
||||||
|
jesam_Copula : {short, long, negative : Number => Person => Str} =
|
||||||
|
let
|
||||||
|
sam : Number => Person => Str = table {
|
||||||
|
Sg => table {
|
||||||
|
P1 => "sam" ;
|
||||||
|
P2 => "si" ;
|
||||||
|
P3 => "je"
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
P1 => "smo" ;
|
||||||
|
P2 => "ste" ;
|
||||||
|
P3 => "su"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
short = sam ;
|
||||||
|
long = \\n,p => case <n,p> of {
|
||||||
|
<Sg,P3> => "jeste" ; --- wiki: jest(e)
|
||||||
|
_ => sam ! n ! p
|
||||||
|
} ;
|
||||||
|
negative = \\n,p => "ni" + sam ! n ! p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Wiki: some grammars (chiefly Serbian ones) treat jesam as a defective verb
|
||||||
|
-- having only present tense. Others treat these forms as two realizations
|
||||||
|
-- of the same irregular verb biti, jesam being imperfective and budem perfective.
|
||||||
|
|
||||||
|
copula_VerbForms : VerbForms = table {
|
||||||
|
VPres n p => jesam_Copula.short ! n ! p ;
|
||||||
|
v => biti_VerbForms ! v
|
||||||
|
} ;
|
||||||
|
|
||||||
|
biti_VerbForms : VerbForms = aeiVerbForms "biti" "budem" "bio" ;
|
||||||
|
|
||||||
|
imati_VerbForms : VerbForms = aeiVerbForms "imati" "imam" "imao" ;
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
-- Pronouns
|
||||||
|
|
||||||
|
PronForms : Type = {
|
||||||
|
nom,
|
||||||
|
gen, cgen, -- bare, clitic (also as Acc)
|
||||||
|
dat, cdat, -- also as Loc
|
||||||
|
ins : Str ;
|
||||||
|
a : Agr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
personalPron : Agr -> PronForms = \a ->
|
||||||
|
{a = a ; cnom = []} **
|
||||||
|
case a of {
|
||||||
|
Ag _ Sg P1 => {
|
||||||
|
nom = "ja" ;
|
||||||
|
gen = "mene" ;
|
||||||
|
cgen = "ma" ;
|
||||||
|
dat = "meni" ;
|
||||||
|
cdat = "mi" ;
|
||||||
|
ins = "mnom"
|
||||||
|
} ;
|
||||||
|
Ag _ Sg P2 => {
|
||||||
|
nom = "ti" ;
|
||||||
|
gen = "tebe" ;
|
||||||
|
cgen = "te" ;
|
||||||
|
dat = "tebi" ;
|
||||||
|
cdat = "ti" ;
|
||||||
|
ins = "tobom"
|
||||||
|
} ;
|
||||||
|
Ag Fem Sg P3 => {
|
||||||
|
nom = "ona" ;
|
||||||
|
gen = "nje" ;
|
||||||
|
cgen = "je" ;
|
||||||
|
dat = "njoj" ;
|
||||||
|
cdat = "joj" ;
|
||||||
|
ins = "njom"
|
||||||
|
} ;
|
||||||
|
Ag g Sg P3 => {
|
||||||
|
nom = case g of {
|
||||||
|
Masc _ => "on" ;
|
||||||
|
_ => "ono"
|
||||||
|
} ;
|
||||||
|
gen = "njega" ;
|
||||||
|
cgen = "ga" ;
|
||||||
|
dat = "njemu" ;
|
||||||
|
cdat = "mu" ;
|
||||||
|
ins = "njim"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Ag _ Pl P1 => {
|
||||||
|
nom = "mi" ;
|
||||||
|
gen, cgen = "nas" ;
|
||||||
|
dat, ins = "nama" ;
|
||||||
|
cdat = "nam"
|
||||||
|
} ;
|
||||||
|
Ag _ Pl P2 => {
|
||||||
|
nom = "vi" ;
|
||||||
|
gen, cgen = "vas" ;
|
||||||
|
dat, ins = "vama" ;
|
||||||
|
cdat = "vam"
|
||||||
|
} ;
|
||||||
|
Ag g Pl P3 => {
|
||||||
|
nom = case g of {
|
||||||
|
Masc _ => "oni" ;
|
||||||
|
Fem => "one" ;
|
||||||
|
Neutr => "ona"
|
||||||
|
} ;
|
||||||
|
gen = "njih" ;
|
||||||
|
cgen = "ih" ;
|
||||||
|
dat, ins = "njima" ;
|
||||||
|
cdat = "im"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
possessivePron : Agr -> AdjForms = \a -> case a of {
|
||||||
|
Ag _ Sg P1 => velikA "moj" ;
|
||||||
|
Ag _ Sg P2 => velikA "tvoj" ;
|
||||||
|
Ag (Masc _) Sg P3 => velikA "njegov" ;
|
||||||
|
Ag (Fem|Neutr) Sg P3 => velikA "njezin" ; -- BCMS: Hrv: otherwise njen
|
||||||
|
Ag _ Pl P1 => velikA "naš" ;
|
||||||
|
Ag _ Pl P2 => velikA "vaš" ;
|
||||||
|
Ag _ Pl P3 => velikA "njihov"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
reflPossessivePron : DemPronForms = otcovA "svoj" ** {
|
||||||
|
msnom = "svoj" ; msgen = "svojho" ; msdat = "svojmu" ;
|
||||||
|
msins = "svojím" ;
|
||||||
|
ampnom = "svoji" ;
|
||||||
|
nsnom, fpnom = "svoje" ;
|
||||||
|
pgen = "svojich" ;
|
||||||
|
pdat = "svojim" ;
|
||||||
|
pins = "svojimi" ;
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
mkPron : Agr -> PronForms ** {poss : AdjForms} = \a ->
|
||||||
|
personalPron a ** {poss = possessivePron a} ;
|
||||||
|
|
||||||
|
|
||||||
|
param NumSize = NS_1 | NS_2_4 | NS_5_20 | NS_20_ ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Determiner : Type = {
|
||||||
|
s : Gender => Case => Str ;
|
||||||
|
size : NumSize
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- interrogatives TODO
|
||||||
|
|
||||||
|
ktoForms : Case => Str = table {
|
||||||
|
Nom => "kto" ;
|
||||||
|
Gen | Acc => "koho" ;
|
||||||
|
Dat => "komu" ;
|
||||||
|
Loc => "kom" ;
|
||||||
|
Ins => "kým"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
coForms : Case => Str = table {
|
||||||
|
Nom|Acc => "čo" ;
|
||||||
|
Gen => "čoho" ;
|
||||||
|
Dat => "čomu" ;
|
||||||
|
Loc => "čom" ;
|
||||||
|
Ins => "čím"
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- combining nouns with numerals
|
||||||
|
|
||||||
|
oper
|
||||||
|
numSizeForm : (Number => Case => Str) -> NumSize -> Case -> Str
|
||||||
|
= \cns,n,c -> case n of {
|
||||||
|
NS_1 => cns ! Sg ! c ;
|
||||||
|
NS_2_4 => cns ! Pl ! c ;
|
||||||
|
_ => case c of {
|
||||||
|
Nom | Acc => cns ! Pl ! Gen ;
|
||||||
|
_ => cns ! Pl ! c
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
numSizeAgr : Gender -> NumSize -> Person -> Agr
|
||||||
|
= \g,ns,p -> case ns of {
|
||||||
|
NS_1 => Ag g Sg p ;
|
||||||
|
NS_2_4 => Ag g Pl p ;
|
||||||
|
_ => Ag Neutr Sg p ---- TODO verify
|
||||||
|
} ;
|
||||||
|
|
||||||
|
numSizeNumber : NumSize -> Number = \ns -> case ns of {
|
||||||
|
NS_1 => Sg ;
|
||||||
|
_ => Pl ---- TO CHECK
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
32
src/croatian/SentenceHrv.gf
Normal file
32
src/croatian/SentenceHrv.gf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
concrete SentenceHrv of Sentence = CatHrv **
|
||||||
|
open Prelude, ResHrv in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PredVP np vp = {
|
||||||
|
subj = case np.hasClit of {
|
||||||
|
True => np.clit ! Nom ; -- pro-drop
|
||||||
|
False => np.s ! Nom
|
||||||
|
} ;
|
||||||
|
verb = vp.verb ;
|
||||||
|
clit = vp.clit ! np.a ;
|
||||||
|
compl = vp.compl ! np.a ;
|
||||||
|
a = np.a ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseCl temp pol cl = {
|
||||||
|
s = temp.s ++ cl.subj ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a CTPres ++ cl.compl ;
|
||||||
|
} ; ---- TODO tense, negation
|
||||||
|
|
||||||
|
--- TODO is inversion the standard? ; add indirect questions
|
||||||
|
UseQCl temp pol cl = {
|
||||||
|
s = temp.s ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a CTPres ++ cl.subj ++ cl.compl ;
|
||||||
|
} ; ---- TODO tenses
|
||||||
|
|
||||||
|
UseRCl temp pol rcl = {
|
||||||
|
s = \\a => temp.s ++
|
||||||
|
rcl.subj ! a ++ rcl.clit ! a ++
|
||||||
|
pol.s ++ verbAgr rcl.verb a CTPres ++
|
||||||
|
rcl.compl ! a ;
|
||||||
|
} ; ---- TODO tenses
|
||||||
|
|
||||||
|
}
|
||||||
34
src/croatian/StructuralHrv.gf
Normal file
34
src/croatian/StructuralHrv.gf
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
concrete StructuralHrv of Structural = CatHrv **
|
||||||
|
open ParadigmsHrv, ResHrv, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
and_Conj = mkConj "i" ;
|
||||||
|
---- by8agent_Prep = mkPrep "" Ins ;
|
||||||
|
---- few_Det = invarNumeral "málo" ; -- see notes
|
||||||
|
for_Prep = mkPrep "pre" accusative ;
|
||||||
|
from_Prep = mkPrep "iz" Gen ;
|
||||||
|
have_V2 = mkV2 (mkV imati_VerbForms) ;
|
||||||
|
in_Prep = mkPrep "u" Loc ;
|
||||||
|
---- many_Det = regNumeral "mnoho" "mnohých" "mnohým" "mnohými" ; ---- alternative: invarNumeral "veľa" ;
|
||||||
|
or_Conj = mkConj "alebo" ;
|
||||||
|
---- somePl_Det = invarDeterminer "niekoľko" Num5 ;
|
||||||
|
---- somePl_Det = {s = \\g,c => (demPronFormsAdjective (mkDemPronForms "niekoľko") "").s ! g ! Pl ! c ; size = Num5} ;
|
||||||
|
---- something_NP = {s,clit,prep = \\c => "nie" + coForms ! c ; a = Ag Neutr Sg P3 ; hasClit = False} ; -- CEG 5.6.3
|
||||||
|
possess_Prep = mkPrep "" Gen ;
|
||||||
|
that_Quant = adjFormsAdjective (velikA "oni" ** {msnom = "onaj"}) ; ---- TODO: taj, ta, to
|
||||||
|
this_Quant = adjFormsAdjective (velikA "ovi" ** {msnom = "ovaj"}) ;
|
||||||
|
to_Prep = mkPrep "u" Acc ;
|
||||||
|
with_Prep = mkPrep (pre {"s"|"z"|"š"|"ž"|"mnom" => "sa" ; _ => "s"}) Ins ;
|
||||||
|
|
||||||
|
i_Pron = mkPron (Ag (Masc Anim) Sg P1) ; --- to add Fem pronouns in Extend
|
||||||
|
youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ;
|
||||||
|
he_Pron = mkPron (Ag (Masc Anim) Sg P3) ;
|
||||||
|
she_Pron = mkPron (Ag Fem Sg P3) ;
|
||||||
|
it_Pron = mkPron (Ag Neutr Sg P3) ;
|
||||||
|
we_Pron = mkPron (Ag (Masc Anim) Pl P1) ;
|
||||||
|
youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ;
|
||||||
|
they_Pron = mkPron (Ag (Masc Anim) Pl P3) ;
|
||||||
|
|
||||||
|
somewhere_Adv = mkAdv "negdje" ;
|
||||||
|
|
||||||
|
}
|
||||||
15
src/croatian/SymbolHrv.gf
Normal file
15
src/croatian/SymbolHrv.gf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete SymbolHrv of Symbol = CatHrv ** open Prelude, ResHrv in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Symb = {s : Str} ;
|
||||||
|
lin
|
||||||
|
MkSymb s = s ;
|
||||||
|
SymbPN s = lin PN {s = \\_ => s.s ; g = Neutr} ;
|
||||||
|
|
||||||
|
IntPN s = lin PN {s = \\_ => s.s ; g = Neutr} ;
|
||||||
|
|
||||||
|
SymbNum s = lin Card {s = \\_,_ => s.s ; size = NS_20_} ; --- size
|
||||||
|
|
||||||
|
}
|
||||||
660
src/croatian/TableExtResHrv.gf
Normal file
660
src/croatian/TableExtResHrv.gf
Normal file
@@ -0,0 +1,660 @@
|
|||||||
|
resource TableExtResHrv = open Prelude in {
|
||||||
|
|
||||||
|
-- AR September 2022
|
||||||
|
-- sources:
|
||||||
|
-- Wiki = https://en.wikipedia.org/wiki/Serbo-Croatian_grammar
|
||||||
|
-- BCMS = Bosnian, Croatian, Montenegrin and Serbian:
|
||||||
|
-- An Essential Grammar (Routledge Essential Grammars) 1st Edition, by Željko Vrabec
|
||||||
|
|
||||||
|
-- parameters
|
||||||
|
|
||||||
|
param
|
||||||
|
Number = Sg | Pl ;
|
||||||
|
|
||||||
|
Animacy = Anim | Inanim ;
|
||||||
|
Gender = Masc Animacy | Fem | Neutr ;
|
||||||
|
|
||||||
|
Case = Nom | Gen | Dat | Acc | Voc | Loc | Ins ; -- traditional order
|
||||||
|
|
||||||
|
Person = P1 | P2 | P3 ;
|
||||||
|
|
||||||
|
VForm =
|
||||||
|
VInf
|
||||||
|
| VPres Number Person
|
||||||
|
| VPastPart Gender Number
|
||||||
|
;
|
||||||
|
---- TODO aorist, imperfect
|
||||||
|
|
||||||
|
Agr = Ag Gender Number Person ;
|
||||||
|
|
||||||
|
CTense = CTPres | CTPast ; ----- TODO complete the tense system to match BCS verb morphology
|
||||||
|
|
||||||
|
-- phonology
|
||||||
|
|
||||||
|
oper
|
||||||
|
softConsonant : pattern Str = #("c"|"č"|"ć"|"đ"|"j"|"lj"|"nj"|"š"|"ž"|"št") ;
|
||||||
|
--- wiki "and sometimes r"; BCMS slightly different
|
||||||
|
|
||||||
|
ifSoft : Str -> (soft,hard : Str) -> Str = \word, ssoft, shard ->
|
||||||
|
case word of {
|
||||||
|
_ + #softConsonant => ssoft ;
|
||||||
|
_ => shard
|
||||||
|
} ;
|
||||||
|
|
||||||
|
animate = Masc Anim ;
|
||||||
|
inanimate = Masc Inanim ;
|
||||||
|
feminine = Fem ;
|
||||||
|
neuter = Neutr ;
|
||||||
|
|
||||||
|
palatalize : Str -> Str = \s -> case s of {
|
||||||
|
x + "ki" => x + "ci" ;
|
||||||
|
x + "ke" => x + "če" ;
|
||||||
|
x + "gi" => x + "zi" ;
|
||||||
|
x + "ge" => x + "že" ;
|
||||||
|
x + "hi" => x + "si" ;
|
||||||
|
x + "he" => x + "še" ;
|
||||||
|
x + "ce" => x + "če" ;
|
||||||
|
_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
voicing : Str -> Str = \s -> case s of {
|
||||||
|
x + "b" => x + "p" ;
|
||||||
|
x + "d" => x + "t" ;
|
||||||
|
x + "đ" => x + "ć" ;
|
||||||
|
x + "z" => x + "s" ;
|
||||||
|
x + "dž" => x + "č" ;
|
||||||
|
x + "ž" => x + "š" ;
|
||||||
|
_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---------------
|
||||||
|
-- Nouns
|
||||||
|
---------------
|
||||||
|
|
||||||
|
-- novel idea (for RGL): lexical items stored as records rather than tables
|
||||||
|
-- advantages:
|
||||||
|
-- - easier to make exceptions to paradigms (by ** {})
|
||||||
|
-- - easier to keep the number of forms minimal
|
||||||
|
-- - easier to see what is happening than with lots of anonymous arguments to mkN, mkA, mkV
|
||||||
|
-- Starting from GF 2022-10-04: this can now be done with table extension, which gives
|
||||||
|
-- type safety and more powerful pattern matching
|
||||||
|
|
||||||
|
param
|
||||||
|
NForm = snom | sgen | sdat | sacc | svoc | sins | pnom | pgen | pdat | pacc ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
NounForms : Type = NForm => Str ;
|
||||||
|
|
||||||
|
-- But traditional tables make agreement easier to handle in syntax
|
||||||
|
-- so this is the lincat of CN
|
||||||
|
|
||||||
|
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
-- for lexical nouns N, we also need the gender but keep the minimal set of forms
|
||||||
|
|
||||||
|
LexNoun : Type = {s : NounForms ; g : Gender} ;
|
||||||
|
|
||||||
|
-- this is used in UseN
|
||||||
|
|
||||||
|
nounFormsNoun : NounForms -> Gender -> Noun
|
||||||
|
= \forms, g -> {
|
||||||
|
s = table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => forms ! snom ;
|
||||||
|
Gen => forms ! sgen ;
|
||||||
|
Dat => forms ! sdat ;
|
||||||
|
Acc => case g of {
|
||||||
|
Masc Anim | Fem => forms ! sacc ;
|
||||||
|
_ => forms ! snom
|
||||||
|
} ;
|
||||||
|
Voc => forms ! svoc ;
|
||||||
|
Loc => forms ! sdat ;
|
||||||
|
Ins => forms ! sins
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
Nom => forms ! pnom ;
|
||||||
|
Gen => forms ! pgen ;
|
||||||
|
Dat => forms ! pdat ;
|
||||||
|
Acc => forms ! pacc ;
|
||||||
|
Voc => forms ! pnom ;
|
||||||
|
Loc => forms ! pdat ;
|
||||||
|
Ins => forms ! pdat
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
g = g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- a declension type produces these forms from a string
|
||||||
|
|
||||||
|
DeclensionType : Type = Str -> NounForms ;
|
||||||
|
|
||||||
|
-- smart paradigms
|
||||||
|
|
||||||
|
smartLexNoun : Str -> LexNoun = \s -> case s of {
|
||||||
|
_ + "a" => {s = zenaN s ; g = feminine} ;
|
||||||
|
_ + "i" => {s = ziriN s ; g = inanimate} ; ---- TODO feminine i
|
||||||
|
_ + "e" => {s = poljeN s ; g = neuter} ; ---- TODO sunce, uze, zvonce, rame
|
||||||
|
_ + "ao" => {s = ugaoN s ; g = inanimate} ;
|
||||||
|
_ + "eo" => {s = pepeoN s ; g = inanimate} ;
|
||||||
|
_ + "o" => {s = koljenoN s ; g = neuter} ; ---- TODO jedro
|
||||||
|
_ + "lac" => {s = posjetilacN s ; g = inanimate} ;
|
||||||
|
_ + "anj" => {s = suzanjN s ; g = inanimate} ;
|
||||||
|
_ + "nj" => {s = panjN s ; g = inanimate} ;
|
||||||
|
_ + "št" => {s = pristN s ; g = inanimate} ;
|
||||||
|
_ + "ac" => {s = klinacN s ; g = neuter} ;
|
||||||
|
_ + "c" => {s = stricN s ; g = inanimate} ;
|
||||||
|
_ + "in" => {s = gradaninN s ; g = neuter} ;
|
||||||
|
_ + "ak" => {s = cvorakN s ; g = inanimate} ;
|
||||||
|
_ + "a" + ? => {s = nokatN s ; g = inanimate} ;
|
||||||
|
_ + "g" => {s = bubregN s ; g = inanimate} ;
|
||||||
|
_ + "h" => {s = trbuhN s ; g = inanimate} ;
|
||||||
|
_ + "k" => {s = vojnikN s ; g = inanimate} ;
|
||||||
|
_ => {s = izvorN s ; g = inanimate}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkgLexNoun : Str -> Gender -> LexNoun = \s,g -> case <s,g> of {
|
||||||
|
<_ + "i", Masc _> => {s = ziriN s ; g = g} ;
|
||||||
|
<_ + "e", Masc _> => {s = bifeN s ; g = g} ;
|
||||||
|
<_ + "o", Masc _> => {s = bifeN s ; g = g} ;
|
||||||
|
<_, g> => smartLexNoun s ** {g = g}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- the traditional declensions, following Wiki
|
||||||
|
-- they are also exported in ParadigmsHrv with names izvorN etc
|
||||||
|
|
||||||
|
izvorN : DeclensionType = \izvor ->
|
||||||
|
table {
|
||||||
|
snom => izvor ;
|
||||||
|
sgen => izvor + "a" ;
|
||||||
|
sdat => izvor + "u" ;
|
||||||
|
sacc => izvor + "a" ;
|
||||||
|
svoc => ifSoft izvor
|
||||||
|
(izvor + "u")
|
||||||
|
(palatalize (izvor + "e")) ;
|
||||||
|
sins => ifSoft izvor
|
||||||
|
(izvor + "em")
|
||||||
|
(izvor + "om") ;
|
||||||
|
|
||||||
|
pnom => palatalize (izvor + "i") ;
|
||||||
|
pgen => izvor + "a" ;
|
||||||
|
pdat => ifSoft izvor
|
||||||
|
(palatalize (izvor + "e") + "vima")
|
||||||
|
(palatalize (izvor + "i") + "ma") ;
|
||||||
|
pacc => izvor + "e"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
nokatN : DeclensionType = \nokat ->
|
||||||
|
let
|
||||||
|
nokt = Predef.tk 2 nokat + last nokat
|
||||||
|
in izvorN nokt ** {
|
||||||
|
snom => nokat ;
|
||||||
|
sacc => nokt + "a" ;
|
||||||
|
pgen => nokat + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
gradaninN : DeclensionType = \gradanin ->
|
||||||
|
let
|
||||||
|
gradan = Predef.tk 2 gradanin ;
|
||||||
|
gradanN = izvorN gradan
|
||||||
|
in numbersNounForms (izvorN gradanin) gradanN ;
|
||||||
|
|
||||||
|
numbersNounForms : (sg, pl : NounForms) -> NounForms =
|
||||||
|
\sg, pl -> sg ** {
|
||||||
|
pnom => pl ! pnom ;
|
||||||
|
pgen => pl ! pgen ;
|
||||||
|
pdat => pl ! pdat ;
|
||||||
|
pacc => pl ! pacc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
vojnikN : DeclensionType = izvorN ;
|
||||||
|
bubregN : DeclensionType = izvorN ;
|
||||||
|
trbuhN : DeclensionType = izvorN ;
|
||||||
|
cvorakN : DeclensionType = nokatN ;
|
||||||
|
|
||||||
|
panjN : DeclensionType = \panj ->
|
||||||
|
numbersNounForms (izvorN panj) (izvorN (palatalize (panj + "e") + "v")) ;
|
||||||
|
|
||||||
|
suzanjN : DeclensionType = \suzanj ->
|
||||||
|
let
|
||||||
|
suznj = Predef.tk 3 suzanj + Predef.dp 2 suzanj
|
||||||
|
in
|
||||||
|
numbersNounForms
|
||||||
|
(izvorN suzanj)
|
||||||
|
(izvorN suznj ** {
|
||||||
|
pgen => "sužanja" ;
|
||||||
|
pdat => "sužnjima"
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
pristN : DeclensionType = panjN ;
|
||||||
|
|
||||||
|
stricN : DeclensionType = \stric ->
|
||||||
|
panjN stric ** {
|
||||||
|
svoc => palatalize (stric + "e")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
klinacN : DeclensionType = \klinac ->
|
||||||
|
let
|
||||||
|
klinc = Predef.tk 2 klinac + last klinac
|
||||||
|
in nokatN klinac ** {
|
||||||
|
svoc => palatalize (klinc + "e") ;
|
||||||
|
pdat => klinc + "ima"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
posjetilacN : DeclensionType = \posjetilac ->
|
||||||
|
let
|
||||||
|
posjetioc = Predef.tk 3 posjetilac + "oc"
|
||||||
|
in izvorN posjetioc ** {
|
||||||
|
snom => posjetilac ;
|
||||||
|
svoc => palatalize (posjetioc + "e") ;
|
||||||
|
sins => palatalize (posjetioc + "e") + "m" ;
|
||||||
|
pgen => posjetilac + "a" ;
|
||||||
|
pdat => palatalize (posjetioc + "i") + "ma"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
pepeoN : DeclensionType = \pepeo ->
|
||||||
|
let
|
||||||
|
pepel = init pepeo + "l"
|
||||||
|
in izvorN pepel ** {snom => pepeo} ;
|
||||||
|
|
||||||
|
ugaoN : DeclensionType = \ugao ->
|
||||||
|
let
|
||||||
|
ugal = init ugao + "l" ;
|
||||||
|
ugl = Predef.tk 2 ugal + last ugal
|
||||||
|
in numbersNounForms
|
||||||
|
(nokatN ugal ** {snom => ugao})
|
||||||
|
(izvorN (ugl + "ov")) ;
|
||||||
|
|
||||||
|
bifeN : DeclensionType = \bife ->
|
||||||
|
izvorN bife ** {svoc => bife + "u"} ;
|
||||||
|
|
||||||
|
ziriN : DeclensionType = \ziri ->
|
||||||
|
bifeN (ziri + "j") ** {
|
||||||
|
snom => ziri ;
|
||||||
|
pdat => ziri + "jima"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
taksiN : DeclensionType = ziriN ;
|
||||||
|
|
||||||
|
---- Danilo, Hrvoje, raščupànko skipped
|
||||||
|
|
||||||
|
koljenoN : DeclensionType = \koljeno ->
|
||||||
|
let
|
||||||
|
koljen = init koljeno
|
||||||
|
in izvorN koljen ** {
|
||||||
|
snom | sacc | svoc => koljeno ;
|
||||||
|
pnom | pacc => koljen + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
jedroN : DeclensionType = \jedro ->
|
||||||
|
let
|
||||||
|
jed = Predef.tk 2 jedro ;
|
||||||
|
r = last (init jedro) ;
|
||||||
|
in koljenoN jedro ** {
|
||||||
|
pgen => jed + "a" + r + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- drvo - drveta skipped, can also decline as koljeno
|
||||||
|
---- oči, čudo skipped
|
||||||
|
|
||||||
|
poljeN : DeclensionType = \polje ->
|
||||||
|
koljenoN polje ** {
|
||||||
|
pdat => init polje + "ima"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- sunce, uže, zvonce, rame, podne, doba
|
||||||
|
|
||||||
|
---- no tables given in the sources for feminine nouns, so guessing from ending tables
|
||||||
|
|
||||||
|
zenaN : DeclensionType = \zena ->
|
||||||
|
let
|
||||||
|
zen = init zena
|
||||||
|
in table {
|
||||||
|
snom => zena ;
|
||||||
|
sgen => zen + "e" ;
|
||||||
|
sdat => zen + "i" ;
|
||||||
|
sacc => zen + "u" ;
|
||||||
|
svoc => zen + "o" ; ---- o/a in Wiki ; o in https://sh.wiktionary.org/wiki/%C5%BEena
|
||||||
|
sins => zen + "om" ;
|
||||||
|
pnom | pacc => zen + "e" ;
|
||||||
|
pdat => zen + "ama" ;
|
||||||
|
pgen => zen + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
-- Adjectives
|
||||||
|
|
||||||
|
-- to be used for AP: 56 forms for each degree
|
||||||
|
Adjective : Type = {s : Gender => Number => Case => Str} ;
|
||||||
|
|
||||||
|
-- to be used for A, in three degrees: 12 forms in each
|
||||||
|
---- TODO other degrees than positive
|
||||||
|
|
||||||
|
param AForm =
|
||||||
|
msnom | fsnom | nsnom |
|
||||||
|
msgen | fsgen | -- nsgen = msgen
|
||||||
|
msdat | -- msloc,nsdat,nsloc = msdat
|
||||||
|
fsdat | -- fsloc = fsdat
|
||||||
|
fsacc | --
|
||||||
|
msins | -- nsins, pdat, ploc, pins = msins
|
||||||
|
fsins | -- no o/e variation like in msdat
|
||||||
|
mpnom | -- mpvoc = mpnom
|
||||||
|
mpgen -- fpgen, npgen = mpgen
|
||||||
|
;
|
||||||
|
|
||||||
|
oper
|
||||||
|
AdjForms : Type = AForm => Str ;
|
||||||
|
|
||||||
|
invarAdjForms : Str -> AdjForms = \s -> \\a => s ;
|
||||||
|
|
||||||
|
-- used in PositA but will also work in Compar and Superl by calling their record fields
|
||||||
|
|
||||||
|
adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||||
|
s = \\g,n,c => case <n,c,g> of {
|
||||||
|
|
||||||
|
<Sg, Nom|Voc, Masc _>
|
||||||
|
| <Sg, Acc, Masc Inanim> => afs ! msnom ;
|
||||||
|
<Sg, Nom|Voc, Fem>
|
||||||
|
| <Pl, Nom|Acc|Voc, Neutr> => afs ! fsnom ;
|
||||||
|
<Sg, Nom|Acc|Voc, Neutr> => afs ! nsnom ;
|
||||||
|
<Sg, Gen, Masc _ | Neutr>
|
||||||
|
| <Sg, Acc, Masc Anim> => afs ! msgen ;
|
||||||
|
<Sg, Gen, Fem>
|
||||||
|
| <Pl, Nom|Acc|Voc, Fem>
|
||||||
|
| <Pl, Acc, Masc _> => afs ! fsgen ;
|
||||||
|
<Sg, Dat|Loc, Masc _|Neutr> => afs ! msdat ;
|
||||||
|
<Sg, Dat|Loc, Fem> => afs ! fsdat ;
|
||||||
|
<Sg, Acc, Fem> => afs ! fsacc ;
|
||||||
|
<Sg, Ins, Masc _|Neutr>
|
||||||
|
| <Pl,Dat|Loc|Ins, _> => afs ! msins ;
|
||||||
|
<Sg, Ins, Fem> => afs ! fsins ;
|
||||||
|
<Pl, Nom|Voc, Masc _> => afs ! mpnom ;
|
||||||
|
<Pl, Gen,_> => afs ! mpgen
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
velikA : Str -> AdjForms = \velik ->
|
||||||
|
let
|
||||||
|
velk : Str = case velik of {
|
||||||
|
vel + "stan" => vel + "sn" ;
|
||||||
|
vel + "ao" => vel + "l" ;
|
||||||
|
vel + "ak" => voicing vel + "k" ;
|
||||||
|
vel + "a" + k@? => vel + k ;
|
||||||
|
vel + "i" => vel ;
|
||||||
|
_ => velik
|
||||||
|
} ;
|
||||||
|
oe : Str = ifSoft velik "e" "o"
|
||||||
|
in table {
|
||||||
|
msnom => velik ;
|
||||||
|
fsnom => velk + "a" ;
|
||||||
|
nsnom => velk + oe ;
|
||||||
|
msgen => velk + oe + "g" ;
|
||||||
|
fsgen => velk + "e" ;
|
||||||
|
msdat => velk + oe + "m" ;
|
||||||
|
fsdat => velk + "oj" ;
|
||||||
|
fsacc => velk + "u" ;
|
||||||
|
msins => velk + "im" ;
|
||||||
|
fsins => velk + "om" ;
|
||||||
|
mpnom => velk + "i" ;
|
||||||
|
mpgen => velk + "ih"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regComparAForms : AdjForms -> AdjForms
|
||||||
|
= \aposit -> case init (aposit ! fsnom) of {
|
||||||
|
grub@(_ + "b"|"p"|"v"|"h") => velikA (grub + "lji") ;
|
||||||
|
star => velikA (star + "iji")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
superlAForms : AdjForms -> AdjForms
|
||||||
|
= \acompar -> velikA ("naj" + acompar ! msnom) ;
|
||||||
|
|
||||||
|
od_Str = "od" ;
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
-- Verbs
|
||||||
|
-- Wiki
|
||||||
|
|
||||||
|
VerbForms : Type = VForm => Str ;
|
||||||
|
|
||||||
|
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||||
|
|
||||||
|
verbAgr : VerbForms -> Agr -> CTense -> Str ---- TODO tenses
|
||||||
|
= \vf,a,b -> case <a,b> of {
|
||||||
|
<Ag _ n p, CTPres> => vf ! VPres n p ;
|
||||||
|
<Ag g n _, CTPast> => vf ! VPastPart g n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
smartVerbForms : Str -> VerbForms = \s -> case s of {
|
||||||
|
cit + "ati" => aeiVerbForms s (cit + "am") (cit + "ao") ;
|
||||||
|
vid + "jeti" => aeiVerbForms s (vid + "im") (vid + "io") ;
|
||||||
|
radi + "ti" => aeiVerbForms s (init radi + "em") (radi + "o") ;
|
||||||
|
_ => Predef.error ("expect infinitive form \"-ti\", found" ++ s)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- an traditional paradigm type, with a slight abstraction
|
||||||
|
---- TODO other traditional paradigms
|
||||||
|
|
||||||
|
aeiVerbForms : Str -> Str -> Str -> VerbForms = \citati, citam, citao ->
|
||||||
|
let
|
||||||
|
cita = init citam ;
|
||||||
|
u = case last cita of {
|
||||||
|
"a" => "aju" ;
|
||||||
|
"e" => "u" ;
|
||||||
|
"i" => "e"
|
||||||
|
} ;
|
||||||
|
cital = init citao + "l" ;
|
||||||
|
in table {
|
||||||
|
VInf => citati ;
|
||||||
|
VPres Sg P1 => cita + "m" ;
|
||||||
|
VPres Sg P2 => cita + "š" ;
|
||||||
|
VPres Sg P3 => cita ;
|
||||||
|
VPres Pl P1 => cita + "mo" ;
|
||||||
|
VPres Pl P2 => cita + "te" ;
|
||||||
|
VPres pl P3 => init cita + u ;
|
||||||
|
VPastPart (Masc _) Sg => citao ;
|
||||||
|
VPastPart Fem Sg => cital + "a" ;
|
||||||
|
VPastPart Neutr Sg => cital + "o" ;
|
||||||
|
VPastPart (Masc _) Pl => cital + "i" ;
|
||||||
|
VPastPart Fem Pl => cital + "e" ;
|
||||||
|
VPastPart Neutr Pl => cital + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- copula
|
||||||
|
|
||||||
|
jesam_Copula : {short, long, negative : Number => Person => Str} =
|
||||||
|
let
|
||||||
|
sam : Number => Person => Str = table {
|
||||||
|
Sg => table {
|
||||||
|
P1 => "sam" ;
|
||||||
|
P2 => "si" ;
|
||||||
|
P3 => "je"
|
||||||
|
} ;
|
||||||
|
Pl => table {
|
||||||
|
P1 => "smo" ;
|
||||||
|
P2 => "ste" ;
|
||||||
|
P3 => "su"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
short = sam ;
|
||||||
|
long = \\n,p => case <n,p> of {
|
||||||
|
<Sg,P3> => "jeste" ; --- wiki: jest(e)
|
||||||
|
_ => sam ! n ! p
|
||||||
|
} ;
|
||||||
|
negative = \\n,p => "ni" + sam ! n ! p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Wiki: some grammars (chiefly Serbian ones) treat jesam as a defective verb
|
||||||
|
-- having only present tense. Others treat these forms as two realizations
|
||||||
|
-- of the same irregular verb biti, jesam being imperfective and budem perfective.
|
||||||
|
|
||||||
|
copula_VerbForms : VerbForms = table {
|
||||||
|
VPres n p => jesam_Copula.short ! n ! p ;
|
||||||
|
v => biti_VerbForms ! v
|
||||||
|
} ;
|
||||||
|
|
||||||
|
biti_VerbForms : VerbForms = aeiVerbForms "biti" "budem" "bio" ;
|
||||||
|
|
||||||
|
imati_VerbForms : VerbForms = aeiVerbForms "imati" "imam" "imao" ;
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
-- Pronouns
|
||||||
|
|
||||||
|
PronForms : Type = {
|
||||||
|
nom,
|
||||||
|
gen, cgen, -- bare, clitic (also as Acc)
|
||||||
|
dat, cdat, -- also as Loc
|
||||||
|
ins : Str ;
|
||||||
|
a : Agr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
personalPron : Agr -> PronForms = \a ->
|
||||||
|
{a = a ; cnom = []} **
|
||||||
|
case a of {
|
||||||
|
Ag _ Sg P1 => {
|
||||||
|
nom = "ja" ;
|
||||||
|
gen = "mene" ;
|
||||||
|
cgen = "ma" ;
|
||||||
|
dat = "meni" ;
|
||||||
|
cdat = "mi" ;
|
||||||
|
ins = "mnom"
|
||||||
|
} ;
|
||||||
|
Ag _ Sg P2 => {
|
||||||
|
nom = "ti" ;
|
||||||
|
gen = "tebe" ;
|
||||||
|
cgen = "te" ;
|
||||||
|
dat = "tebi" ;
|
||||||
|
cdat = "ti" ;
|
||||||
|
ins = "tobom"
|
||||||
|
} ;
|
||||||
|
Ag Fem Sg P3 => {
|
||||||
|
nom = "ona" ;
|
||||||
|
gen = "nje" ;
|
||||||
|
cgen = "je" ;
|
||||||
|
dat = "njoj" ;
|
||||||
|
cdat = "joj" ;
|
||||||
|
ins = "njom"
|
||||||
|
} ;
|
||||||
|
Ag g Sg P3 => {
|
||||||
|
nom = case g of {
|
||||||
|
Masc _ => "on" ;
|
||||||
|
_ => "ono"
|
||||||
|
} ;
|
||||||
|
gen = "njega" ;
|
||||||
|
cgen = "ga" ;
|
||||||
|
dat = "njemu" ;
|
||||||
|
cdat = "mu" ;
|
||||||
|
ins = "njim"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Ag _ Pl P1 => {
|
||||||
|
nom = "mi" ;
|
||||||
|
gen, cgen = "nas" ;
|
||||||
|
dat, ins = "nama" ;
|
||||||
|
cdat = "nam"
|
||||||
|
} ;
|
||||||
|
Ag _ Pl P2 => {
|
||||||
|
nom = "vi" ;
|
||||||
|
gen, cgen = "vas" ;
|
||||||
|
dat, ins = "vama" ;
|
||||||
|
cdat = "vam"
|
||||||
|
} ;
|
||||||
|
Ag g Pl P3 => {
|
||||||
|
nom = case g of {
|
||||||
|
Masc _ => "oni" ;
|
||||||
|
Fem => "one" ;
|
||||||
|
Neutr => "ona"
|
||||||
|
} ;
|
||||||
|
gen = "njih" ;
|
||||||
|
cgen = "ih" ;
|
||||||
|
dat, ins = "njima" ;
|
||||||
|
cdat = "im"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
possessivePron : Agr -> AdjForms = \a -> case a of {
|
||||||
|
Ag _ Sg P1 => velikA "moj" ;
|
||||||
|
Ag _ Sg P2 => velikA "tvoj" ;
|
||||||
|
Ag (Masc _) Sg P3 => velikA "njegov" ;
|
||||||
|
Ag (Fem|Neutr) Sg P3 => velikA "njezin" ; -- BCMS: Hrv: otherwise njen
|
||||||
|
Ag _ Pl P1 => velikA "naš" ;
|
||||||
|
Ag _ Pl P2 => velikA "vaš" ;
|
||||||
|
Ag _ Pl P3 => velikA "njihov"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
reflPossessivePron : DemPronForms = otcovA "svoj" ** {
|
||||||
|
msnom = "svoj" ; msgen = "svojho" ; msdat = "svojmu" ;
|
||||||
|
msins = "svojím" ;
|
||||||
|
ampnom = "svoji" ;
|
||||||
|
nsnom, fpnom = "svoje" ;
|
||||||
|
pgen = "svojich" ;
|
||||||
|
pdat = "svojim" ;
|
||||||
|
pins = "svojimi" ;
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
mkPron : Agr -> PronForms ** {poss : AdjForms} = \a ->
|
||||||
|
personalPron a ** {poss = possessivePron a} ;
|
||||||
|
|
||||||
|
|
||||||
|
param NumSize = NS_1 | NS_2_4 | NS_5_20 | NS_20_ ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Determiner : Type = {
|
||||||
|
s : Gender => Case => Str ;
|
||||||
|
size : NumSize
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- interrogatives TODO
|
||||||
|
|
||||||
|
ktoForms : Case => Str = table {
|
||||||
|
Nom => "kto" ;
|
||||||
|
Gen | Acc => "koho" ;
|
||||||
|
Dat => "komu" ;
|
||||||
|
Loc => "kom" ;
|
||||||
|
Ins => "kým"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
coForms : Case => Str = table {
|
||||||
|
Nom|Acc => "čo" ;
|
||||||
|
Gen => "čoho" ;
|
||||||
|
Dat => "čomu" ;
|
||||||
|
Loc => "čom" ;
|
||||||
|
Ins => "čím"
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- combining nouns with numerals
|
||||||
|
|
||||||
|
oper
|
||||||
|
numSizeForm : (Number => Case => Str) -> NumSize -> Case -> Str
|
||||||
|
= \cns,n,c -> case n of {
|
||||||
|
NS_1 => cns ! Sg ! c ;
|
||||||
|
NS_2_4 => cns ! Pl ! c ;
|
||||||
|
_ => case c of {
|
||||||
|
Nom | Acc => cns ! Pl ! Gen ;
|
||||||
|
_ => cns ! Pl ! c
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
numSizeAgr : Gender -> NumSize -> Person -> Agr
|
||||||
|
= \g,ns,p -> case ns of {
|
||||||
|
NS_1 => Ag g Sg p ;
|
||||||
|
NS_2_4 => Ag g Pl p ;
|
||||||
|
_ => Ag Neutr Sg p ---- TODO verify
|
||||||
|
} ;
|
||||||
|
|
||||||
|
numSizeNumber : NumSize -> Number = \ns -> case ns of {
|
||||||
|
NS_1 => Sg ;
|
||||||
|
_ => Pl ---- TO CHECK
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
21
src/croatian/TenseHrv.gf
Normal file
21
src/croatian/TenseHrv.gf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
concrete TenseHrv of Tense =
|
||||||
|
CatHrv **
|
||||||
|
open
|
||||||
|
ResHrv,
|
||||||
|
Prelude
|
||||||
|
in {
|
||||||
|
lin
|
||||||
|
PNeg = {
|
||||||
|
s = "ne" ++ Predef.BIND ;
|
||||||
|
p = False
|
||||||
|
} ;
|
||||||
|
PPos = {
|
||||||
|
s = [] ;
|
||||||
|
p = True
|
||||||
|
} ;
|
||||||
|
ASimul = {s = [] ; t = CTPres} ;
|
||||||
|
TPres = {s = [] ; t = CTPres} ;
|
||||||
|
TPast = {s = [] ; t = CTPast} ;
|
||||||
|
TTAnt t a = {s = t.s ++ a.s ; t = t.t} ; ----
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user