mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-10 23:56:32 -06:00
Compare commits
846 Commits
RELEASE-3.
...
GF-3.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d63311c65c | ||
|
|
ddafbb6316 | ||
|
|
fab03c7675 | ||
|
|
0475955567 | ||
|
|
fc0c504107 | ||
|
|
cb90184a95 | ||
|
|
51f6d6247c | ||
|
|
73771e317b | ||
|
|
f7e26bb199 | ||
|
|
ccfa60cbba | ||
|
|
f71e504f9c | ||
|
|
93cf7c9c08 | ||
|
|
31e5411f20 | ||
|
|
f52f7966ea | ||
|
|
dfee47ca81 | ||
|
|
b240cc541f | ||
|
|
25ecbcb079 | ||
|
|
f44210bcb8 | ||
|
|
2ace715d09 | ||
|
|
294fe21d6c | ||
|
|
0b9974e8f9 | ||
|
|
342ddf6f4b | ||
|
|
726d5972d6 | ||
|
|
f18f5e3c3f | ||
|
|
325ffb79a9 | ||
|
|
0d0462e5a7 | ||
|
|
a9c2872059 | ||
|
|
a7c471214b | ||
|
|
23f3fd244a | ||
|
|
fc37e26bca | ||
|
|
fe483f3639 | ||
|
|
01c83a8437 | ||
|
|
19129aa420 | ||
|
|
f2e9993425 | ||
|
|
29b5ac47fb | ||
|
|
576e730897 | ||
|
|
cea3e2e4c8 | ||
|
|
a29a4132cf | ||
|
|
9da4ea3f5c | ||
|
|
92f7dbc80e | ||
|
|
4a85289597 | ||
|
|
b2a0f252b0 | ||
|
|
28bc19f09c | ||
|
|
ea56a524a1 | ||
|
|
03380c79fb | ||
|
|
c8e2201964 | ||
|
|
44f10e9daa | ||
|
|
570d347efe | ||
|
|
193e3af83b | ||
|
|
6b91d8409a | ||
|
|
e911ad7cb3 | ||
|
|
473f6ae05b | ||
|
|
45df74b36b | ||
|
|
6b84b55db0 | ||
|
|
d6310e2a8b | ||
|
|
b63da6573e | ||
|
|
b174bba3a9 | ||
|
|
47bcbe73f6 | ||
|
|
00f9a1be49 | ||
|
|
c3775fa360 | ||
|
|
c12afea3d4 | ||
|
|
97c9152acb | ||
|
|
a4c1389966 | ||
|
|
9e5cbb35fd | ||
|
|
f1a88574b8 | ||
|
|
7b520280d7 | ||
|
|
fe4bec4e58 | ||
|
|
0514fc1e18 | ||
|
|
3f2b5ac034 | ||
|
|
7b51bb6638 | ||
|
|
7a4f43aea2 | ||
|
|
efebc082fa | ||
|
|
75ab225161 | ||
|
|
5a6fe1e336 | ||
|
|
c4f207a541 | ||
|
|
a2907a91a5 | ||
|
|
9d59e59387 | ||
|
|
9171a1b612 | ||
|
|
046735c02a | ||
|
|
b69608bd21 | ||
|
|
be42e20158 | ||
|
|
bb0c93968b | ||
|
|
51e1c771c1 | ||
|
|
06efa09f93 | ||
|
|
2b16118063 | ||
|
|
6c71da78f7 | ||
|
|
ba3a8355aa | ||
|
|
b89aa34bfd | ||
|
|
942dd3ace8 | ||
|
|
f665c697bd | ||
|
|
eae5f7b723 | ||
|
|
7abc12bbd5 | ||
|
|
f0065986a6 | ||
|
|
cd4b482f0f | ||
|
|
67cb6bae12 | ||
|
|
c10de77e9b | ||
|
|
6e52b85b92 | ||
|
|
7acbd54f2d | ||
|
|
08c5914466 | ||
|
|
0373d2cd18 | ||
|
|
c14e879224 | ||
|
|
eb43758d37 | ||
|
|
c19c727f40 | ||
|
|
faf6c83b74 | ||
|
|
fdeaa9ea70 | ||
|
|
50188b6827 | ||
|
|
20efc48e21 | ||
|
|
b2545333ba | ||
|
|
3508f42520 | ||
|
|
de33c46b45 | ||
|
|
4d35a0206c | ||
|
|
2875730224 | ||
|
|
87613d464c | ||
|
|
2159d4b0be | ||
|
|
74384044c9 | ||
|
|
3ac2bcc8af | ||
|
|
64b07cd352 | ||
|
|
df65c52cde | ||
|
|
ec9753e7b5 | ||
|
|
f70234b1da | ||
|
|
7713518ad5 | ||
|
|
e6d57f3b03 | ||
|
|
ec0d36bd1d | ||
|
|
520d1a44a2 | ||
|
|
5118b8d4eb | ||
|
|
38982d73fe | ||
|
|
f4cec11f72 | ||
|
|
bf28bf1e56 | ||
|
|
36b827bcc2 | ||
|
|
5c5cd125c9 | ||
|
|
2888073c44 | ||
|
|
5214543d3f | ||
|
|
41ec90c3fe | ||
|
|
6e8f92a9c5 | ||
|
|
ec9f74d56e | ||
|
|
ff9a164884 | ||
|
|
ef2c348d3a | ||
|
|
17bc505382 | ||
|
|
6cf7059ddb | ||
|
|
68c5cd74dd | ||
|
|
916548a361 | ||
|
|
e3f2469abe | ||
|
|
2d112e3a55 | ||
|
|
a170539991 | ||
|
|
4b4a7ba9a4 | ||
|
|
a74460a0e1 | ||
|
|
04a07177da | ||
|
|
da129e40ef | ||
|
|
13fa01dd06 | ||
|
|
204d26a919 | ||
|
|
6e6d783bd5 | ||
|
|
b717c1e91d | ||
|
|
8ce728f393 | ||
|
|
592a93005a | ||
|
|
4e8b5d6c6f | ||
|
|
5172586aa8 | ||
|
|
62ea7c82a9 | ||
|
|
e30fa8933f | ||
|
|
1427b1bbb8 | ||
|
|
3581176f6c | ||
|
|
ebe411c654 | ||
|
|
7aa2837dd7 | ||
|
|
fa34877ea3 | ||
|
|
999cdb8e36 | ||
|
|
4ee5914c1c | ||
|
|
7e60a931c8 | ||
|
|
75e1c10250 | ||
|
|
8b64ad4a9e | ||
|
|
d446af8479 | ||
|
|
894c09d1b9 | ||
|
|
1862cb0559 | ||
|
|
425f3c71e9 | ||
|
|
55528604b7 | ||
|
|
2fb4e8b8d5 | ||
|
|
77a7b7e51c | ||
|
|
f55cc00457 | ||
|
|
95bc1637af | ||
|
|
4e646d5c7b | ||
|
|
369d457096 | ||
|
|
702b513453 | ||
|
|
c28539e201 | ||
|
|
881753ce3e | ||
|
|
05cd9c53ce | ||
|
|
d951fec14d | ||
|
|
aa4257efef | ||
|
|
e4d34bff32 | ||
|
|
f5304afa56 | ||
|
|
6b0094b22a | ||
|
|
eb074e6bcd | ||
|
|
8990ee80a8 | ||
|
|
52b9a98db6 | ||
|
|
2d5655aa50 | ||
|
|
83a22ab31b | ||
|
|
0315a3e52e | ||
|
|
4b2c706bcd | ||
|
|
85e4a8061f | ||
|
|
a48227b8c5 | ||
|
|
08ff8ee3e5 | ||
|
|
2142146577 | ||
|
|
98a29421a8 | ||
|
|
6cd6ddd020 | ||
|
|
e051829637 | ||
|
|
069a02c441 | ||
|
|
5489e1cd51 | ||
|
|
096beae214 | ||
|
|
0b901669fd | ||
|
|
c8b4270983 | ||
|
|
f5525dfbf0 | ||
|
|
5f39c41988 | ||
|
|
b33d260377 | ||
|
|
3acaaed474 | ||
|
|
82aa6549cc | ||
|
|
7b13eb0ade | ||
|
|
8db210fd97 | ||
|
|
eadaa3335f | ||
|
|
145fc773cb | ||
|
|
0bce38800c | ||
|
|
8d9a0fe998 | ||
|
|
a36c3278a5 | ||
|
|
43227578c5 | ||
|
|
664d2e0b70 | ||
|
|
56fd159e34 | ||
|
|
05ed75c131 | ||
|
|
0fa4dd7ab0 | ||
|
|
0cf74c04df | ||
|
|
ab88fd8018 | ||
|
|
8334a3fab3 | ||
|
|
1b0359f217 | ||
|
|
5223a3d9c9 | ||
|
|
583f77e450 | ||
|
|
bd6d88c784 | ||
|
|
0441cf1586 | ||
|
|
5a18c857b8 | ||
|
|
b7d2ff99c0 | ||
|
|
9aa31fdcdd | ||
|
|
d4f2df8aa4 | ||
|
|
63587ac745 | ||
|
|
dbf232b73e | ||
|
|
d13c34e641 | ||
|
|
84f53ba086 | ||
|
|
c52f16e534 | ||
|
|
c0ce537104 | ||
|
|
479a44b6a0 | ||
|
|
bd556c7789 | ||
|
|
c410abfa6b | ||
|
|
4859ff2be8 | ||
|
|
3c76051d8b | ||
|
|
b1b8f90f4e | ||
|
|
c82b09df1a | ||
|
|
e2365f60d7 | ||
|
|
ecda59d188 | ||
|
|
0e6f0d8520 | ||
|
|
9624952703 | ||
|
|
a324377661 | ||
|
|
fb9ebf782f | ||
|
|
fcf13dc89f | ||
|
|
3edc34ed56 | ||
|
|
cf93875bfa | ||
|
|
de279ac576 | ||
|
|
a2431ccfbd | ||
|
|
9c1102adcb | ||
|
|
78ea838725 | ||
|
|
3a429730bc | ||
|
|
9831512d34 | ||
|
|
1889f4ce0f | ||
|
|
f486149267 | ||
|
|
942ef0b0ff | ||
|
|
6e433fdb48 | ||
|
|
8174fd55a8 | ||
|
|
dc9b27e74c | ||
|
|
b945128a5b | ||
|
|
83793edc30 | ||
|
|
31b8ef9c3f | ||
|
|
431b53048f | ||
|
|
53fde8d963 | ||
|
|
a2551f783b | ||
|
|
3fa7509412 | ||
|
|
1d159f155c | ||
|
|
e6107dcbfb | ||
|
|
fbf8ff0044 | ||
|
|
0fa80d0f85 | ||
|
|
381cf35cde | ||
|
|
a895f63644 | ||
|
|
e281cb6f5c | ||
|
|
c837f1cdf7 | ||
|
|
eb7e4335b5 | ||
|
|
341b96da9c | ||
|
|
d53a8720fe | ||
|
|
9f0858fccf | ||
|
|
13ccd9d621 | ||
|
|
f5f3587697 | ||
|
|
18f66b3e23 | ||
|
|
6502f0df4f | ||
|
|
d4deb3561e | ||
|
|
77bda93032 | ||
|
|
283620f15b | ||
|
|
933174e911 | ||
|
|
47081bb637 | ||
|
|
7159daf38f | ||
|
|
0ca66a2e4d | ||
|
|
8596fd277f | ||
|
|
981a6eed2e | ||
|
|
79878469e3 | ||
|
|
1fda8277dd | ||
|
|
50e9e594e6 | ||
|
|
78e7c47604 | ||
|
|
db0bbfd1fb | ||
|
|
278cc8aed3 | ||
|
|
c660dd6aa5 | ||
|
|
5e5840722d | ||
|
|
625bf5485f | ||
|
|
6fc46c2176 | ||
|
|
98c41fabc8 | ||
|
|
c417d255d5 | ||
|
|
37169098ef | ||
|
|
37d4d3672c | ||
|
|
285bca2ef5 | ||
|
|
790d4bc04a | ||
|
|
5465f85834 | ||
|
|
15f99fb258 | ||
|
|
26afd1c267 | ||
|
|
cbbf530b71 | ||
|
|
e4386a1aeb | ||
|
|
bdef0d0f12 | ||
|
|
a317429a79 | ||
|
|
1e3e42e308 | ||
|
|
07b99f455f | ||
|
|
e124f69170 | ||
|
|
e2fbf96815 | ||
|
|
84fff1e096 | ||
|
|
7c6690a431 | ||
|
|
ff515b3508 | ||
|
|
47f57afa17 | ||
|
|
191fab7472 | ||
|
|
966716cc7d | ||
|
|
42c5a3fa55 | ||
|
|
776c5d8a06 | ||
|
|
0d75c394b5 | ||
|
|
61699e847f | ||
|
|
15940bd4fe | ||
|
|
b32f7aa148 | ||
|
|
ac51b0b042 | ||
|
|
d7642250ea | ||
|
|
702760c911 | ||
|
|
6d49437e2a | ||
|
|
989c6f5893 | ||
|
|
fe10e94c6c | ||
|
|
0fe46a6d17 | ||
|
|
9d581b1d5e | ||
|
|
c4f4df256b | ||
|
|
e76e22f35c | ||
|
|
5ce0ad5639 | ||
|
|
f0566a48dd | ||
|
|
73948e54a6 | ||
|
|
60f19691eb | ||
|
|
e73d42379c | ||
|
|
5dff7e914a | ||
|
|
d377a0045b | ||
|
|
2c13810b84 | ||
|
|
869721d0a5 | ||
|
|
39c51ac777 | ||
|
|
750ab83d12 | ||
|
|
fb4f992d98 | ||
|
|
5bb454454a | ||
|
|
e6f924d597 | ||
|
|
c41015523f | ||
|
|
faf66b4a88 | ||
|
|
0130a0012d | ||
|
|
32647437ad | ||
|
|
b76d8512e4 | ||
|
|
1208cdf9bc | ||
|
|
d994208499 | ||
|
|
cfb6bf0301 | ||
|
|
bad78999dc | ||
|
|
bd636d805a | ||
|
|
557ae6da44 | ||
|
|
70297f6ac2 | ||
|
|
e44ab11609 | ||
|
|
59672ef8ac | ||
|
|
8600112264 | ||
|
|
7f5fae2031 | ||
|
|
cc8bb02489 | ||
|
|
1496a05060 | ||
|
|
0df5b29602 | ||
|
|
19020167f7 | ||
|
|
56f530abab | ||
|
|
4ca4fb1d6d | ||
|
|
475231449a | ||
|
|
be66369ccf | ||
|
|
1b4762c436 | ||
|
|
e7b1c47300 | ||
|
|
e56ba66232 | ||
|
|
0d7df4d576 | ||
|
|
7bf3409b05 | ||
|
|
411da9cbd8 | ||
|
|
ade493515a | ||
|
|
5d058bcfc0 | ||
|
|
e94f94fcf1 | ||
|
|
0e126a24e0 | ||
|
|
ed60efd385 | ||
|
|
19e8bab1a4 | ||
|
|
4c203cfd81 | ||
|
|
dd9e9cb51b | ||
|
|
43950360a6 | ||
|
|
5d734f9a6c | ||
|
|
5fbb56d4f8 | ||
|
|
8c2a6f6118 | ||
|
|
e5c523e480 | ||
|
|
112aea1efc | ||
|
|
685d044d48 | ||
|
|
326d9edb22 | ||
|
|
41c9cc80a6 | ||
|
|
dcd0490180 | ||
|
|
c456ea3b11 | ||
|
|
fa966ab212 | ||
|
|
237a68f05e | ||
|
|
21961e39ba | ||
|
|
d094cafa07 | ||
|
|
aff3db9238 | ||
|
|
6fe595104c | ||
|
|
7d01f6720f | ||
|
|
052740f3e5 | ||
|
|
19741440a0 | ||
|
|
730fd6501c | ||
|
|
6eaee8e4c1 | ||
|
|
d7f9d9e828 | ||
|
|
c47776854f | ||
|
|
c89540b919 | ||
|
|
1435277693 | ||
|
|
ebbd512ee1 | ||
|
|
07697dd8d1 | ||
|
|
2c0caaf687 | ||
|
|
ddffa1928f | ||
|
|
b7ccdb5ad7 | ||
|
|
eca816c8fa | ||
|
|
29c044a315 | ||
|
|
1ae489741e | ||
|
|
0df8c34e1d | ||
|
|
2252a44bb9 | ||
|
|
a730a3194b | ||
|
|
39bca7b395 | ||
|
|
393f228127 | ||
|
|
cdc2f36bdf | ||
|
|
a2ba6a7d64 | ||
|
|
423d2148c3 | ||
|
|
5f2d520e30 | ||
|
|
8cfc229164 | ||
|
|
66f1ff9b05 | ||
|
|
e90aa08934 | ||
|
|
87ed89878e | ||
|
|
49a405cdb2 | ||
|
|
4e25a9c2c9 | ||
|
|
a3ad324dc2 | ||
|
|
77d8ff1ba8 | ||
|
|
16fd4116fc | ||
|
|
8ff47abd59 | ||
|
|
3156959205 | ||
|
|
b206e5f88b | ||
|
|
58b7492a70 | ||
|
|
867bee126d | ||
|
|
8ebf00005f | ||
|
|
58eda09255 | ||
|
|
41253228e7 | ||
|
|
7dd9e62de5 | ||
|
|
6c3125c3e2 | ||
|
|
c4ada6112f | ||
|
|
b993704225 | ||
|
|
cb53630c60 | ||
|
|
27ca98ddad | ||
|
|
350adb704a | ||
|
|
6c70ccf0a1 | ||
|
|
75d2f66b59 | ||
|
|
f1889644d4 | ||
|
|
d24c9986b9 | ||
|
|
1e9876c5b4 | ||
|
|
4f80ae9ee8 | ||
|
|
317fdfbeaa | ||
|
|
561bf721d1 | ||
|
|
aa6ac1f8d3 | ||
|
|
1d06f09813 | ||
|
|
97af158927 | ||
|
|
a598eae98b | ||
|
|
f98385f226 | ||
|
|
2bc8b35e57 | ||
|
|
546af233fc | ||
|
|
2869eaf6e9 | ||
|
|
fe72ccdec1 | ||
|
|
bf37eb06a9 | ||
|
|
4cb024fdb8 | ||
|
|
ca6fbbbfca | ||
|
|
6408484fd0 | ||
|
|
acd218d39b | ||
|
|
3949424a78 | ||
|
|
5e4d2e654d | ||
|
|
0eea611a8b | ||
|
|
b9c81ed83f | ||
|
|
fad7cf0c6f | ||
|
|
67b526b4e7 | ||
|
|
870479051d | ||
|
|
cd74a0bc34 | ||
|
|
ed08ae83d0 | ||
|
|
9cbdaeeb4b | ||
|
|
92f5374003 | ||
|
|
d1b34946aa | ||
|
|
1a00c54dcd | ||
|
|
dc98730e46 | ||
|
|
a9e2e33270 | ||
|
|
2668e58ab6 | ||
|
|
9558094911 | ||
|
|
3946144833 | ||
|
|
8ad7c58989 | ||
|
|
2a8cbbde74 | ||
|
|
cac0ffb19b | ||
|
|
4bf1c6832e | ||
|
|
3815e753ae | ||
|
|
36f0220db3 | ||
|
|
ae3c627198 | ||
|
|
c75b8c1cdf | ||
|
|
bce753db8b | ||
|
|
d7793ad7b7 | ||
|
|
b78bcd16ed | ||
|
|
b3eeee54ce | ||
|
|
8ae61cc1a8 | ||
|
|
9bd63b9d8d | ||
|
|
a29c622695 | ||
|
|
41eb197da4 | ||
|
|
9e78c26433 | ||
|
|
90ccd0e828 | ||
|
|
fe0b7c13fe | ||
|
|
71220ebaf4 | ||
|
|
23c5ce2381 | ||
|
|
3a97392fbd | ||
|
|
cf36ef0449 | ||
|
|
c49048203d | ||
|
|
8ba3bbe82f | ||
|
|
d0410a1b0f | ||
|
|
cbc2fc8758 | ||
|
|
e926d54523 | ||
|
|
528b15f41a | ||
|
|
c50360078f | ||
|
|
dc9aa488a3 | ||
|
|
7c33881e98 | ||
|
|
9544bd8e6b | ||
|
|
210e27e509 | ||
|
|
38852ee672 | ||
|
|
2299c0b50f | ||
|
|
66b69cd093 | ||
|
|
b44995f660 | ||
|
|
fa10c19c05 | ||
|
|
8aabe95516 | ||
|
|
5bf1e1d10a | ||
|
|
ba094d3af1 | ||
|
|
0fcf1d1f66 | ||
|
|
7639654883 | ||
|
|
34c87d0de0 | ||
|
|
d5ba0733ec | ||
|
|
1a338ea034 | ||
|
|
b8b67e8585 | ||
|
|
6a49144f00 | ||
|
|
012a6f8818 | ||
|
|
f480563721 | ||
|
|
cc5c1a9590 | ||
|
|
d7d1e37045 | ||
|
|
3c31102873 | ||
|
|
3089155590 | ||
|
|
76885d3185 | ||
|
|
0a1460ee85 | ||
|
|
db1ecda1f6 | ||
|
|
2de326e8a3 | ||
|
|
9e95b1df99 | ||
|
|
6ca9fbe55b | ||
|
|
c8c6077cf7 | ||
|
|
6a9145cc93 | ||
|
|
6e9f81a4a3 | ||
|
|
34d27a6876 | ||
|
|
b5ca8710cf | ||
|
|
de5ce221b6 | ||
|
|
f2a02c438d | ||
|
|
100bb34dcd | ||
|
|
d2ecf37427 | ||
|
|
4e3867b3ad | ||
|
|
afd2976439 | ||
|
|
7e03f0f5a2 | ||
|
|
714429e95f | ||
|
|
b17fa27414 | ||
|
|
61e0a12b76 | ||
|
|
2106566e85 | ||
|
|
97b1c50ae0 | ||
|
|
4671346529 | ||
|
|
8f658948a3 | ||
|
|
a36a820462 | ||
|
|
5185034a69 | ||
|
|
51a4cca65f | ||
|
|
30dd37e135 | ||
|
|
cc12f0da4a | ||
|
|
22a7a183c3 | ||
|
|
ccefcc7f16 | ||
|
|
03ae67d84c | ||
|
|
2939809f45 | ||
|
|
2aaa698f69 | ||
|
|
cf4156f29b | ||
|
|
8c09103819 | ||
|
|
07f538cd4e | ||
|
|
fb6e994dc7 | ||
|
|
e78e1deef0 | ||
|
|
22187afd1f | ||
|
|
23f27a9dab | ||
|
|
0b5b14d053 | ||
|
|
4a17d46d8b | ||
|
|
ba62b9c82a | ||
|
|
6fa7524c32 | ||
|
|
454210858f | ||
|
|
38dac3de60 | ||
|
|
c86a273be9 | ||
|
|
346f089946 | ||
|
|
1b59757a89 | ||
|
|
fac435afc3 | ||
|
|
3bda85cae1 | ||
|
|
632ec84356 | ||
|
|
7e1d71d4ee | ||
|
|
a87a16b19f | ||
|
|
54d60b60da | ||
|
|
944566b3f4 | ||
|
|
9de70d7f4d | ||
|
|
b9d7335125 | ||
|
|
8848725fa9 | ||
|
|
4d042b4fae | ||
|
|
ce0dc26ff3 | ||
|
|
ff2b388001 | ||
|
|
2f75ef042c | ||
|
|
d2c145a7d8 | ||
|
|
e36abfeba1 | ||
|
|
2326225974 | ||
|
|
41dd3cead2 | ||
|
|
bb2e740872 | ||
|
|
9744939e45 | ||
|
|
6fa7fd6706 | ||
|
|
95ca88bf02 | ||
|
|
5d9393b5ce | ||
|
|
3fc418c0e9 | ||
|
|
84f2c2d7e1 | ||
|
|
221ffa3790 | ||
|
|
b2d55c064e | ||
|
|
a5652e7f1e | ||
|
|
e5754cc2e2 | ||
|
|
80c9f1f7ea | ||
|
|
3703b76856 | ||
|
|
1d29569008 | ||
|
|
793a31805b | ||
|
|
8c8adb014a | ||
|
|
0bce34d243 | ||
|
|
4907a74b44 | ||
|
|
6744320ae5 | ||
|
|
233f7feb78 | ||
|
|
4ac49cf207 | ||
|
|
20c5bcfc33 | ||
|
|
0729499323 | ||
|
|
43a28f6237 | ||
|
|
fb7e7050b9 | ||
|
|
b7ee620c8a | ||
|
|
6831710c31 | ||
|
|
4c7d04444a | ||
|
|
9cdc92c552 | ||
|
|
d534f3e13b | ||
|
|
b8714eada0 | ||
|
|
0e2cf3e9a3 | ||
|
|
3338c891bc | ||
|
|
485b095462 | ||
|
|
d981fefad4 | ||
|
|
f59d6d42f7 | ||
|
|
d0a65b19fd | ||
|
|
ced4be3a07 | ||
|
|
f0fbd41c91 | ||
|
|
13330bd983 | ||
|
|
2aaecd8927 | ||
|
|
fae112f5f5 | ||
|
|
980a4c9246 | ||
|
|
9c762efcb4 | ||
|
|
72b257b9b7 | ||
|
|
161e981a29 | ||
|
|
4a016f9bed | ||
|
|
0e39e31ffd | ||
|
|
9e7bdb6703 | ||
|
|
a3b2362b53 | ||
|
|
25433a6751 | ||
|
|
63ea92ad04 | ||
|
|
4da5677697 | ||
|
|
9ec92096c6 | ||
|
|
e913404f3a | ||
|
|
9597118c85 | ||
|
|
c718d66b18 | ||
|
|
e5afae33e0 | ||
|
|
47bab9e77f | ||
|
|
a6966175b0 | ||
|
|
ff80b21618 | ||
|
|
69226d4dfd | ||
|
|
77ecb64756 | ||
|
|
2d1c2d719c | ||
|
|
aece969d33 | ||
|
|
a4fce19eb7 | ||
|
|
e056836472 | ||
|
|
4bc0270ec4 | ||
|
|
24c576f036 | ||
|
|
ea57e1ac6a | ||
|
|
81bc4c1b6b | ||
|
|
57b81f5a7c | ||
|
|
103669d667 | ||
|
|
b46fcb757c | ||
|
|
83dd57bd63 | ||
|
|
9a3115815d | ||
|
|
1426c07f97 | ||
|
|
1c9e90f74d | ||
|
|
4cdbb0ec89 | ||
|
|
5b91023e0e | ||
|
|
9c77f9d990 | ||
|
|
76d6749797 | ||
|
|
432a6295cc | ||
|
|
1569344857 | ||
|
|
ca83d4be7d | ||
|
|
29380f0df0 | ||
|
|
9c8cb395f5 | ||
|
|
21bf7aa5a9 | ||
|
|
c2ed0cee49 | ||
|
|
67e57115ac | ||
|
|
c2afe95878 | ||
|
|
5644350c0f | ||
|
|
6d9c1c6c90 | ||
|
|
653b8b08d6 | ||
|
|
945732f695 | ||
|
|
336cbf90ab | ||
|
|
e7a2920508 | ||
|
|
8342634d75 | ||
|
|
c0f3f43350 | ||
|
|
919d8c74cf | ||
|
|
c11ff12602 | ||
|
|
a813403c48 | ||
|
|
0004a3ff3c | ||
|
|
b01f2ebd90 | ||
|
|
1d2bd65019 | ||
|
|
0d07bd9289 | ||
|
|
2d8af8a11b | ||
|
|
94235f96fa | ||
|
|
8524facfd2 | ||
|
|
8ffd8cd979 | ||
|
|
6ae3c0fb08 | ||
|
|
792b58abe3 | ||
|
|
2313f6ee40 | ||
|
|
ec432a4655 | ||
|
|
6c6141befd | ||
|
|
972dd47a8e | ||
|
|
293c9ae76a | ||
|
|
99cdc28faf | ||
|
|
2dabed6583 | ||
|
|
e621fbbdcd | ||
|
|
7bb404638a | ||
|
|
be6a44e573 | ||
|
|
b2a155b309 | ||
|
|
08c089c5a4 | ||
|
|
80ad54000c | ||
|
|
9d4a8009c8 | ||
|
|
0d836f7152 | ||
|
|
c2b97c9098 | ||
|
|
458b894596 | ||
|
|
0a2f8fc184 | ||
|
|
ce2c441352 | ||
|
|
f004826f0a | ||
|
|
f0519551c4 | ||
|
|
cc50be36b0 | ||
|
|
9aeefb540e | ||
|
|
46c5af65d0 | ||
|
|
359be0d077 | ||
|
|
d4a345e830 | ||
|
|
45c2394353 | ||
|
|
4d8a5e9a05 | ||
|
|
9b255d39aa | ||
|
|
d06a76bab9 | ||
|
|
4b0e198742 | ||
|
|
5734469aa2 | ||
|
|
b2681a8f0c | ||
|
|
baaa8ca2e5 | ||
|
|
98e6a250b4 | ||
|
|
c53dd7e2ea | ||
|
|
2c32566d3a | ||
|
|
a73a067d7a | ||
|
|
3cb82fb035 | ||
|
|
d24bf91330 | ||
|
|
c982c1fc83 | ||
|
|
a9a3d48c7f | ||
|
|
55f914f444 | ||
|
|
7f98c3198e | ||
|
|
7bc30b77f4 | ||
|
|
90032d0438 | ||
|
|
af62b770b0 | ||
|
|
27da43c37d | ||
|
|
27357ad684 | ||
|
|
3bcbf6d25d | ||
|
|
a112b13d9f | ||
|
|
6e9d4ac20e | ||
|
|
caad211a9f | ||
|
|
f4b092fb47 | ||
|
|
e649df1012 | ||
|
|
2665910dc2 | ||
|
|
db4c7a4d9f | ||
|
|
808e85ef05 | ||
|
|
45a117a66c | ||
|
|
7a3ebdc5ea | ||
|
|
41ab809c88 | ||
|
|
1362bbdd03 | ||
|
|
d8e24c19da | ||
|
|
99c70256ca | ||
|
|
f19459929c | ||
|
|
5f9c97528b | ||
|
|
62225a2fd8 | ||
|
|
97bc980f79 | ||
|
|
72a69c587c | ||
|
|
3b6663bb6d | ||
|
|
639f544fa4 | ||
|
|
15cbf9970c | ||
|
|
73a056a061 | ||
|
|
098e5da1cc | ||
|
|
619d1a2529 | ||
|
|
efdd763493 | ||
|
|
7ef39967c1 | ||
|
|
80ea046102 | ||
|
|
6e1e5ba945 | ||
|
|
9f7ae28879 | ||
|
|
f671b709a9 | ||
|
|
9ffce1f505 | ||
|
|
cf99782b5a | ||
|
|
57242a05ba | ||
|
|
ac4797f854 | ||
|
|
9470699b9a | ||
|
|
d365aedb35 | ||
|
|
57591c01ec | ||
|
|
364e0af345 | ||
|
|
c14b35d714 | ||
|
|
6241d48b03 | ||
|
|
6afcf80c04 | ||
|
|
24cb6acd53 | ||
|
|
3bf18eb2b9 | ||
|
|
ae8e7d798a | ||
|
|
d0c7531dfa | ||
|
|
128cae61d5 | ||
|
|
a90662218f | ||
|
|
3201407474 | ||
|
|
ca9bc14d02 |
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
dist/
|
||||
*.gfo
|
||||
*.hi
|
||||
*.o
|
||||
*.pgf
|
||||
*.tmp
|
||||
27
.travis.yml
Normal file
27
.travis.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
sudo: required
|
||||
language: c
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- ghc
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ghc@8.2 && export PATH="/usr/local/opt/ghc@8.2/bin:$PATH" ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl http://www.grammaticalframework.org/download/gf-3.9-bin-intel-mac.tar.gz > gf.tar.gz && sudo tar --no-same-owner --no-same-permissions -C /usr/local -zxf gf.tar.gz && rm gf.tar.gz; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl http://www.grammaticalframework.org/download/gf_3.9.1-1_amd64-trusty.deb > gf.deb && sudo dpkg -i gf.deb && rm gf.deb ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install ghc --version=8.4.4 && export PATH="/c/ProgramData/chocolatey/lib/ghc/tools/ghc-8.4.4/bin:$PATH"; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then curl http://www.grammaticalframework.org/download/gf-3.9-bin-windows.zip > gf.zip && unzip gf.zip && rm gf.zip && export PATH="$TRAVIS_BUILD_DIR/gf-3.9/bin:$PATH"; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then alias gf='gf.exe' && alias runghc='runghc.exe' ; fi
|
||||
|
||||
script:
|
||||
- runghc Setup.hs build prelude all --verbose
|
||||
- rm -rf dist
|
||||
- mkdir dist-bash ; bash Setup.sh --dest=dist-bash --verbose
|
||||
- rm -rf dist ; mkdir dist-bat
|
||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cmd //c Setup.bat --dest=dist-bat --verbose ; fi
|
||||
70
Config.hs
Normal file
70
Config.hs
Normal file
@@ -0,0 +1,70 @@
|
||||
-- | Reading language config file
|
||||
module Config (
|
||||
LangInfo (..),
|
||||
loadLangs, loadLangsFrom, configFile
|
||||
) where
|
||||
|
||||
import Data.List (unfoldr)
|
||||
import System.IO (hPutStrLn,stderr)
|
||||
import System.Exit (exitFailure)
|
||||
|
||||
-- | Path to language config file
|
||||
configFile :: FilePath
|
||||
configFile = "languages.csv"
|
||||
|
||||
-- | Information about a language
|
||||
data LangInfo = LangInfo
|
||||
{ langCode :: String -- ^ 3-letter ISO 639-2/B code
|
||||
, langName :: String -- ^ language name
|
||||
, langDir :: String -- ^ directory name
|
||||
, langFunctor :: Maybe String -- ^ functor (not used)
|
||||
, langUnlexer :: Maybe String -- ^ decoding for postprocessing linearizations
|
||||
, langPresent :: Bool
|
||||
, langAll :: Bool
|
||||
, langTry :: Bool
|
||||
, langSymbolic :: Bool
|
||||
, langCompatibility :: Bool
|
||||
, langSynopsis :: Bool -- ^ include in RGL synopsis
|
||||
} deriving (Show,Eq)
|
||||
|
||||
-- | Load language information from default config file
|
||||
loadLangs :: IO [LangInfo]
|
||||
loadLangs = loadLangsFrom configFile
|
||||
|
||||
-- | Load language information from specified config file
|
||||
loadLangsFrom:: FilePath -> IO [LangInfo]
|
||||
loadLangsFrom configFile = do
|
||||
lns <- readFile configFile >>= return . lines
|
||||
mapM mkLangInfo (tail lns)
|
||||
where
|
||||
maybeBit bits n = if length bits >= (n+1) && length (bits !! n) > 0 then Just (bits !! n) else Nothing
|
||||
boolBit bits n def = if length bits >= (n+1) && length (bits !! n) > 0 then (if def then bits !! n /= "n" else bits !! n == "y") else def
|
||||
mkLangInfo s =
|
||||
let bits = separateBy ',' s in
|
||||
if length bits < 2
|
||||
then die $ "Invalid entry in " ++ configFile ++ ": " ++ s
|
||||
else return $ LangInfo
|
||||
{ langCode = bits !! 0
|
||||
, langName = bits !! 1
|
||||
, langDir = bits !! 2
|
||||
, langFunctor = maybeBit bits 3
|
||||
, langUnlexer = maybeBit bits 4
|
||||
, langPresent = boolBit bits 5 False
|
||||
, langAll = boolBit bits 6 True
|
||||
, langTry = boolBit bits 7 True
|
||||
, langSymbolic = boolBit bits 8 True
|
||||
, langCompatibility = boolBit bits 9 False
|
||||
, langSynopsis = boolBit bits 10 False
|
||||
}
|
||||
|
||||
-- | Separate a string on a character
|
||||
-- Source: https://stackoverflow.com/a/4978733/98600
|
||||
separateBy :: Eq a => a -> [a] -> [[a]]
|
||||
separateBy chr = unfoldr sep where
|
||||
sep [] = Nothing
|
||||
sep l = Just . fmap (drop 1) . break (== chr) $ l
|
||||
|
||||
die :: String -> IO a
|
||||
die s = do
|
||||
hPutStrLn stderr s
|
||||
exitFailure
|
||||
206
LICENSE
Normal file
206
LICENSE
Normal file
@@ -0,0 +1,206 @@
|
||||
The GF Resource Grammar Library is under GNU LESSER GENERAL PUBLIC LICENSE and BSD.
|
||||
However the user has the right to choose any license for any application grammar derived from the resource grammar by using the grammar API.
|
||||
|
||||
The Resource Grammar Library also includes large coverage lexicons for some languages.
|
||||
Since these lexicons are derived from external sources they might be under different licenses.
|
||||
Look at the source file for every lexicon for details.
|
||||
|
||||
The rest of this document contains copies of the LGPL and BSD licenses
|
||||
which are applicable to the different components of the Resource Grammar Library as described above.
|
||||
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
|
||||
|
||||
BSD LICENSE
|
||||
|
||||
Copyright (c) 1998, Grammatical Framework
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
21
Makefile
Normal file
21
Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# A simple wrapper over the Haskell-based RGL build script
|
||||
|
||||
RUNMAKE=runghc Setup.hs
|
||||
|
||||
.PHONY: build copy install doc clean
|
||||
|
||||
default: build copy
|
||||
|
||||
build: src/*/*.gf
|
||||
$(RUNMAKE) build
|
||||
|
||||
copy:
|
||||
$(RUNMAKE) copy
|
||||
|
||||
install: build copy
|
||||
|
||||
doc: build
|
||||
make -C doc GF_LIB_PATH=../dist
|
||||
|
||||
clean:
|
||||
$(RUNMAKE) clean
|
||||
131
README.md
Normal file
131
README.md
Normal file
@@ -0,0 +1,131 @@
|
||||

|
||||
|
||||
# GF Resource Grammar Library (RGL)
|
||||
|
||||
[](https://travis-ci.org/GrammaticalFramework/gf-rgl)
|
||||
|
||||
The GF Resource Grammar Library is the standard library for Grammatical Framework. It covers the morphology and basic syntax of over 30 languages.
|
||||
|
||||
For more about the RGL, see the [synopsis page](http://www.grammaticalframework.org/lib/doc/synopsis.html).
|
||||
|
||||
## Choose your build method
|
||||
|
||||
There are 3 ways to build and install the RGL:
|
||||
|
||||
- Haskell script `Setup.hs`
|
||||
- Shell script `Setup.sh` (does not require Haskell)
|
||||
- Windows batch file `Setup.bat` (does not require Haskell)
|
||||
|
||||
## Install locations
|
||||
|
||||
The install scripts will try to determine where to copy the compiled RGL modules.
|
||||
It will look for, in this order:
|
||||
- the `--dest=` flag (see below)
|
||||
- the `GF_LIB_PATH` environment variable
|
||||
- the file `../gf-core/DATA_DIR` (relative to this directory). This only works if you have the `gf-core` and `gf-rgl` repositories in the same top-level directory **and** you have already compiled GF from source.
|
||||
(This is considered a bit hacky and will probably disappear in the future).
|
||||
|
||||
## Language config
|
||||
|
||||
A list of all languages and their properties is maintained centrally in [`languages.csv`](languages.csv).
|
||||
This file should be kept up-to-date and all build methods should read this config file.
|
||||
**If you see something wrong, please report/fix it.**
|
||||
|
||||
| # | Column | Description | Default |
|
||||
|:---|:--------------|:-----------------------------------------|:-------:|
|
||||
| 1 | Code | 3-letter language code, e.g. `Eng` | - |
|
||||
| 2 | Name | language name in English, e.g. `English` | - |
|
||||
| 3 | Directory | folder name under `src`, e.g. `english` | - |
|
||||
| 4 | Functor | functor name (not used) | - |
|
||||
| 5 | Unlexer | unlexer (not used) | - |
|
||||
| 6 | Present | language is marked with `--# notpresent` | n |
|
||||
| 7 | All | compile `All` module | y |
|
||||
| 8 | Try | compile `Try` module | y |
|
||||
| 9 | Symbolic | compile `Symbolic` module | y |
|
||||
| 10 | Compatibility | complile `Compatibility` module | n |
|
||||
| 11 | Synopsis | include language in the RGL synopsis | n |
|
||||
|
||||
If default is `y` then anything other than `n`, including the empty string, is treated as true (and vice versa when default is `n`).
|
||||
|
||||
## Haskell script: `Setup.hs`
|
||||
|
||||
This build method gives you most options.
|
||||
You will need Haskell installed on your system.
|
||||
|
||||
### Basic
|
||||
|
||||
If you have `Make` installed and don't care about advanced settings,
|
||||
you can compile the RGL and install it to the default location with:
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
This is the same as `make build` followed by `make copy`.
|
||||
There is also `make clean` available.
|
||||
|
||||
### Advanced
|
||||
|
||||
For more fine-grained control over the build process, you can run the build script directly:
|
||||
|
||||
```
|
||||
runghc Setup.hs ...
|
||||
```
|
||||
|
||||
Where `...` is one of:
|
||||
```
|
||||
build [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...] [--verbose|-v]
|
||||
copy [MODE] [--dest=...]
|
||||
install [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...] [--dest=...] [--verbose|-v]
|
||||
clean
|
||||
```
|
||||
|
||||
- `CMDS` is one or more of:
|
||||
`prelude`,
|
||||
`all`,
|
||||
`lang`,
|
||||
`api`,
|
||||
`compat`,
|
||||
or an explicit module name (e.g. `ExtraEng.gf`. You don't need to specify to language subdirectory, but there is a restriction that the module must exist in a **direct** subdirectory of `src`).
|
||||
If ommitted, the default command is `prelude all`.
|
||||
- `MODE` is one of:
|
||||
`present`,
|
||||
`alltenses`
|
||||
(default is both).
|
||||
- `LANG` is a 3-letter language code, e.g. `Eng`, `Swe` etc.
|
||||
- You can _override_ the default language list with `--langs=...`
|
||||
- ~~You can _add_ languages to the default list with `--langs=+...`~~
|
||||
- You can _remove_ languages from the default list with `langs=-...`
|
||||
- The path to GF installed on your system can be specified via the `--gf` flag (default is that the `gf` executable is in the global system path).
|
||||
- The `--dest` flag can be used to manually specify where the compiled RGL modules should be copied/installed. This is the same place as `GF_LIB_PATH`.
|
||||
|
||||
## Shell script: `Setup.sh`
|
||||
|
||||
This method is provided as an alternative for those who don't have Haskell installed.
|
||||
Simply run the script to build the entire RGL and install in the default location.
|
||||
|
||||
You can pass the following flags:
|
||||
- `--dest=...` to manually specify the install location
|
||||
- `--gf=...` to specify the path to the `gf` executable, if not available on the system path
|
||||
- `--verbose` or `-v` to show a list of files being built (errors will always be shown)
|
||||
|
||||
## Windows batch file: `Setup.bat`
|
||||
|
||||
This method is provided as an alternative for Windows users who don't have Haskell or Bash installed.
|
||||
|
||||
It is supposed to be a port of `Setup.sh` and works in largely the same way.
|
||||
In particular, it accepts the same flags (in the same format) as described above.
|
||||
|
||||
However it currently tries to build all modules for all languages and doesn't consider the details of which modules should be compiled for each language (specified in `languages.csv`)
|
||||
|
||||
## About this repository
|
||||
|
||||
On 2018-07-25, the monolithic [GF repository](https://github.com/GrammaticalFramework/GF)
|
||||
was split in two:
|
||||
|
||||
1. [gf-core](https://github.com/GrammaticalFramework/gf-core) — the GF compiler, shell and runtimes
|
||||
2. [gf-rgl](https://github.com/GrammaticalFramework/gf-rgl) — the resource grammar library
|
||||
|
||||
The former repository is now archived and no longer updated.
|
||||
The split was performed using [this script](https://github.com/GrammaticalFramework/GF/blob/30ae1b5a5f73513ac5825ca6712186ef8afe9fd4/split/run.sh)
|
||||
and the output of that script is [here](https://gist.github.com/johnjcamilleri/a6c43ff61f15a9657b457ac94ab7db61).
|
||||
126
Setup.bat
Normal file
126
Setup.bat
Normal file
@@ -0,0 +1,126 @@
|
||||
@echo off
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
REM ---
|
||||
REM Non-Haskell RGL build script for Windows machines
|
||||
REM ---
|
||||
|
||||
REM Modules to compile for each language
|
||||
REM TODO read from languages.csv
|
||||
set langs=Afr Amh Ara Eus Bul Cat Chi Dan Dut Eng Est Fin Fre Grc Gre Heb Hin Ger Ice Ina Ita Jpn Lat Lav Mlt Mon Nep Nor Nno Pes Pol Por Pnb Ron Rus Snd Spa Swe Tha Tur Urd
|
||||
set modules_langs=All Symbol Compatibility
|
||||
set modules_api=Try Symbolic
|
||||
|
||||
REM Defaults (may be overridden by options)
|
||||
set gf=gf
|
||||
set dest=
|
||||
set verbose=false
|
||||
|
||||
REM Check command line options
|
||||
:Loop
|
||||
if '%1'=='' goto Continue
|
||||
if %1==-v set verbose=true
|
||||
if %1==--verbose set verbose=true
|
||||
if %1==--gf set gf=%2
|
||||
if %1==--dest set dest=%2
|
||||
shift
|
||||
goto Loop
|
||||
:Continue
|
||||
|
||||
REM Try to determine install location
|
||||
if "%dest%"=="" (
|
||||
REM Separate paths with search path separator ; and pick first one
|
||||
for %%p in ("%GF_LIB_PATH:;=";"%") do (
|
||||
set dest=%%~p
|
||||
goto BreakLibPath
|
||||
)
|
||||
)
|
||||
:BreakLibPath
|
||||
|
||||
set DATA_DIR=..\gf-core\DATA_DIR
|
||||
if "%dest%"=="" (
|
||||
REM Look in already compiled GF folder
|
||||
if exist %DATA_DIR% (
|
||||
for /f "delims=" %%x in (%DATA_DIR%) do (
|
||||
if not "%%x"=="" (
|
||||
set dest=%%x\lib
|
||||
goto BreakDataDir
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
:BreakDataDir
|
||||
|
||||
if "%dest%"=="" (
|
||||
echo Unable to determine where to install the RGL. Please do one of the following:
|
||||
echo - Pass the --dest=... flag to this script
|
||||
echo - Set the GF_LIB_PATH environment variable
|
||||
REM echo - Compile & install GF from the gf-core repository (must be in same directory as gf-rgl)
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM A few more definitions before we get started
|
||||
set src=src
|
||||
set dist=dist
|
||||
set gfc=%gf% --batch --gf-lib-path=%src%
|
||||
|
||||
REM Add quiet flag if not verbose
|
||||
if %verbose%==false (
|
||||
set gfc=%gfc% --quiet
|
||||
)
|
||||
|
||||
REM Make directories if not present
|
||||
if not exist %dist%\prelude mkdir %dist%\prelude
|
||||
if not exist %dist%\present mkdir %dist%\present
|
||||
if not exist %dist%\alltenses mkdir %dist%\alltenses
|
||||
|
||||
REM Build: prelude
|
||||
echo Building [prelude]
|
||||
for /r %src%\prelude %%m in (*.gf) do (
|
||||
%gfc% --gfo-dir=%dist%\prelude %%m
|
||||
)
|
||||
|
||||
REM Gather all language modules for building
|
||||
set modules=
|
||||
for %%l in (%langs%) do (
|
||||
for %%m in (%modules_langs%) do (
|
||||
set patt=%%m%%l.gf
|
||||
for /r %src% %%n in (!patt!) do (
|
||||
if exist %%n set modules=!modules! %%n
|
||||
)
|
||||
)
|
||||
)
|
||||
for %%l in (%langs%) do (
|
||||
for %%m in (%modules_api%) do (
|
||||
set patt=%%m%%l.gf
|
||||
for /r %src%\api %%n in (!patt!) do (
|
||||
if exist %%n set modules=!modules! %%n
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM Build: present
|
||||
echo Building [present]
|
||||
for %%m in (%modules%) do (
|
||||
if %verbose%==true echo %%m
|
||||
%gfc% --no-pmcfg --gfo-dir=%dist%\present --preproc=mkPresent %%m
|
||||
)
|
||||
|
||||
REM Build: alltenses
|
||||
echo Building [alltenses]
|
||||
for %%m in (%modules%) do (
|
||||
if %verbose%==true echo %%m
|
||||
%gfc% --no-pmcfg --gfo-dir=%dist%\alltenses %%m
|
||||
)
|
||||
|
||||
REM Make destination directories if not present
|
||||
if not exist %dest% mkdir %dest%
|
||||
if not exist %dest%\prelude mkdir %dest%\prelude
|
||||
if not exist %dest%\present mkdir %dest%\present
|
||||
if not exist %dest%\alltenses mkdir %dest%\alltenses
|
||||
|
||||
REM Copy
|
||||
echo Copying to %dest%
|
||||
copy %dist%\prelude\*.gfo %dest%\prelude\
|
||||
copy %dist%\present\*.gfo %dest%\present\
|
||||
copy %dist%\alltenses\*.gfo %dest%\alltenses\
|
||||
409
Setup.hs
Normal file
409
Setup.hs
Normal file
@@ -0,0 +1,409 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
-- | Main build script for RGL
|
||||
|
||||
import Data.List (find,isPrefixOf,isSuffixOf,(\\))
|
||||
import Data.Maybe (catMaybes)
|
||||
import System.IO (hPutStrLn,stderr)
|
||||
import System.IO.Error (catchIOError)
|
||||
import System.Exit (ExitCode(..),exitFailure)
|
||||
import System.Environment (getArgs,lookupEnv)
|
||||
import System.Process (rawSystem)
|
||||
import System.FilePath ((</>),splitSearchPath) -- ,takeFileName,addExtension,dropExtension)
|
||||
import System.Directory (createDirectoryIfMissing,copyFile,getDirectoryContents,removeDirectoryRecursive,findFile)
|
||||
#if __GLASGOW_HASKELL__>=800
|
||||
import System.Directory (getModificationTime,setModificationTime)
|
||||
#endif
|
||||
import Control.Monad (when,unless)
|
||||
import Config
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
aargs <- getArgs
|
||||
case aargs of
|
||||
[] -> putStrLn $ "Must specify command, one of: " ++ unwords commands
|
||||
a:_ | a `notElem` commands -> putStrLn $ "Unknown command: " ++ a ++ ". Valid commands: " ++ unwords commands
|
||||
"build":args -> buildRGL args
|
||||
"copy":args -> copyRGL args
|
||||
"install":args -> buildRGL args >> copyRGL args
|
||||
"clean":_ -> clean
|
||||
where
|
||||
commands = ["build","copy","install","clean"]
|
||||
|
||||
-- | Build grammars into dist
|
||||
buildRGL :: [String] -> IO ()
|
||||
buildRGL args = do
|
||||
checkArgs args
|
||||
let cmds = getCommands args
|
||||
let modes = getOptMode args
|
||||
info <- mkInfo
|
||||
mapM_ (\cmd -> cmdAction cmd modes args info) cmds
|
||||
|
||||
-- | Copy everything from dist to install location
|
||||
copyRGL :: [String] -> IO ()
|
||||
copyRGL args = do
|
||||
let modes = getOptMode args
|
||||
info <- mkInfo
|
||||
gf_lib_dir <- maybe (die errLocation) return (infoInstallDir info)
|
||||
-- let files = getOptModules args
|
||||
-- if not (null files)
|
||||
-- then do
|
||||
-- -- Copy single files
|
||||
-- sequence_ [copyOne (flip addExtension "gfo" . dropExtension . takeFileName $ file) (getRGLBuildDir info mode) (gf_lib_dir </> getRGLBuildSubDir mode)|file<-files, mode<-modes]
|
||||
-- else do
|
||||
-- Copy everything
|
||||
copyAll "Prelude" (infoBuildDir info </> "prelude") (gf_lib_dir </> "prelude")
|
||||
sequence_ [copyAll (show mode) (getRGLBuildDir info mode) (gf_lib_dir </> getRGLBuildSubDir mode)|mode<-modes]
|
||||
|
||||
-- | Error message when install location cannot be determined
|
||||
errLocation :: String
|
||||
errLocation = unlines $
|
||||
[ "Unable to determine where to install the RGL. Please do one of the following:"
|
||||
, " - Pass the " ++ destination_flag ++ "... flag to this script"
|
||||
, " - Set the GF_LIB_PATH environment variable"
|
||||
, " - Compile & install GF from the gf-core repository (must be in same directory as gf-rgl)"
|
||||
]
|
||||
|
||||
-- | Copy single file between directories
|
||||
copyOne :: String -> FilePath -> FilePath -> IO ()
|
||||
copyOne file from to = do
|
||||
putStrLn $ "Copying [" ++ file ++ "] " ++ to
|
||||
createDirectoryIfMissing True to
|
||||
copyFileWithModificationTime (from </> file) (to </> file)
|
||||
|
||||
-- | Copy all files between directories
|
||||
copyAll :: String -> FilePath -> FilePath -> IO ()
|
||||
copyAll msg from to = do
|
||||
putStrLn $ "Copying [" ++ msg ++ "] " ++ to
|
||||
createDirectoryIfMissing True to
|
||||
mapM_ (\file -> when (file /= "." && file /= "..") $ copyFileWithModificationTime (from </> file) (to </> file)) =<< getDirectoryContents from
|
||||
|
||||
-- | Copy a file together with its modification time but no other meta data
|
||||
copyFileWithModificationTime :: FilePath -> FilePath -> IO ()
|
||||
copyFileWithModificationTime source destination = do
|
||||
copyFile source destination
|
||||
#if __GLASGOW_HASKELL__>=800
|
||||
getModificationTime source >>= setModificationTime destination
|
||||
#endif
|
||||
|
||||
-- | Remove dist directory
|
||||
clean :: IO ()
|
||||
clean = do
|
||||
info <- mkInfo
|
||||
removeDirectoryRecursive (infoBuildDir info)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Paths and directories
|
||||
|
||||
-- | RGL source directory
|
||||
sourceDir :: FilePath
|
||||
sourceDir = "src"
|
||||
|
||||
-- | Drop source directory prefix
|
||||
-- TODO use functions from System.FilePath
|
||||
dropSourceDir :: FilePath -> FilePath
|
||||
dropSourceDir = drop (length sourceDir + 1)
|
||||
|
||||
-- | Information needed in build
|
||||
data Info = Info
|
||||
{ infoBuildDir :: FilePath -- ^ where to put built RGL modules (fixed)
|
||||
, infoInstallDir :: Maybe FilePath -- ^ install directory (found dynamically)
|
||||
, infoGFPath :: FilePath -- ^ path to GF
|
||||
, infoVerbose :: Bool
|
||||
} deriving (Show)
|
||||
|
||||
-- | Build info object from command line args
|
||||
mkInfo :: IO Info
|
||||
mkInfo = do
|
||||
args <- getArgs
|
||||
-- Look for install location in a few different places
|
||||
let mflag = getFlag destination_flag args
|
||||
mbuilt <- catchIOError (readFile "../gf-core/DATA_DIR" >>= \d -> return (Just (d </> "lib"))) (\e -> return Nothing)
|
||||
menvar <- lookupEnv "GF_LIB_PATH" >>= return . fmap (head . splitSearchPath)
|
||||
let
|
||||
inst_dir =
|
||||
case catMaybes [mflag,menvar,mbuilt] of
|
||||
[] -> Nothing
|
||||
p:_ -> Just p
|
||||
let verbose = verbose_switch `elem` args || verbose_switch_short `elem` args
|
||||
return $ Info
|
||||
{ infoBuildDir = "dist"
|
||||
, infoInstallDir = inst_dir
|
||||
, infoGFPath = maybe default_gf id (getFlag gf_flag args)
|
||||
, infoVerbose = verbose
|
||||
}
|
||||
where
|
||||
default_gf = "gf"
|
||||
|
||||
getRGLBuildDir :: Info -> Mode -> FilePath
|
||||
getRGLBuildDir info mode = infoBuildDir info </> getRGLBuildSubDir mode
|
||||
|
||||
getRGLBuildSubDir :: Mode -> String
|
||||
getRGLBuildSubDir mode =
|
||||
case mode of
|
||||
Present -> "present"
|
||||
AllTenses -> "alltenses"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Build modes
|
||||
|
||||
data Mode = Present | AllTenses
|
||||
deriving (Show,Eq)
|
||||
|
||||
all_modes :: [String]
|
||||
all_modes = ["present","alltenses"]
|
||||
|
||||
default_modes :: [Mode]
|
||||
default_modes = [Present,AllTenses]
|
||||
|
||||
-- | An RGL build command
|
||||
data RGLCommand = RGLCommand
|
||||
{ cmdName :: String -- ^ name of command
|
||||
, cmdIsDef :: Bool -- ^ is default?
|
||||
, cmdAction :: [Mode] -> [String] -> Info -> IO () -- ^ action
|
||||
}
|
||||
|
||||
-- | Possible build commands
|
||||
rglCommands :: [RGLCommand]
|
||||
rglCommands =
|
||||
[ RGLCommand "prelude" True $ \modes args bi -> do
|
||||
let prelude_src_dir = sourceDir </> "prelude"
|
||||
prelude_dst_dir = infoBuildDir bi </> "prelude"
|
||||
createDirectoryIfMissing True prelude_dst_dir
|
||||
files <- getDirectoryContents prelude_src_dir
|
||||
let modules = [prelude_src_dir </> file | file <- files, file /= "." && file /= ".."]
|
||||
putStrLn $ "Building [Prelude]"
|
||||
when (infoVerbose bi) $ putStrLn (unwords (map dropSourceDir modules))
|
||||
run_gfc bi (["--gfo-dir="++prelude_dst_dir] ++ modules)
|
||||
|
||||
, RGLCommand "all" True $ gfcp [l,s,c,t,sc]
|
||||
, RGLCommand "lang" False $ gfcp [l,s]
|
||||
, RGLCommand "api" False $ gfcp [t,sc]
|
||||
, RGLCommand "compat" False $ gfcp [c]
|
||||
|
||||
-- Special command, invoked when command ends in .gf
|
||||
, RGLCommand "modules" False $ \modes args bi -> do
|
||||
let modules = getOptModules args
|
||||
flip mapM_ modules $ \m -> do
|
||||
mex <- findModule m
|
||||
case mex of
|
||||
Nothing -> die $ "Cannot find module: " ++ m
|
||||
Just mfull -> flip mapM_ modes $ \mode -> do
|
||||
let dst = getRGLBuildDir bi mode
|
||||
putStrLn $ "Building [" ++ show mode ++ "] " ++ dropSourceDir mfull
|
||||
run_gfc bi ["--gfo-dir="++dst, mfull]
|
||||
|
||||
]
|
||||
where
|
||||
gfcp :: [Mode -> [String] -> (LangInfo -> FilePath,[LangInfo] -> [LangInfo])] -> [Mode] -> [String] -> Info -> IO ()
|
||||
gfcp cs modes args bi = parallel_ [gfcp' bi mode args cs | mode <- modes]
|
||||
|
||||
gfcp' :: Info -> Mode -> [String] -> [Mode -> [String] -> (LangInfo -> FilePath,[LangInfo] -> [LangInfo])] -> IO ()
|
||||
gfcp' bi mode args cs = do
|
||||
langsAll <- loadLangs
|
||||
-- f :: LangInfo -> FilePath
|
||||
-- as :: [LangInfo] -> [LangInfo]
|
||||
-- ss :: [String]
|
||||
-- fss :: [[FilePath]]
|
||||
let (ss,fss) = unzip [ (summary f langs,map f langs) | c<-cs, let (f,as) = c mode args, let langs = as langsAll]
|
||||
gfcn bi mode (unwords (filter (not.null) ss)) (concat fss)
|
||||
|
||||
summary :: (LangInfo -> FilePath) -> [LangInfo] -> String
|
||||
summary f langs = unwords (map (dropSourceDir . f) langs)
|
||||
-- summary f _ = f (LangInfo "*" "*" Nothing Nothing False False False False)
|
||||
|
||||
l mode args = (lang,optml mode langAll args)
|
||||
s mode args = (symbol,optml mode langTry args)
|
||||
c mode args = (compat,optml AllTenses langCompatibility args)
|
||||
t mode args = (try,optml mode langTry args)
|
||||
sc mode args = (symbolic,optml mode langSymbolic args)
|
||||
|
||||
optml :: Mode -> (LangInfo -> Bool) -> [String] -> ([LangInfo] -> [LangInfo])
|
||||
optml mode pred args =
|
||||
\langsAll ->
|
||||
let langsDefault = filter (if mode == Present then langPresent else const True) (filter pred langsAll)
|
||||
in getOptLangs langsAll langsDefault args
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Getting module paths/names
|
||||
|
||||
-- | Search all language dirs for module name
|
||||
findModule :: String -> IO (Maybe FilePath)
|
||||
findModule file = do
|
||||
langs <- loadLangs
|
||||
let langdirs = map langDir langs
|
||||
let searchdirs = map ((</>) sourceDir) langdirs
|
||||
findFile searchdirs file
|
||||
|
||||
lang :: LangInfo -> FilePath
|
||||
lang l = sourceDir </> langDir l </> ("All" ++ langCode l ++ ".gf")
|
||||
|
||||
compat :: LangInfo -> FilePath
|
||||
compat l = sourceDir </> langDir l </> ("Compatibility" ++ langCode l ++ ".gf")
|
||||
|
||||
symbol :: LangInfo -> FilePath
|
||||
symbol l = sourceDir </> langDir l </> ("Symbol" ++ langCode l ++ ".gf")
|
||||
|
||||
try :: LangInfo -> FilePath
|
||||
try l = sourceDir </> "api" </> ("Try" ++ langCode l ++ ".gf")
|
||||
|
||||
syntax :: LangInfo -> FilePath
|
||||
syntax l = sourceDir </> "api" </> ("Syntax" ++ langCode l ++ ".gf")
|
||||
|
||||
symbolic :: LangInfo -> FilePath
|
||||
symbolic l = sourceDir </> "api" </> ("Symbolic" ++ langCode l ++ ".gf")
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Argument helpers
|
||||
|
||||
-- | Check arguments are valid, failing on error
|
||||
checkArgs :: [String] -> IO ()
|
||||
checkArgs args = do
|
||||
let args'' = args \\ (getOptModules args)
|
||||
let args' = flip filter args'' (\arg -> not
|
||||
( arg `elem` (map cmdName rglCommands)
|
||||
|| arg `elem` all_modes
|
||||
|| lang_flag `isPrefixOf` arg
|
||||
|| gf_flag `isPrefixOf` arg
|
||||
|| destination_flag `isPrefixOf` arg
|
||||
|| arg `elem` [verbose_switch, verbose_switch_short]
|
||||
))
|
||||
unless (null args') $ die $ "Unrecognised argument: " ++ unwords args'
|
||||
return ()
|
||||
|
||||
-- | Get commands from args
|
||||
getCommands :: [String] -> [RGLCommand]
|
||||
getCommands args =
|
||||
let
|
||||
cmdModules = head $ filter (\cmd -> cmdName cmd == "modules") rglCommands
|
||||
cmds0 =
|
||||
[ cmd
|
||||
| arg <- args
|
||||
, cmd <- rglCommands
|
||||
, cmdName cmd == arg
|
||||
, cmdName cmd `notElem` all_modes
|
||||
] ++ (if not (null (getOptModules args)) then [cmdModules] else [])
|
||||
in if null cmds0
|
||||
then [cmd | cmd <- rglCommands, cmdIsDef cmd]
|
||||
else cmds0
|
||||
|
||||
-- | Get mode from args (may be missing)
|
||||
getOptMode :: [String] -> [Mode]
|
||||
getOptMode args =
|
||||
if null explicit_modes
|
||||
then default_modes
|
||||
else explicit_modes
|
||||
where
|
||||
explicit_modes =
|
||||
[Present|have "present"]++
|
||||
[AllTenses|have "alltenses"]
|
||||
have mode = mode `elem` args
|
||||
|
||||
-- | List of languages overriding the default definitions
|
||||
getOptLangs :: [LangInfo] -> [LangInfo] -> [String] -> [LangInfo]
|
||||
getOptLangs allLangs defaultLangs args =
|
||||
let x = [ ls
|
||||
| arg <- args
|
||||
, let (f,ls) = splitAt (length lang_flag) arg
|
||||
, f == lang_flag
|
||||
]
|
||||
in case x of
|
||||
-- ('+':ls):_ -> foldr addLang defaultLangs (seps ls)
|
||||
('-':ls):_ -> foldr removeLang defaultLangs (seps ls)
|
||||
ls:_ -> findLangs defaultLangs (seps ls)
|
||||
_ -> defaultLangs
|
||||
where
|
||||
seps = words . map (\c -> if c==',' then ' ' else c)
|
||||
findLangs langs ls = [lang | lang <- langs, langCode lang `elem` ls]
|
||||
removeLang l ls = [lang | lang <- ls, langCode lang /= l]
|
||||
-- addLang l ls = if null (findLangs ls [l])
|
||||
-- then findLangs allLangs [l]++ls
|
||||
-- else ls
|
||||
|
||||
-- | Get module names from arguments
|
||||
getOptModules :: [String] -> [FilePath]
|
||||
getOptModules = filter (isSuffixOf ".gf")
|
||||
|
||||
-- | Flag for specifying languages
|
||||
-- '=' can optionally be followed by '+' or '-' to alter the default languages
|
||||
lang_flag :: String
|
||||
lang_flag = "--langs="
|
||||
|
||||
-- | Flag for specifying gf location
|
||||
gf_flag :: String
|
||||
gf_flag = "--gf="
|
||||
|
||||
-- | Flag for specifying RGL install location
|
||||
destination_flag :: String
|
||||
destination_flag = "--dest="
|
||||
|
||||
-- | Switch for making verbose
|
||||
verbose_switch :: String
|
||||
verbose_switch = "--verbose"
|
||||
|
||||
verbose_switch_short :: String
|
||||
verbose_switch_short = "-v"
|
||||
|
||||
-- | Get flag value from list of args
|
||||
getFlag :: String -> [String] -> Maybe String
|
||||
getFlag flag args = fmap (drop (length flag)) $ find (isPrefixOf flag) args
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Executing GF
|
||||
|
||||
gfc :: Info -> [Mode] -> String -> [FilePath] -> IO ()
|
||||
gfc bi modes summary files =
|
||||
parallel_ [gfcn bi mode summary files | mode<-modes]
|
||||
|
||||
gfcn :: Info -> Mode -> String -> [FilePath] -> IO ()
|
||||
gfcn bi mode summary files = do
|
||||
let dir = getRGLBuildDir bi mode
|
||||
preproc = case mode of
|
||||
Present -> "--preproc=mkPresent"
|
||||
AllTenses -> ""
|
||||
createDirectoryIfMissing True dir
|
||||
if length files > 0
|
||||
then do
|
||||
putStrLn $ "Building [" ++ show mode ++ "]"
|
||||
when (infoVerbose bi) (putStrLn summary)
|
||||
run_gfc bi (["--no-pmcfg", preproc, "--gfo-dir="++dir] ++ files)
|
||||
else
|
||||
putStrLn $ "Skipping [" ++ show mode ++ "] (nothing to build)"
|
||||
|
||||
-- | Runs the gf executable in compile mode with the given arguments
|
||||
run_gfc :: Info -> [String] -> IO ()
|
||||
run_gfc bi args = do
|
||||
let
|
||||
dir = infoBuildDir bi
|
||||
args' = ["--batch", "--quiet", "--gf-lib-path="++dir] ++ filter (not . null) args
|
||||
gf = infoGFPath bi
|
||||
execute gf args'
|
||||
|
||||
-- | Run an arbitrary system command
|
||||
execute :: String -> [String] -> IO ()
|
||||
execute command args = do
|
||||
let cmdline = command ++ " " ++ unwords (map showArg args)
|
||||
e <- rawSystem command args
|
||||
case e of
|
||||
ExitSuccess -> return ()
|
||||
ExitFailure i -> do
|
||||
putStrLn $ "Ran: " ++ cmdline
|
||||
die $ command ++ " exited with exit code: " ++ show i
|
||||
where
|
||||
showArg arg = if ' ' `elem` arg then "'" ++ arg ++ "'" else arg
|
||||
|
||||
-- | For parallel RGL module compilation
|
||||
-- Unfortunately, this has no effect unless compiled with -threaded
|
||||
--parallel_ :: (Foldable t, Monad m) => t (m a) -> m ()
|
||||
parallel_ ms = sequence_ ms
|
||||
-- do c <- newChan
|
||||
-- ts <- sequence [ forkIO (m >> writeChan c ()) | m <- ms]
|
||||
-- sequence_ [readChan c | _ <- ts]
|
||||
|
||||
putErrLn :: String -> IO ()
|
||||
putErrLn = hPutStrLn stderr
|
||||
|
||||
die :: String -> IO a
|
||||
die s = do
|
||||
hPutStrLn stderr s
|
||||
exitFailure
|
||||
100
Setup.sh
Executable file
100
Setup.sh
Executable file
@@ -0,0 +1,100 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ---
|
||||
# Non-Haskell RGL build script for Unix-based machines
|
||||
# ---
|
||||
set -e
|
||||
|
||||
# Get languages from config
|
||||
langs=$(tail -n +2 languages.csv | awk -F ',' '{ if ($7 != "n") { print $1 } }')
|
||||
langs_present=$(tail -n +2 languages.csv | awk -F ',' '{ if ($6 == "y") { print $1 } }')
|
||||
langs_try=$(tail -n +2 languages.csv | awk -F ',' '{ if ($8 != "n") { print $1 } }')
|
||||
langs_symbolic=$(tail -n +2 languages.csv | awk -F ',' '{ if ($9 != "n") { print $1 } }')
|
||||
langs_compat=$(tail -n +2 languages.csv | awk -F ',' '{ if ($10 == "y") { print $1 } }')
|
||||
|
||||
# Modules to compile for each language
|
||||
modules_langs="All Symbol Compatibility"
|
||||
modules_api="Try Symbolic"
|
||||
|
||||
# Defaults (may be overridden by options)
|
||||
gf="gf"
|
||||
dest=""
|
||||
verbose="false"
|
||||
|
||||
# Check command line options
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--gf=*)
|
||||
gf="${arg#*=}"; shift ;;
|
||||
--dest=*)
|
||||
dest="${arg#*=}"; shift ;;
|
||||
--verbose|-v)
|
||||
verbose="true"; shift ;;
|
||||
*) echo "Unknown option: ${arg}" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Try to determine install location
|
||||
if [ -z "$dest" ]; then
|
||||
dest=$(echo "$GF_LIB_PATH" | sed 's/:.*$//')
|
||||
fi
|
||||
if [ -z "$dest" ] && [ -f "../gf-core/DATA_DIR" ]; then
|
||||
dest=$(cat ../gf-core/DATA_DIR)
|
||||
if [ -n "$dest" ]; then dest="${dest}/lib"; fi
|
||||
fi
|
||||
if [ -z "$dest" ]; then
|
||||
echo "Unable to determine where to install the RGL. Please do one of the following:"
|
||||
echo " - Pass the --dest=... flag to this script"
|
||||
echo " - Set the GF_LIB_PATH environment variable"
|
||||
echo " - Compile & install GF from the gf-core repository (must be in same directory as gf-rgl)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# A few more definitions before we get started
|
||||
src="src"
|
||||
dist="dist"
|
||||
gfc="${gf} --batch --quiet --gf-lib-path=${dist}"
|
||||
|
||||
# Make directories if not present
|
||||
mkdir -p "${dist}/prelude"
|
||||
mkdir -p "${dist}/present"
|
||||
mkdir -p "${dist}/alltenses"
|
||||
|
||||
# Build: prelude
|
||||
echo "Building [prelude]"
|
||||
if [ $verbose = true ]; then echo "${src}"/prelude/*.gf; fi
|
||||
${gfc} --gfo-dir="${dist}"/prelude "${src}"/prelude/*.gf
|
||||
|
||||
# Gather all language modules for building
|
||||
modules_present=
|
||||
modules_alltenses=
|
||||
for lang in $langs; do
|
||||
for mod in $modules_langs $modules_api; do
|
||||
if [ $mod == "Compatibility" ] && [[ "$langs_compat" != *"$lang"* ]]; then continue; fi
|
||||
if [ $mod == "Try" ] && [[ "$langs_try" != *"$lang"* ]]; then continue; fi
|
||||
if [ $mod == "Symbolic" ] && [[ "$langs_symbolic" != *"$lang"* ]]; then continue; fi
|
||||
for file in "${src}"/*/"${mod}${lang}".gf; do
|
||||
if [ ! -f "$file" ]; then continue; fi
|
||||
if [[ "$langs_present" = *"$lang"* ]]; then modules_present="${modules_present} ${file}"; fi
|
||||
modules_alltenses="${modules_alltenses} ${file}"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
# Build: present
|
||||
echo "Building [present]"
|
||||
if [ $verbose = true ]; then echo $modules_present; fi
|
||||
for module in $modules_present; do
|
||||
${gfc} --no-pmcfg --gfo-dir="${dist}"/present --preproc=mkPresent "${module}"
|
||||
done
|
||||
|
||||
# Build: alltenses
|
||||
echo "Building [alltenses]"
|
||||
if [ $verbose = true ]; then echo $modules_alltenses; fi
|
||||
for module in $modules_alltenses; do
|
||||
${gfc} --no-pmcfg --gfo-dir="${dist}"/alltenses "${module}"
|
||||
done
|
||||
|
||||
# Copy
|
||||
echo "Copying to ${dest}"
|
||||
cp -R -p "${dist}"/* "${dest}"
|
||||
8
doc/.gitignore
vendored
Normal file
8
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
synopsis/index.txt
|
||||
synopsis/index.html
|
||||
synopsis/api-examples-*.txt
|
||||
synopsis/api-examples.gfs
|
||||
synopsis/categories-imagemap.html
|
||||
synopsis/categories.png
|
||||
|
||||
gfdoc/sources.html
|
||||
@@ -11,9 +11,9 @@ import Data.List
|
||||
-- this creates the file absfuns.html
|
||||
|
||||
main = do
|
||||
system "grep \" : \" ../src/abstract/*.gf ../src/translator/Extensions.gf ../../examples/app/App.gf | grep \" -- \" >absfuns.tmp"
|
||||
system "grep \" : \" ../src/abstract/*.gf | grep \" -- \" >absfuns.tmp"
|
||||
funs <- readFile "absfuns.tmp" >>= return . lines
|
||||
deps <- readFile "../src/uddeps.labels" >>= return . lines
|
||||
deps <- readFile "../src/Lang.labels" >>= return . lines
|
||||
let depmap = M.fromListWith (\x y -> x ++ [";"] ++ y) [(fun,deps) | fun:deps <- map words deps]
|
||||
let rows = sort $ filter (flip S.notMember hiddenModules . last) $ map (mkRow depmap) (map words funs)
|
||||
let entries = map (sepFields . addLink) rows
|
||||
@@ -47,10 +47,7 @@ putStrLnIf = putStrLn
|
||||
addLink fs =
|
||||
let
|
||||
m = last fs
|
||||
abstract = case m of
|
||||
"App" -> "../../examples/app/"
|
||||
"Extensions" -> "translator/"
|
||||
_ -> "abstract/"
|
||||
abstract = "abstract/"
|
||||
in init fs ++ ["[" ++ m ++ " ../src/" ++ abstract ++ m ++ ".gf]"]
|
||||
|
||||
-- for tab separated generation
|
||||
@@ -59,4 +56,3 @@ addLink fs =
|
||||
-- italics e = e
|
||||
-- putStrLnIf = return ()
|
||||
-- addLink fs = fs
|
||||
|
||||
|
||||
1698
doc/CC_eng_tha.txt
1698
doc/CC_eng_tha.txt
File diff suppressed because it is too large
Load Diff
65
doc/DocExtend.hs
Normal file
65
doc/DocExtend.hs
Normal file
@@ -0,0 +1,65 @@
|
||||
module Main where
|
||||
|
||||
import Data.List
|
||||
import Data.Ord (comparing)
|
||||
|
||||
main = docExtend
|
||||
|
||||
docExtend = do
|
||||
|
||||
-- read the abstract syntax file
|
||||
funds <- readFile "../src/abstract/Extend.gf" >>= return . map words . lines
|
||||
|
||||
-- function format:
|
||||
-- GenNP : NP -> Quant ; -- this man's
|
||||
let funs = [[fu,unwords ty,unwords co] | fu:":":ws <- funds, (ty,_:_:co) <- [break (==";") ws]]
|
||||
--- mapM print funs
|
||||
|
||||
-- read the concrete syntax functor
|
||||
funcs <- readFile "../src/common/ExtendFunctor.gf" >>= return . map words . lines
|
||||
|
||||
-- definition format: one of
|
||||
-- GenNP = variants {} ; -- NP -> Quant ; -- this man's
|
||||
-- UttDatIP ip = UttAccIP (lin IP ip) ; -- whom (dative) ; DEFAULT who
|
||||
let defs = [[[fu],de,co] | fuws <- funcs, (fu:_,_:ws) <- [break (=="=") fuws], (de,_:_:co) <- [break (==";") ws]]
|
||||
let undef de co = if de == ["variants", "{}"] then "-" else unwords (tail (dropWhile (/="DEFAULT") co))
|
||||
let fundefs = [[fu,ty,co,undef d c] | fu:ty:co:_ <- funs, [f]:d:c:_ <- defs, f==fu]
|
||||
--- mapM print fundefs
|
||||
|
||||
-- read the functor exclusion lists for each language
|
||||
let langs = [("Eng","english"),("Dut","dutch"),("Spa","spanish"),("Swe","swedish")]
|
||||
funss <- mapM getExclusions langs
|
||||
--- mapM_ print funss
|
||||
let langfuns = zip (map fst langs) funss
|
||||
let funlangs = [(fu,[lang | (lang,fs) <- langfuns, elem fu fs]) | fu:_ <- funs]
|
||||
let fundeflangs = [[fu,ty,co,de,unwords ls] | fu:ty:co:de:_ <- fundefs, (f,ls) <- funlangs, f==fu]
|
||||
--- mapM print fundeflangs
|
||||
writeFile "GF-RGL-Extend.html" $ printHTML $ sortBy (comparing (\z -> (last (words (z !! 1)), z!!0))) fundeflangs
|
||||
putStrLn "wrote file GF-RGL-Extend.html"
|
||||
|
||||
-- exclusion format:
|
||||
-- concrete ExtendEng of Extend =
|
||||
-- CatEng ** ExtendFunctor -
|
||||
-- [
|
||||
-- VPS, ListVPS, RNP, RNPList --- lines between the first [ and ] lines are read
|
||||
-- ]
|
||||
|
||||
getExclusions (lan,language) = do
|
||||
rs <- readFile ("../src/" ++ language ++ "/Extend" ++ lan ++ ".gf") >>= return . map words . lines
|
||||
let excls = case dropWhile (/=["["]) rs of
|
||||
[] -> []
|
||||
_:es -> map (filter (/=',')) $ concat $ takeWhile (/= ["]"]) es
|
||||
return excls
|
||||
|
||||
printHTML fs = unlines $
|
||||
"<html>" :
|
||||
"<body>" :
|
||||
"<table>" :
|
||||
map prRow fs ++ [
|
||||
"</table>",
|
||||
"</body>",
|
||||
"</html>"
|
||||
]
|
||||
where
|
||||
prRow ss = concat $ "<tr>" : ["<td>" ++ s ++ "</td>" | s <- ss] ++ ["</tr>"]
|
||||
|
||||
@@ -21,7 +21,7 @@ interlingua = "Meaning"
|
||||
languages = [
|
||||
"afrikaans",
|
||||
-- "አማርኛ",
|
||||
-- "العربية",
|
||||
"العربية",
|
||||
"Български",
|
||||
"català",
|
||||
"中文",
|
||||
@@ -45,6 +45,7 @@ languages = [
|
||||
"پeرسن",
|
||||
"polski",
|
||||
"پنجابی",
|
||||
"português",
|
||||
"Русский",
|
||||
"ٻولي",
|
||||
"español",
|
||||
|
||||
62
doc/Makefile
62
doc/Makefile
@@ -1,55 +1,21 @@
|
||||
.PHONY: abstract synopsis
|
||||
.PHONY: all status synopsis abstract sources
|
||||
|
||||
all: exx synopsis
|
||||
GFDOC=gfdoc
|
||||
S=../src
|
||||
|
||||
GF_alltenses=$(GF_LIB_PATH)/alltenses
|
||||
all: synopsis
|
||||
|
||||
status: status.html
|
||||
|
||||
index:
|
||||
txt2tags -thtml index.txt
|
||||
status:
|
||||
txt2tags -thtml status.txt
|
||||
synopsis:
|
||||
runghc MkSynopsis.hs
|
||||
make -C synopsis GF_LIB_PATH=../$(GF_LIB_PATH)
|
||||
|
||||
categories-imagemap.html: categories.dot
|
||||
dot -Tcmapx $^ > $@
|
||||
sources:
|
||||
make -C gfdoc sources.html
|
||||
|
||||
status.html:
|
||||
txt2tags -thtml status.txt
|
||||
|
||||
abstract:
|
||||
gfdoc -txthtml ../src/abstract/*.gf
|
||||
mv ../src/abstract/*.html abstract
|
||||
|
||||
exx-script:
|
||||
runghc MkExx.hs <api-examples.txt >api-examples.gfs
|
||||
exx: exx-script
|
||||
gf -retain -s $(GF_alltenses)/TryAfr.gfo <api-examples.gfs >api-examples-Afr.txt
|
||||
gf -retain -s $(GF_alltenses)/TryBul.gfo <api-examples.gfs >api-examples-Bul.txt
|
||||
gf -retain -s $(GF_alltenses)/TryCat.gfo <api-examples.gfs >api-examples-Cat.txt
|
||||
gf -retain -s $(GF_alltenses)/TryChi.gfo <api-examples.gfs >api-examples-Chi.txt
|
||||
gf -retain -s $(GF_alltenses)/TryDan.gfo <api-examples.gfs >api-examples-Dan.txt
|
||||
gf -retain -s $(GF_alltenses)/TryDut.gfo <api-examples.gfs >api-examples-Dut.txt
|
||||
gf -retain -s $(GF_alltenses)/TryEng.gfo <api-examples.gfs >api-examples-Eng.txt
|
||||
gf -retain -s $(GF_alltenses)/TryEst.gfo <api-examples.gfs >api-examples-Est.txt
|
||||
gf -retain -s $(GF_alltenses)/TryFin.gfo <api-examples.gfs >api-examples-Fin.txt
|
||||
gf -retain -s $(GF_alltenses)/TryFre.gfo <api-examples.gfs >api-examples-Fre.txt
|
||||
gf -retain -s $(GF_alltenses)/TryGer.gfo <api-examples.gfs >api-examples-Ger.txt
|
||||
gf -retain -s $(GF_alltenses)/TryGre.gfo <api-examples.gfs >api-examples-Gre.txt
|
||||
gf -retain -s $(GF_alltenses)/TryHin.gfo <api-examples.gfs >api-examples-Hin.txt
|
||||
gf -retain -s $(GF_alltenses)/TryIce.gfo <api-examples.gfs >api-examples-Ice.txt
|
||||
gf -retain -s $(GF_alltenses)/TryIta.gfo <api-examples.gfs >api-examples-Ita.txt
|
||||
gf -retain -s $(GF_alltenses)/TryJpn.gfo <api-examples.gfs >api-examples-Jpn.txt
|
||||
gf -retain -s $(GF_alltenses)/TryLav.gfo <api-examples.gfs >api-examples-Lav.txt
|
||||
gf -retain -s $(GF_alltenses)/TryMlt.gfo <api-examples.gfs >api-examples-Mlt.txt
|
||||
gf -retain -s $(GF_alltenses)/TryMon.gfo <api-examples.gfs >api-examples-Mon.txt
|
||||
gf -retain -s $(GF_alltenses)/TryNep.gfo <api-examples.gfs >api-examples-Nep.txt
|
||||
gf -retain -s $(GF_alltenses)/TryNor.gfo <api-examples.gfs >api-examples-Nor.txt
|
||||
gf -retain -s $(GF_alltenses)/TryNno.gfo <api-examples.gfs >api-examples-Nno.txt
|
||||
gf -retain -s $(GF_alltenses)/TryPes.gfo <api-examples.gfs >api-examples-Pes.txt
|
||||
gf -retain -s $(GF_alltenses)/TryPnb.gfo <api-examples.gfs >api-examples-Pnb.txt
|
||||
gf -retain -s $(GF_alltenses)/TryPol.gfo <api-examples.gfs >api-examples-Pol.txt
|
||||
gf -retain -s $(GF_alltenses)/TryRon.gfo <api-examples.gfs >api-examples-Ron.txt
|
||||
gf -retain -s $(GF_alltenses)/TryRus.gfo <api-examples.gfs >api-examples-Rus.txt
|
||||
gf -retain -s $(GF_alltenses)/TrySnd.gfo <api-examples.gfs >api-examples-Snd.txt
|
||||
gf -retain -s $(GF_alltenses)/TrySpa.gfo <api-examples.gfs >api-examples-Spa.txt
|
||||
gf -retain -s $(GF_alltenses)/TrySwe.gfo <api-examples.gfs >api-examples-Swe.txt
|
||||
gf -retain -s $(GF_alltenses)/TryTha.gfo <api-examples.gfs >api-examples-Tha.txt
|
||||
gf -retain -s $(GF_alltenses)/TryUrd.gfo <api-examples.gfs >api-examples-Urd.txt
|
||||
$(GFDOC) -txthtml $S/abstract/*.gf
|
||||
mv $S/abstract/*.html abstract
|
||||
|
||||
72
doc/MkExx.hs
72
doc/MkExx.hs
@@ -1,72 +0,0 @@
|
||||
-- make a script for computing examples
|
||||
-- usage: runghc MkExx.hs <koe.txt >koe.gfs
|
||||
-- then: gf -retain -s ../alltenses/TryRon.gfo <koe.gfs
|
||||
-- called automatically by 'make exx'
|
||||
|
||||
main = interact (unlines . concatMap mkScript . takeWhile (/="--.") . lines)
|
||||
|
||||
mkScript l = case l of
|
||||
' ':_ ->
|
||||
let ident = mkIdent $ unwords $ takeWhile (/="--") $ words l
|
||||
in [add $ psq ident]
|
||||
'-':_ -> []
|
||||
_ -> [
|
||||
add $ psq l,
|
||||
add $ "cc -one " ++ l,
|
||||
add $ psq "*"
|
||||
]
|
||||
|
||||
add = ('\n':)
|
||||
|
||||
psq s = "ps \"" ++ s ++ "\""
|
||||
|
||||
-- makes mkUtt : QS -> Utt to mkUtt-QS-Utt
|
||||
mkIdent :: String -> String
|
||||
mkIdent = concatMap unspec where
|
||||
unspec c = case c of
|
||||
' ' -> ""
|
||||
'>' -> ""
|
||||
'(' -> ""
|
||||
')' -> ""
|
||||
':' -> "-"
|
||||
_ -> [c]
|
||||
|
||||
|
||||
|
||||
langsCoding = [
|
||||
(("amharic", "Amh"),""),
|
||||
(("arabic", "Ara"),""),
|
||||
(("bulgarian","Bul"),""),
|
||||
(("catalan", "Cat"),"Romance"),
|
||||
(("danish", "Dan"),"Scand"),
|
||||
(("dutch", "Dut"),""),
|
||||
(("english", "Eng"),""),
|
||||
(("finnish", "Fin"),""),
|
||||
(("french", "Fre"),"Romance"),
|
||||
(("hindi", "Hin"),"Hindustani"),
|
||||
(("german", "Ger"),""),
|
||||
(("interlingua","Ina"),""),
|
||||
(("italian", "Ita"),"Romance"),
|
||||
(("latin", "Lat"),""),
|
||||
(("norwegian","Nor"),"Scand"),
|
||||
(("polish", "Pol"),""),
|
||||
(("punjabi", "Pnb"),""),
|
||||
(("romanian", "Ron"),""),
|
||||
(("russian", "Rus"),""),
|
||||
(("spanish", "Spa"),"Romance"),
|
||||
(("swedish", "Swe"),"Scand"),
|
||||
(("thai", "Tha"),""),
|
||||
(("turkish", "Tur"),""),
|
||||
(("urdu", "Urd"),"Hindustani")
|
||||
]
|
||||
|
||||
|
||||
langs = map fst langsCoding
|
||||
|
||||
-- languagues for which Try is normally compiled
|
||||
langsLang = langs `except` langsIncomplete
|
||||
|
||||
-- languages for which Lang can be compiled but which are incomplete
|
||||
langsIncomplete = ["Amh","Ara","Hin","Lat","Pnb","Rus","Tha","Tur","Urd"]
|
||||
|
||||
except ls es = filter (flip notElem es . snd) ls
|
||||
22
doc/Test.hs
22
doc/Test.hs
@@ -1,22 +0,0 @@
|
||||
import qualified Data.Map as Map
|
||||
import Data.Char
|
||||
|
||||
gold = "CC_eng_tha.txt"
|
||||
tested = "api-examples-Tha.txt"
|
||||
|
||||
main = do
|
||||
s <- readFile gold
|
||||
let corrects = Map.fromList $ exx 1 5 2 (lines s)
|
||||
-- mapM_ putStrLn $ concat [[t,s] | (t,s) <- Map.toList corrects]
|
||||
t <- readFile tested
|
||||
mapM_ (doTest corrects) (exx 18 22 1 (map (drop 4) (lines t)))
|
||||
|
||||
exx x y z ss = [(ss!!k,ss!!(k+z)) | k <- [x,y .. length ss - 2]]
|
||||
|
||||
doTest corrects (t,s) = case Map.lookup t corrects of
|
||||
Just c -> if unspace s == uncomment c then return () else mapM_ putStrLn [t,unspace s,c]
|
||||
_ -> return ()
|
||||
|
||||
unspace = filter (not . isSpace)
|
||||
uncomment = unspace . takeWhile (/= '-')
|
||||
|
||||
914
doc/absfuns.html
914
doc/absfuns.html
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
##
|
||||
# Makefile for GF RGL Browser
|
||||
# John J. Camilleri, 2012
|
||||
##
|
||||
dir=../../src
|
||||
|
||||
all:
|
||||
./build-tags.sh
|
||||
|
||||
clean:
|
||||
find -name '*.gf-tags' | xargs rm
|
||||
cd $(dir) ; find -name '*.gfo' | xargs rm
|
||||
cd $(dir) ; find -name '*.gf-tags' | xargs rm
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 847 B |
@@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script for building tags files for all RGL
|
||||
# John J. Camilleri, 2014
|
||||
#
|
||||
#set -o errexit
|
||||
|
||||
dir=`pwd`
|
||||
basedir=${dir}/../../src
|
||||
tagsdir=${dir}/tags
|
||||
index=${dir}/index.json
|
||||
ignore="demo old-demo tmp"
|
||||
start=`date +%s`
|
||||
|
||||
# Commands on GNU linux
|
||||
# FIND="find -maxdepth 1 -name '*.gf'"
|
||||
# STAT="stat --format=%Y"
|
||||
# SED='sed'
|
||||
|
||||
# Commands on OSX
|
||||
FIND="find *.gf -maxdepth 1"
|
||||
STAT="stat -f %a"
|
||||
SED='gsed'
|
||||
|
||||
# Function for testing array membership
|
||||
in_ignore() {
|
||||
local search="$1"
|
||||
for i in $ignore; do
|
||||
if [ "$i" = "$search" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Make the dir just to be sure
|
||||
[ -d ${tagsdir} ] || mkdir ${tagsdir}
|
||||
|
||||
# Iterate and build all the tags (takes some time)
|
||||
rm -f $index
|
||||
echo "{\n\"urlprefix\": \"/\"," >> $index
|
||||
echo "\"languages\": {" >> $index
|
||||
for dir in `ls "$basedir/"`
|
||||
do
|
||||
if ! in_ignore $dir && [ -d "$basedir/$dir" ] ; then
|
||||
cd $basedir/$dir
|
||||
echo "Processing folder:" `pwd`
|
||||
echo " \"${dir}\": [" >> $index
|
||||
$FIND | while read -r file
|
||||
do
|
||||
echo " \""`echo $file | sed 's|./||;s|.gf||'`"\"," >> $index
|
||||
filemtime=`$STAT "${tagsdir}/${file}-tags"` 2>/dev/null
|
||||
if [ -z "$filemtime" ] || [ "$filemtime" -lt "$start" ]
|
||||
then
|
||||
gf --batch --quiet --tags --output-dir=${tagsdir} $file 2>/dev/null
|
||||
fi
|
||||
done
|
||||
echo " \"\"\n ]," >> $index
|
||||
fi
|
||||
done
|
||||
echo " \"\":{}\n}\n}" >> $index
|
||||
|
||||
# Replace all URLs
|
||||
echo "Replacing URLs"
|
||||
cd $tagsdir
|
||||
$SED --in-place --regexp-extended "s|\S+?/lib/|/lib/|g" *.gf-tags
|
||||
|
||||
exit 0
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
|
||||
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2011 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
|
||||
["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
|
||||
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
|
||||
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
GF language
|
||||
Customised from lang-hs.js (Haskell)
|
||||
*/
|
||||
PR.registerLangHandler(PR.createSimpleLexer([
|
||||
["pln", /^[\t-\r ]+/, null, "\t\n\r "],
|
||||
["str", /^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/, null, '"'],
|
||||
// ["str", /^'(?:[^\n\f\r'\\]|\\[^&])'?/, null, "'"],
|
||||
["lit", /^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i, null, "0123456789"]
|
||||
], [
|
||||
["com", /^(?:--[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],
|
||||
["kwd", /^(?:abstract|case|cat|concrete|data|def|flags|fun|in|incomplete|instance|interface|let|lin|lincat|lindef|of|open|oper|param|pre|printname|resource|strs|table|transfer|variants|where|with)(?=[^\d'A-Za-z_]|$)/, null],
|
||||
["pln", /^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],
|
||||
["pun", /^[^\d\t-\r "'A-Za-z]+/]
|
||||
]), ["gf"]);
|
||||
@@ -1 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
|
||||
null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
|
||||
@@ -1,3 +0,0 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
|
||||
["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
|
||||
["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
|
||||
["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
|
||||
@@ -1,4 +0,0 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
|
||||
a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
|
||||
a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
|
||||
@@ -1 +0,0 @@
|
||||
PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
|
||||
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
|
||||
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
|
||||
@@ -1 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“â€<C3A2>'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
|
||||
null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
|
||||
@@ -1,3 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
|
||||
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
|
||||
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
|
||||
@@ -1,2 +0,0 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t Â\xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
var a=null;
|
||||
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
|
||||
@@ -1,71 +0,0 @@
|
||||
.pln
|
||||
{
|
||||
color:#000
|
||||
}
|
||||
@media screen
|
||||
{
|
||||
.str
|
||||
{
|
||||
color:#080
|
||||
}
|
||||
.kwd
|
||||
{
|
||||
color:#c0f
|
||||
}
|
||||
.com
|
||||
{
|
||||
color:#800
|
||||
}
|
||||
.typ
|
||||
{
|
||||
color:#606
|
||||
}
|
||||
.lit
|
||||
{
|
||||
color:#066
|
||||
}
|
||||
.pun,.opn,.clo
|
||||
{
|
||||
color:#660
|
||||
}
|
||||
.tag
|
||||
{
|
||||
color:#008
|
||||
}
|
||||
.atn
|
||||
{
|
||||
color:#606
|
||||
}
|
||||
.atv
|
||||
{
|
||||
color:#080
|
||||
}
|
||||
.dec,.var
|
||||
{
|
||||
color:#606
|
||||
}
|
||||
.fun
|
||||
{
|
||||
color:red
|
||||
}
|
||||
}
|
||||
pre.prettyprint
|
||||
{
|
||||
}
|
||||
ol.linenums
|
||||
{
|
||||
color:#eee;
|
||||
margin:0 0 0 1em;
|
||||
}
|
||||
li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8
|
||||
{
|
||||
/* list-style-type:none */
|
||||
}
|
||||
li.L0,li.L2,li.L4,li.L6,li.L8
|
||||
{
|
||||
background:#ffffff;
|
||||
}
|
||||
li.L1,li.L3,li.L5,li.L7,li.L9
|
||||
{
|
||||
background:#fafafa;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||
@@ -1,28 +0,0 @@
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 789 B |
Binary file not shown.
@@ -1,171 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>RGL Source Browser</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="shortcut icon" href="icon.png" type="image/png">
|
||||
<link rel="stylesheet" href="google-code-prettify/prettify-gf.css">
|
||||
<link rel="stylesheet" href="layout-default-latest.css" />
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="http://cloud.grammaticalframework.org/syntax-editor/editor.css" />
|
||||
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.layout-latest.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('body').layout({
|
||||
applyDemoStyles: false,
|
||||
north: {
|
||||
closable: false,
|
||||
resizable: false,
|
||||
spacing_open: 0,
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="jquery.history.min.js"></script>
|
||||
<script src="google-code-prettify/prettify.js"></script>
|
||||
<script src="google-code-prettify/lang-gf.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="loading">
|
||||
<img src="ajax-loader.gif" /> Loading...
|
||||
</div>
|
||||
|
||||
<div class="ui-layout-center">
|
||||
|
||||
<div id="scope" class="panel scope">
|
||||
<div id="controls">
|
||||
<input type="text" id="search" />
|
||||
<span id="count">0</span> items
|
||||
<input type="reset" id="clear" value="Clear" />
|
||||
<!-- input type="checkbox" id="case_sensitive" /><label for="case_sensitive">Case sensitive?</label -->
|
||||
<input type="radio" name="show" id="show_all" checked="checked" /><label for="show_all">Show all</label>
|
||||
<input type="radio" name="show" id="show_local" /><label for="show_local">Local only</label>
|
||||
</div>
|
||||
<table id="results"></table>
|
||||
</div><!-- panel scope -->
|
||||
|
||||
<div id="code" class="panel code">
|
||||
<pre class="prettyprint lang-gf linenums"></pre>
|
||||
</div><!-- panel code -->
|
||||
|
||||
<div id="api" class="panel api">
|
||||
Search the API by constructor name <strong>or</strong> type signature:
|
||||
<div id="controls">
|
||||
<input type="text" id="search" />
|
||||
<span id="count">0</span> items
|
||||
<input type="reset" id="clear" value="Clear" />
|
||||
</div>
|
||||
<table id="results"></table>
|
||||
</div><!-- panel api -->
|
||||
|
||||
<!-- Syntax editor -->
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/grammar_manager.js"></script>
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/support.js"></script>
|
||||
<script type="text/JavaScript" src="http://cloud.grammaticalframework.org/js/localstorage.js"></script>
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/js/pgf_online.js"></script>
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/ast.js"></script>
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/editor_menu.js"></script>
|
||||
<script type="text/javascript" src="http://cloud.grammaticalframework.org/syntax-editor/editor.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
var server = pgf_online({
|
||||
grammars_url: "http://www.grammaticalframework.org/grammars/"
|
||||
});
|
||||
var gm = new GrammarManager(server, {
|
||||
initial: {
|
||||
grammar: "http://www.grammaticalframework.org/grammars/LibraryBrowser.pgf",
|
||||
startcat: "Utt"
|
||||
}
|
||||
});
|
||||
var editor = new Editor(gm, {
|
||||
target: "editor",
|
||||
show_grammar_menu: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="editor" class="panel editor">
|
||||
</div><!-- panel editor -->
|
||||
|
||||
<div id="help" class="panel help">
|
||||
|
||||
<h3>About</h3>
|
||||
<p>A basic tool for looking through scopes and quickly jumping to code within GF's resource grammar library (RGL), created out of necessity. All feedback is welcome.</p>
|
||||
|
||||
<h3>Understanding the scope information</h3>
|
||||
<p>The scope information shown by this tool is basically the output of running GF with the <code>--tags</code> flag. This lists all the functions visible in the scope of a module, one per line. Each line can have two possible forms:</p>
|
||||
|
||||
<h4>1. Local functions</h4>
|
||||
<pre>mkPrep oper-type /lib/src/english/ParadigmsEng.gf:204 Str -> {s : Str; lock_Prep : {}}</pre>
|
||||
<p>For locally defined functions, the second column <code>oper-type</code> indicates the judgement type, followed by the location in the souce file and its type information.</p>
|
||||
|
||||
<h4>2. External functions</h4>
|
||||
<pre>Number indir ResEng R /lib/doc/browse/tags/ParamX.gf-tags</pre>
|
||||
<p>The <code>indir</code> indicates this function is defined in an external module (note that no distinction is made between functions from opened modules and inherited ones.) <code>ResEng</code> is the name of the opened or inherited module, while <code>R</code> is the alias under which it was opened. The final column points to another tags file where the type information for this function can be found. Note that though the function is available in the given context via the <code>ResEng</code> module, it is actually originally defined in <code>ParamX</code>.</p>
|
||||
|
||||
<h3>The RGL directory structure</h3>
|
||||
<p>The drop-down at the top left lists all child directories under <code><a href="http://www.grammaticalframework.org/lib/src/">/lib/src</a></code> in the GF source code repository. Most directories represent individual languages, however many have special functions:</p>
|
||||
<dl>
|
||||
<dt><code>abstract</code></dt><dd>Abstract syntaxes shared by all resource grammars</dd>
|
||||
<dt><code>api</code></dt><dd>The RGL API and instantiations of the API modules in all languages</dd>
|
||||
<dt><code>common</code></dt><dd>Resource modules common to all languages</dd>
|
||||
<dt><code>parametric</code></dt><dd></dd>
|
||||
<dt><code>prelude</code></dt><dd>Common low-level functions</dd>
|
||||
</dl>
|
||||
|
||||
In addition, the following directories are not individual languages but language functors, shared by resource grammars for related language families:
|
||||
<dl>
|
||||
<dt><code>hindustani</code></dt><dd>Used by Hindi, Persian, Punjabi, Urdu</dd>
|
||||
<dt><code>romance</code></dt><dd>Used by Catalan, French, Italian, Romanian, Spanish</dd>
|
||||
<dt><code>scandinavian</code></dt><dd>Used by Danish, Norwegian, Swedish</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Issues</h3>
|
||||
|
||||
<h4>Something is missing or out of date</h4>
|
||||
<p>All the scoping information shown is not read directly from the RGL on-demand. There is an in-between processing stage which must be run, so if something seems out of date just let me know and I can udpate things manually.</p>
|
||||
|
||||
</div><!-- panel help -->
|
||||
|
||||
</div><!-- ui-layout-center -->
|
||||
|
||||
<div class="ui-layout-north">
|
||||
<header>
|
||||
<img src="../../../doc/Logos/gf0.png" alt="" />
|
||||
<h1 title="...or ‘GFRGLSB’ as we like to call it">GF Resource Grammar Library Source Browser</h1>
|
||||
|
||||
<div id="tabbar">
|
||||
<span class="module">
|
||||
Module: <span id="module_name">...</span>
|
||||
<a class="tab scope" href="#scope">scope</a>
|
||||
<a class="tab code" href="#code">code</a>
|
||||
</span>
|
||||
<a class="tab api" href="#api">API</a>
|
||||
<a class="tab editor" href="#editor">Tree Builder</a>
|
||||
<a class="tab help" href="#help">Help</a>
|
||||
<a class="synopsis" href="http://www.grammaticalframework.org/lib/doc/synopsis.html" target="_blank">Synopsis</a>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<footer id="footer">
|
||||
John J. Camilleri<br/><em>Updated 2014-01-29</em>
|
||||
</footer>
|
||||
</div><!-- ui-layout-north -->
|
||||
|
||||
<div class="ui-layout-west">
|
||||
<div id="languages"></div>
|
||||
<div id="modules"></div>
|
||||
</div><!-- ui-layout-west -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
3
doc/browse/jquery.history.min.js
vendored
3
doc/browse/jquery.history.min.js
vendored
@@ -1,3 +0,0 @@
|
||||
/*! jQuery.history v1.1.0 | Copyright 2013 yeikos - MIT license | https://github.com/yeikos/jquery.history */
|
||||
|
||||
;(function(e,t){var n=function(t){var i=e.Event("push");n.context.trigger(i,[t,u]);if(i.isDefaultPrevented())return n;if(u==="pathname"){if(c!==t)window.history.pushState({},null,c=t)}else if(u==="hash"){if(c!==t){location.hash=c=t;if(o){if(!e("#jQueryHistory").length)throw new Error("jQuery."+r+".push: iframe not found.");if(l){l=0;f.contentWindow.document.open().close();f.contentWindow.location.hash="/"}f.contentWindow.document.open().close();f.contentWindow.location.hash=t}}}else{throw new Error("jQuery."+r+".push: the listening is not active.")}n.context.trigger("pushed",[t,u]);return n},r="history";n.context=e({});e.each(["on","off","trigger"],function(e,t){n[t]=function(){n.context[t].apply(n.context,arguments);return n}});n.push=n;n.type=function(){return u};n.url=function(e){e=e||location;if(u===null)throw new Error("jQuery."+r+".url: the listening has not started.");if(u==="pathname")return e.pathname+e.search+e.hash;if(e.hash.length>1){spl=e.href.split("#");spl.shift();spl=spl.join("#");return spl}return""};n.listen=function(l,h){n.unlisten();var p=arguments.length;if(!p||l==="auto"){l=i?"pathname":"hash";p=1}else if(l!=="pathname"&&l!=="hash"){throw new Error("jQuery."+r+".listen: type is not valid.")}if(l==="hash"){if(!s&&p===1||h===true){h=n.config.interval;p=2}if(p===2&&(isNaN(h)||h<1))throw new Error("jQuery."+r+".listen: interval delay is not valid.")}if((u=l)==="pathname"){if(!i)throw new Error("jQuery."+r+".listen: this browser has not support to pushState.");e(window).on("popstate.history",function(e){if(e.originalEvent&&e.originalEvent.state&&c!==location.pathname)n.trigger("change",[c=n.url(),"pathname"])});if(location.pathname.length>1)n.trigger("load",[n.url(),"pathname"])}else{if(s&&!h){e(window).on("hashchange.history",function(e){var t=n.url();if(c!==t)n.trigger("change",[c=t,"hash"])})}else{if(o===t)o=n.ieCondition("lte IE 7");if(o){if(!(p=e("body")).length)throw new Error("jQuery."+r+".listen: document is not ready.");f=e('<iframe id="jQueryHistory" style="display:none" src="javascript:void(0);" />').appendTo(p)[0];var d=f.contentWindow;if(location.hash.length>1){d.document.open().close();d.location.hash="#"+n.url()}a=setInterval(function(){if((c="#"+n.url())!=="#"+n.url(d.location)){d.document.open().close();d.location.hash=c;n.trigger("change",[c.substr(1),"hash"])}},h)}else{c=n.url();a=setInterval(function(){var e=n.url();if(c!==e)n.trigger("change",[c=e,"hash"])},h)}}if(location.hash.length>1){n.trigger("load",[n.url(),"hash"])}}return n};n.unlisten=function(){u=c=f=null;e(window).off("popstate.history hashchange.history");e("#jQueryHistory").remove();clearInterval(a);return n};n.getSupports=function(e){var n={},r=arguments.length,i;if(!r||e==="pushState")n.pushState="pushState"in window.history;if(!r||e==="onhashchange")n.onhashchange="onhashchange"in window&&((i=document.documentMode)===t||i>7);if(r)return n[e];return n};n.ieCondition=function(n){var r=Math.random().toString(36).substring(2),i="_ie_condition_"+r,s,o;s=e("<span><!--[if "+e("<i/>").html(n).text()+']><script type="text/javascript">window.'+i+"=true;</script><![endif]--></span>").appendTo(document.body);o=window[i]===true;try{delete window[i]}catch(u){window[i]=t}s.remove();return o};n.supports=n.getSupports();n.config={interval:100};var i=n.supports.pushState,s=n.supports.onhashchange,o=n.ieCondition("lte IE 7"),u=null,a,f,l=1,c;e[r]=n})(jQuery);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,224 +0,0 @@
|
||||
/*
|
||||
* Default Layout Theme
|
||||
*
|
||||
* Created for jquery.layout
|
||||
*
|
||||
* Copyright (c) 2010
|
||||
* Fabrizio Balliano (http://www.fabrizioballiano.net)
|
||||
* Kevin Dalman (http://allpro.net)
|
||||
*
|
||||
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
|
||||
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
|
||||
*
|
||||
* Last Updated: 2010-02-10
|
||||
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
|
||||
*/
|
||||
|
||||
/*
|
||||
* DEFAULT FONT
|
||||
* Just to make demo-pages look better - not actually relevant to Layout!
|
||||
*/
|
||||
body {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
font-size: 100%;
|
||||
*font-size: 80%;
|
||||
}
|
||||
|
||||
/*
|
||||
* PANES & CONTENT-DIVs
|
||||
*/
|
||||
.ui-layout-pane { /* all 'panes' */
|
||||
background: #FFF;
|
||||
border: 1px solid #BBB;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
|
||||
otherwise you may get double-scrollbars - on the pane AND on the content-div
|
||||
- use ui-layout-wrapper class if pane has a content-div
|
||||
- use ui-layout-container if pane has an inner-layout
|
||||
*/
|
||||
}
|
||||
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
|
||||
.ui-layout-content {
|
||||
padding: 10px;
|
||||
position: relative; /* contain floated or positioned elements */
|
||||
overflow: auto; /* add scrolling to content-div */
|
||||
}
|
||||
|
||||
/*
|
||||
* UTILITY CLASSES
|
||||
* Must come AFTER pane-class above so will override
|
||||
* These classes are NOT auto-generated and are NOT used by Layout
|
||||
*/
|
||||
.layout-child-container,
|
||||
.layout-content-container {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.layout-child-container {
|
||||
border: 0; /* remove border because inner-layout-panes probably have borders */
|
||||
}
|
||||
.layout-scroll {
|
||||
overflow: auto;
|
||||
}
|
||||
.layout-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* RESIZER-BARS
|
||||
*/
|
||||
.ui-layout-resizer { /* all 'resizer-bars' */
|
||||
background: #DDD;
|
||||
border: 1px solid #BBB;
|
||||
border-width: 0;
|
||||
}
|
||||
.ui-layout-resizer-drag { /* REAL resizer while resize in progress */
|
||||
}
|
||||
.ui-layout-resizer-hover { /* affects both open and closed states */
|
||||
}
|
||||
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
|
||||
otherwise color shifts while dragging when bar can't keep up with mouse */
|
||||
.ui-layout-resizer-open-hover , /* hover-color to 'resize' */
|
||||
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
|
||||
background: #C4E1A4;
|
||||
}
|
||||
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
|
||||
border: 1px solid #BBB;
|
||||
}
|
||||
.ui-layout-resizer-north-dragging,
|
||||
.ui-layout-resizer-south-dragging {
|
||||
border-width: 1px 0;
|
||||
}
|
||||
.ui-layout-resizer-west-dragging,
|
||||
.ui-layout-resizer-east-dragging {
|
||||
border-width: 0 1px;
|
||||
}
|
||||
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
|
||||
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
|
||||
background: #E1A4A4; /* red */
|
||||
}
|
||||
|
||||
.ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
|
||||
background: #EBD5AA;
|
||||
}
|
||||
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
|
||||
opacity: .10; /* show only a slight shadow */
|
||||
filter: alpha(opacity=10);
|
||||
}
|
||||
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
|
||||
opacity: 1.00; /* on-hover, show the resizer-bar normally */
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
/* sliding resizer - add 'outside-border' to resizer on-hover
|
||||
* this sample illustrates how to target specific panes and states */
|
||||
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
|
||||
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
|
||||
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
|
||||
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
|
||||
|
||||
/*
|
||||
* TOGGLER-BUTTONS
|
||||
*/
|
||||
.ui-layout-toggler {
|
||||
border: 1px solid #BBB; /* match pane-border */
|
||||
background-color: #BBB;
|
||||
}
|
||||
.ui-layout-resizer-hover .ui-layout-toggler {
|
||||
opacity: .60;
|
||||
filter: alpha(opacity=60);
|
||||
}
|
||||
.ui-layout-toggler-hover , /* need when NOT resizable */
|
||||
.ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
|
||||
background-color: #FC6;
|
||||
opacity: 1.00;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.ui-layout-toggler-north ,
|
||||
.ui-layout-toggler-south {
|
||||
border-width: 0 1px; /* left/right borders */
|
||||
}
|
||||
.ui-layout-toggler-west ,
|
||||
.ui-layout-toggler-east {
|
||||
border-width: 1px 0; /* top/bottom borders */
|
||||
}
|
||||
/* hide the toggler-button when the pane is 'slid open' */
|
||||
.ui-layout-resizer-sliding .ui-layout-toggler {
|
||||
display: none;
|
||||
}
|
||||
/*
|
||||
* style the text we put INSIDE the togglers
|
||||
*/
|
||||
.ui-layout-toggler .content {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
|
||||
}
|
||||
|
||||
/*
|
||||
* PANE-MASKS
|
||||
* these styles are hard-coded on mask elems, but are also
|
||||
* included here as !important to ensure will overrides any generic styles
|
||||
*/
|
||||
.ui-layout-mask {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden !important;
|
||||
position: absolute !important;
|
||||
opacity: 0 !important;
|
||||
filter: Alpha(Opacity="0") !important;
|
||||
}
|
||||
.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
div.ui-layout-mask {} /* standard mask for iframes */
|
||||
iframe.ui-layout-mask {} /* extra mask for objects/applets */
|
||||
|
||||
/*
|
||||
* Default printing styles
|
||||
*/
|
||||
@media print {
|
||||
/*
|
||||
* Unless you want to print the layout as it appears onscreen,
|
||||
* these html/body styles are needed to allow the content to 'flow'
|
||||
*/
|
||||
html {
|
||||
height: auto !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
body.ui-layout-container {
|
||||
position: static !important;
|
||||
top: auto !important;
|
||||
bottom: auto !important;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
/* only IE6 has container width & height set by Layout */
|
||||
_width: auto !important;
|
||||
_height: auto !important;
|
||||
}
|
||||
.ui-layout-resizer, .ui-layout-toggler {
|
||||
display: none !important;
|
||||
}
|
||||
/*
|
||||
* Default pane print styles disables positioning, borders and backgrounds.
|
||||
* You can modify these styles however it suit your needs.
|
||||
*/
|
||||
.ui-layout-pane {
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
position: relative !important;
|
||||
top: auto !important;
|
||||
bottom: auto !important;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
}
|
||||
@@ -1,573 +0,0 @@
|
||||
/*
|
||||
GF RGL Browser
|
||||
John J. Camilleri, 2013
|
||||
*/
|
||||
|
||||
var thing = null;
|
||||
$(document).ready(function(){
|
||||
|
||||
thing = new Thing();
|
||||
|
||||
// ===== URL history =====
|
||||
$.history.on('load change push pushed', function(event, url, type) {
|
||||
var stripExt = function(s) {
|
||||
var i = s.lastIndexOf('.');
|
||||
return (i>-1) ? s.substr(0, i) : s;
|
||||
};
|
||||
|
||||
var s = url.split("/");
|
||||
var lang = s[0];
|
||||
var module = stripExt(s[1]);
|
||||
var parseLineNo = s[1].match(/:(\d+)(-(\d+))?$/);
|
||||
|
||||
if (thing.state.current.equals(lang, module)) {
|
||||
if (parseLineNo) {
|
||||
thing.scrollToCodeLine(parseInt(parseLineNo[1]));
|
||||
}
|
||||
// else there's nothing to do!
|
||||
} else {
|
||||
if (parseLineNo != undefined)
|
||||
thing.loadFile(lang, module, parseInt(parseLineNo[1]));
|
||||
else
|
||||
thing.loadFile(lang, module);
|
||||
}
|
||||
}).listen('hash');
|
||||
});
|
||||
|
||||
function Thing() {
|
||||
var t = this;
|
||||
|
||||
// ===== State information =====
|
||||
|
||||
this.state = {
|
||||
index: undefined,
|
||||
lookup: {},
|
||||
loadCount: 0,
|
||||
recentCount: 5,
|
||||
language: undefined, // lang of drop-down
|
||||
current: { // current file
|
||||
language: undefined,
|
||||
module: undefined,
|
||||
set: function(lang, module) {
|
||||
t.state.current.language = lang;
|
||||
t.state.current.module = module;
|
||||
},
|
||||
equals: function(a, b) {
|
||||
if (!b)
|
||||
return (a == t.state.current.module);
|
||||
else
|
||||
return (a == t.state.current.language) && (b == t.state.current.module);
|
||||
}
|
||||
},
|
||||
title: "RGL Source Browser",
|
||||
urlPrefix: "/",
|
||||
defaultLangs: ['abstract','api','common','prelude']
|
||||
} ;
|
||||
|
||||
this.lookupModuleLanguage = function(module) {
|
||||
var l = t.state.lookup[module];
|
||||
if (l==undefined || l.length==0)
|
||||
return null;
|
||||
else if (l.length==1)
|
||||
return l[0];
|
||||
else {
|
||||
for (i in l) {
|
||||
if ($.inArray(l[i], t.state.defaultLangs))
|
||||
return l[i];
|
||||
}
|
||||
return l[0]; // no preferred default, just return first...
|
||||
}
|
||||
}
|
||||
this.lookupAllModuleLanguages = function(module) {
|
||||
return t.state.lookup[module];
|
||||
}
|
||||
|
||||
// ===== Utility/UI functions =====
|
||||
|
||||
this.showLoading = function(){
|
||||
t.state.loadCount++;
|
||||
$("#loading").show();
|
||||
}
|
||||
this.hideLoading = function(){
|
||||
t.state.loadCount = Math.max(t.state.loadCount-1, 0);
|
||||
if (t.state.loadCount == 0)
|
||||
$("#loading").hide();
|
||||
}
|
||||
|
||||
this.scrollToTop = function() {
|
||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||
}
|
||||
this.scrollToCodeLine = function(lineNo) {
|
||||
t.showPanel("#code", function() {
|
||||
// Find exact line, using the classes generated by google prettify
|
||||
try {
|
||||
var obj = $("#code pre li.L"+(lineNo%10)+":eq("+Math.floor(lineNo/10)+")").prev();
|
||||
var y = Math.max(obj.offset().top - obj.parent().offset().top - 75, 0);
|
||||
$("#code").parent().animate({ scrollTop: y }, "slow", function(){
|
||||
t.highlight(obj);
|
||||
});
|
||||
} catch (e) {}
|
||||
});
|
||||
}
|
||||
this.highlight = function(obj) {
|
||||
obj.css('background-color', "yellow");
|
||||
setTimeout(function(){
|
||||
obj.css('background-color', "");
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
this.clearScope = function(msg) {
|
||||
$('#scope #results').empty();
|
||||
t.updateScopeCount();
|
||||
if (msg) {
|
||||
$('#scope #results').html("<em>"+msg+"</em>");
|
||||
}
|
||||
}
|
||||
this.setScope = function(code) {
|
||||
$('#scope #results').html(code);
|
||||
}
|
||||
this.clearCode = function(msg) {
|
||||
$('#code pre').empty();
|
||||
if (msg) {
|
||||
$('#codes pre').html("<em>"+msg+"</em>");
|
||||
}
|
||||
}
|
||||
this.setCode = function(code) {
|
||||
$('#code pre').text(code);
|
||||
prettyPrint();
|
||||
}
|
||||
this.updateScopeCount = function(){
|
||||
$('#scope #count').text( $("#scope #results tr:visible").length );
|
||||
}
|
||||
this.updateAPICount = function(){
|
||||
$('#api #count').text( $("#api #results tr:visible").length );
|
||||
}
|
||||
|
||||
this.setLanguage = function(lang){
|
||||
t.state.language = lang;
|
||||
$("#languages select").val(lang);
|
||||
t.initModules(lang);
|
||||
}
|
||||
|
||||
// hash should be "#code"
|
||||
this.showPanel = function(hash, callback){
|
||||
t.showLoading();
|
||||
setTimeout(function(){
|
||||
$(".panel:visible").hide();
|
||||
$("a.tab").removeClass('active');
|
||||
$("a.tab[href='"+hash+"']").addClass('active');
|
||||
$(hash).show(0, callback);
|
||||
t.updateScopeCount();
|
||||
t.hideLoading();
|
||||
}, 200); // this ensures the loading displays
|
||||
}
|
||||
this.getPanel = function() {
|
||||
return $('.panel:visible').first();
|
||||
}
|
||||
|
||||
this.setTitle = function(s){
|
||||
$('#module_name').html(s);
|
||||
$('title').html(t.state.title + ": " + s);
|
||||
}
|
||||
|
||||
|
||||
// ===== Initialization =====
|
||||
|
||||
// Initialize the panels, tabs
|
||||
$("a.tab").click(function(){
|
||||
var panel = $(this).attr("href");
|
||||
t.showPanel(panel);
|
||||
return false;
|
||||
});
|
||||
t.showPanel("#scope");
|
||||
|
||||
// Load the index file and populate language & module lists
|
||||
$.ajax({
|
||||
url: "index.json",
|
||||
dataType: "json",
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
t.state.index = data;
|
||||
if (data['urlprefix']) t.state.urlPrefix = data['urlprefix'];
|
||||
|
||||
// Build language lookup index
|
||||
for (var lang in data['languages']) {
|
||||
for (var i in data['languages'][lang]) {
|
||||
var module = data['languages'][lang][i];
|
||||
if (!module) continue;
|
||||
if (!t.state.lookup[module]) t.state.lookup[module] = [];
|
||||
t.state.lookup[module].push(lang);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the language list
|
||||
var lang_select = $("<select>")
|
||||
.attr('id', 'language_select')
|
||||
.change(function(){
|
||||
t.setLanguage($(this).val());
|
||||
})
|
||||
.appendTo("#languages")
|
||||
var language_list = data['languages'];
|
||||
for (var i in language_list) {
|
||||
if (!i) continue;
|
||||
var lang = i;
|
||||
$('<option>')
|
||||
.html(lang)
|
||||
.appendTo(lang_select);
|
||||
}
|
||||
t.setLanguage("english");
|
||||
|
||||
// Module search box
|
||||
var module_search = $("<input>")
|
||||
.attr('id', 'module_search')
|
||||
.keyup(function(){
|
||||
t.searchModule($(this).val());
|
||||
})
|
||||
.appendTo("#languages");
|
||||
$("<a>")
|
||||
.attr('href','#')
|
||||
.click(t.clearSearchModule)
|
||||
.html("Clear")
|
||||
.appendTo("#languages");
|
||||
|
||||
// Recent modules
|
||||
var recent = $("<div>")
|
||||
.attr('id', 'recent')
|
||||
.appendTo("#languages");
|
||||
|
||||
// Initialize API results
|
||||
t.initAPI();
|
||||
|
||||
// Done
|
||||
t.hideLoading();
|
||||
},
|
||||
error: function(){
|
||||
t.hideLoading();
|
||||
alert("Error getting index. Try reloading page, or just give up.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// ===== Loading functionality =====
|
||||
|
||||
// Initialize the module list
|
||||
this.initModules = function(lang){
|
||||
t.state.index['languages'][lang] = t.state.index['languages'][lang].sort();
|
||||
$("#modules").empty();
|
||||
for (var i in t.state.index['languages'][lang]) {
|
||||
var module = t.state.index['languages'][lang][i];
|
||||
if (!module) continue;
|
||||
$('<a>')
|
||||
.html(module)
|
||||
.attr('href', "#"+lang+"/"+module+".gf")
|
||||
.appendTo("#modules");
|
||||
}
|
||||
}
|
||||
|
||||
// Load both scope & source for a file
|
||||
this.loadFile = function(lang, module, lineNo){
|
||||
t.setTitle(lang+"/"+module);
|
||||
t.state.current.set(lang, module);
|
||||
t.loadTagsFile(module);
|
||||
t.loadSourceFile(lang, module, lineNo);
|
||||
if ($('.tab.api').hasClass('active'))
|
||||
t.showPanel("#scope");
|
||||
t.addRecent(lang, module);
|
||||
}
|
||||
|
||||
// Add item to recent list
|
||||
this.addRecent = function(lang, module) {
|
||||
var full_module = lang+'/'+module;
|
||||
// If already there, do nothing
|
||||
if ($('#recent').text().indexOf(full_module) > -1) return;
|
||||
// Delete oldest if at limit
|
||||
if ($('#recent a').length >= t.state.recentCount) {
|
||||
$('#recent a').last().remove();
|
||||
}
|
||||
// Add it
|
||||
$('<a>')
|
||||
.html(full_module)
|
||||
.attr('href', "#"+lang+"/"+module+".gf")
|
||||
.prependTo("#recent");
|
||||
}
|
||||
|
||||
// Load a tags file
|
||||
this.loadTagsFile = function(module) {
|
||||
t.clearScope();
|
||||
t.showLoading();
|
||||
$.ajax({
|
||||
url: "tags/"+module+".gf-tags",
|
||||
type: "GET",
|
||||
dataType: "text",
|
||||
success: function(data){
|
||||
data = data.replace(/^(\S+)\s(\S+)\s(.+)?$/gm, function(a,b,c,d){
|
||||
var s = d.split("\t");
|
||||
if (c == "indir") {
|
||||
var module = s[2].substring(s[2].lastIndexOf('/')+1, s[2].lastIndexOf('.'));
|
||||
var lang = t.lookupModuleLanguage(module);
|
||||
var name = lang+"/"+module;
|
||||
var url = "#"+lang+"/"+module;
|
||||
var anchor = '<a href="'+url+'">'+name+'</a>';
|
||||
return '<tr class="indir" name="'+b+'"><th>'+b+'</th><td>'+c+'</td><td>'+s[0]+'</td><td>'+s[1]+'</td><td>'+anchor+'</td><td></td></tr>'
|
||||
} else {
|
||||
var bits = s[0].split("/"); // ["lib", "src", "english", "AdjectiveEng.gf:43-46"]
|
||||
var name = bits[3]+"/"+bits[4];
|
||||
var url = "#"+bits[3]+"/"+bits[4];
|
||||
var anchor = '<a href="'+url+'">'+name+'</a>';
|
||||
return '<tr class="local" name="'+b+'"><th>'+b+'</th><td>'+c+'</td><td></td><td></td><td>'+anchor+'</td><td>'+s[1]+'</td></tr>'
|
||||
}
|
||||
});
|
||||
t.setScope(data);
|
||||
t.runFilter();
|
||||
t.hideLoading();
|
||||
},
|
||||
error: function(data){
|
||||
t.clearScope("No scope available");
|
||||
t.hideLoading();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Load a source module
|
||||
this.loadSourceFile = function(lang, module, lineNo) {
|
||||
t.clearCode();
|
||||
t.showLoading();
|
||||
$.ajax({
|
||||
url: t.state.urlPrefix + "lib/src/"+lang+"/"+module+".gf",
|
||||
type: "GET",
|
||||
dataType: "text",
|
||||
success: function(data, status, xhr){
|
||||
t.setCode(data);
|
||||
t.hideLoading();
|
||||
if (lineNo) {
|
||||
t.scrollToCodeLine(lineNo);
|
||||
}
|
||||
},
|
||||
error: function(data){
|
||||
t.clearCode("No code available");
|
||||
t.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Which modules do we include for API?
|
||||
this.apiModules = [
|
||||
// api
|
||||
"Syntax",
|
||||
// "Constructors", "Cat", "Structural", "Combinators",
|
||||
// abstract
|
||||
// "Adjective",
|
||||
// "Adverb",
|
||||
// "Backward",
|
||||
// "Cat",
|
||||
// "Common",
|
||||
// "Compatibility",
|
||||
// "Conjunction",
|
||||
// "Extra",
|
||||
// "Grammar",
|
||||
// "Idiom",
|
||||
// "Lang",
|
||||
// "Lexicon",
|
||||
// "Noun",
|
||||
// "Numeral",
|
||||
// "NumeralTransfer",
|
||||
// "Phrase",
|
||||
// "Question",
|
||||
// "Relative",
|
||||
// "Sentence",
|
||||
// "Structural",
|
||||
// "Symbol",
|
||||
// "Tense",
|
||||
// "Text",
|
||||
// "Transfer",
|
||||
// "Verb",
|
||||
];
|
||||
this.initAPI = function() {
|
||||
t.showLoading();
|
||||
$('#api #results').empty();
|
||||
for (var i in t.apiModules) {
|
||||
var module = t.apiModules[i];
|
||||
$.ajax({
|
||||
url: "tags/"+module+".gf-tags",
|
||||
type: "GET",
|
||||
dataType: "text",
|
||||
success: function(data){
|
||||
data = data.replace(/^(\S+)\s(\S+)\s(.+)?$/gm, function(a,b,c,d){
|
||||
var out = '';
|
||||
var s = d.split("\t");
|
||||
if (c != "indir") {
|
||||
var type = s[1];
|
||||
if (type) {
|
||||
var bits = s[0].split("/"); // ["lib", "src", "english", "AdjectiveEng.gf:43-46"]
|
||||
var name = bits[3]+"/"+bits[4];
|
||||
var url = "#"+bits[3]+"/"+bits[4];
|
||||
var anchor = '<a href="'+url+'">'+name+'</a>';
|
||||
out += '<tr name="'+b+'"><th>'+b+'</th><td>'+c+'</td><td>'+anchor+'</td><td>'+s[1]+'</td></tr>'
|
||||
}
|
||||
}
|
||||
return out;
|
||||
});
|
||||
$('#api #results').append($(data));
|
||||
$("#api #results tr").removeClass('odd');
|
||||
$("#api #results tr:odd").addClass('odd');
|
||||
$('#api #count').text( $("#api #results tr").length );
|
||||
},
|
||||
error: function(data){
|
||||
console.log("Error loading tags file: " + module);
|
||||
},
|
||||
});
|
||||
}
|
||||
t.hideLoading();
|
||||
}
|
||||
|
||||
// ===== Module search =====
|
||||
|
||||
this.searchModule = function(s) {
|
||||
if (!s) {
|
||||
return t.clearSearchModule();
|
||||
}
|
||||
$('#language_select').hide();
|
||||
$("#modules").empty();
|
||||
for (var lang in t.state.index['languages']) {
|
||||
var modules = t.state.index['languages'][lang];
|
||||
for (var j in modules) {
|
||||
var module = modules[j];
|
||||
var full_module = lang+'/'+module;
|
||||
if (!module) continue;
|
||||
if (full_module.toLowerCase().indexOf(s.toLowerCase())==-1) continue;
|
||||
$('<a>')
|
||||
.html(full_module)
|
||||
.attr('href', "#"+lang+"/"+module+".gf")
|
||||
.appendTo("#modules");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.clearSearchModule = function() {
|
||||
$('#module_search').val('');
|
||||
$('#language_select').show();
|
||||
t.setLanguage(t.state.language);
|
||||
return false;
|
||||
};
|
||||
|
||||
// ===== Filtering of scope info =====
|
||||
|
||||
// Custom selector
|
||||
$.expr[':'].match = function(a,b,c) {
|
||||
var obj = $(a);
|
||||
var needle = c[3];
|
||||
var haystack = obj.attr('name');
|
||||
if (haystack == undefined)
|
||||
return false;
|
||||
if ($("#scope #case_sensitive").is(":checked"))
|
||||
return haystack.indexOf(needle)>=0;
|
||||
else
|
||||
return haystack.toLowerCase().indexOf(needle.toLowerCase())>=0;
|
||||
};
|
||||
|
||||
this.runFilter = function() {
|
||||
t.showLoading();
|
||||
$("#scope #results tr").removeClass('odd');
|
||||
var s = $("#scope #search").val();
|
||||
try {
|
||||
if (s) {
|
||||
$("#scope #results tr").hide();
|
||||
$("#scope #results tr:match(\""+s+"\")").show();
|
||||
} else {
|
||||
$("#scope #results tr").show();
|
||||
}
|
||||
if ($("#scope #show_local").is(":checked") ) {
|
||||
$("#scope #results tr.indir").hide();
|
||||
}
|
||||
} catch (error) {
|
||||
alert(error.message);
|
||||
}
|
||||
t.updateScopeCount();
|
||||
$("#scope #results tr:visible:odd").addClass('odd');
|
||||
t.hideLoading();
|
||||
}
|
||||
|
||||
// Instant results
|
||||
this.prevSearch = $("#scope #search").val();
|
||||
$("#scope #search").keyup(function(){
|
||||
var s = $("#scope #search").val();
|
||||
if (s!=t.prevSearch) {
|
||||
t.runFilter();
|
||||
t.prevSearch = s;
|
||||
}
|
||||
});
|
||||
|
||||
$("#scope #search").keypress(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) { // Enter
|
||||
t.runFilter();
|
||||
}
|
||||
});
|
||||
$("#scope #clear").click(function(){
|
||||
$("#scope #search")
|
||||
.val('')
|
||||
.focus()
|
||||
t.runFilter();
|
||||
});
|
||||
$("#scope #case_sensitive").change(t.runFilter);
|
||||
$("#scope #show_all").change(t.runFilter);
|
||||
$("#scope #show_local").change(t.runFilter);
|
||||
|
||||
// ===== API search =====
|
||||
|
||||
// Custom selector
|
||||
$.expr[':'].matchAPI = function(a,b,c) {
|
||||
var obj = $(a); // tr
|
||||
var ident = $(obj.children().get(0)).text();
|
||||
var type = $(obj.children().get(3)).text();
|
||||
var needle = c[3];
|
||||
var match_ident = ident.toLowerCase().indexOf(needle.toLowerCase())>=0;
|
||||
var match_type = type.toLowerCase().indexOf(needle.toLowerCase())>=0;
|
||||
// if ($("#scope #case_sensitive").is(":checked"))
|
||||
// return haystack.indexOf(needle)>=0;
|
||||
// else
|
||||
return match_ident || match_type ;
|
||||
};
|
||||
|
||||
this.runFilterAPI = function() {
|
||||
t.showLoading();
|
||||
$("#api #results tr").removeClass('odd');
|
||||
var s = $("#api #search").val();
|
||||
try {
|
||||
if (s) {
|
||||
$("#api #results tr").hide();
|
||||
$("#api #results tr:matchAPI(\""+s+"\")").show();
|
||||
} else {
|
||||
$("#api #results tr").show();
|
||||
}
|
||||
} catch (error) {
|
||||
alert(error.message);
|
||||
}
|
||||
t.updateAPICount();
|
||||
$("#api #results tr:visible:odd").addClass('odd');
|
||||
t.hideLoading();
|
||||
}
|
||||
|
||||
// Instant results
|
||||
this.prevAPISearch = $("#api #search").val();
|
||||
$("#api #search").keyup(function(){
|
||||
var s = $("#api #search").val();
|
||||
if (s!=t.prevAPISearch) {
|
||||
t.runFilterAPI();
|
||||
t.prevAPISearch = s;
|
||||
}
|
||||
});
|
||||
|
||||
$("#api #search").keypress(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) { // Enter
|
||||
t.runFilterAPI();
|
||||
}
|
||||
});
|
||||
$("#api #clear").click(function(){
|
||||
$("#api #search")
|
||||
.val('')
|
||||
.focus();
|
||||
t.runFilterAPI();
|
||||
});
|
||||
};
|
||||
@@ -1,198 +0,0 @@
|
||||
/*
|
||||
GF RGL Browser
|
||||
John J. Camiller, 2012
|
||||
*/
|
||||
|
||||
body {
|
||||
background: url('http://cloud.grammaticalframework.org/minibar/brushed-metal.png') #ddd;
|
||||
margin:0;
|
||||
font: 13px sans-serif;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4 {
|
||||
font-family: sans-serif;
|
||||
color: #303030;
|
||||
text-shadow: rgba(0,0,0,0.25) 2px 2px 5px;
|
||||
}
|
||||
|
||||
header {
|
||||
}
|
||||
header img {
|
||||
height:2em;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
header h1 {
|
||||
margin:0 1em 0 0;
|
||||
font-size:110%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ui-layout-north {
|
||||
background:none;
|
||||
border:none;
|
||||
}
|
||||
.ui-layout-resizer-north {
|
||||
}
|
||||
.ui-layout-resizer {
|
||||
background:none;
|
||||
}
|
||||
.ui-layout-toggler {
|
||||
background:#999;
|
||||
}
|
||||
|
||||
.ui-layout-center,
|
||||
.ui-layout-west {
|
||||
}
|
||||
|
||||
#language_select {
|
||||
width:100%;
|
||||
}
|
||||
#recent {
|
||||
border-bottom:1px #999 solid;
|
||||
}
|
||||
#recent a {
|
||||
color: #999;
|
||||
}
|
||||
#recent a,
|
||||
#modules a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
margin: 2px 5px;
|
||||
}
|
||||
#recent a:hover,
|
||||
#modules a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
#tabbar {
|
||||
display:inline-block;
|
||||
}
|
||||
#tabbar .module {
|
||||
border-left: 1px dotted #333;
|
||||
border-right: 1px dotted #333;
|
||||
padding:0.5em 0.2em 0.5em 1em;
|
||||
margin-right:0.7em;
|
||||
}
|
||||
#module_name {
|
||||
font-weight: bold;
|
||||
margin-right:0.7em;
|
||||
}
|
||||
.tab {
|
||||
cursor:pointer;
|
||||
padding:0.5em 0.5em;
|
||||
margin-right:0.5em;
|
||||
display:inline-block;
|
||||
text-transform:capitalize;
|
||||
text-decoration:none;
|
||||
font-family:sans-serif;
|
||||
font-weight:bold;
|
||||
background: #aaa;
|
||||
color: white;
|
||||
border-radius: 0.5em;
|
||||
line-height: 1;
|
||||
}
|
||||
.tab:hover {
|
||||
background: #666;
|
||||
}
|
||||
.tab.active {
|
||||
background: #222;
|
||||
}
|
||||
|
||||
#loading {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
white-space: nowrap;
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #F0C36D;
|
||||
background: #F9EDBE;
|
||||
color: #333;
|
||||
vertical-align: top;
|
||||
font: bold 13px sans-serif;
|
||||
z-index:100;
|
||||
}
|
||||
.scope {
|
||||
}
|
||||
.code {
|
||||
}
|
||||
.api {
|
||||
}
|
||||
.help {
|
||||
}
|
||||
|
||||
a.synopsis {
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=') center right no-repeat;
|
||||
padding-right:14px;
|
||||
}
|
||||
input#search {
|
||||
font-family:monospace;
|
||||
width:25em;
|
||||
padding:0.25em;
|
||||
background:#eee;
|
||||
}
|
||||
|
||||
.panel {
|
||||
}
|
||||
.panel.code,
|
||||
.panel.api,
|
||||
.panel.help {
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
#controls {
|
||||
border-bottom: 1px solid #CCC;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
#results {
|
||||
font: 12px monospace;
|
||||
width:100%;
|
||||
margin-top:1em;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
/* this is set in code */
|
||||
#results tr.odd {
|
||||
background:ghostwhite;
|
||||
}
|
||||
#results tr.indir {
|
||||
font-style:italic;
|
||||
}
|
||||
#results tr.local td:nth-child(2) {
|
||||
font-weight:bold;
|
||||
}
|
||||
#results th {
|
||||
text-align:left;
|
||||
}
|
||||
#results th, #results td {
|
||||
padding:0.4em;
|
||||
/*
|
||||
border-style: solid;
|
||||
border-width: 0 0 1px 0;
|
||||
border-color: #eee;
|
||||
*/
|
||||
background:none;
|
||||
white-space:nowrap;
|
||||
}
|
||||
#results td:nth-child(6) {
|
||||
white-space:normal;
|
||||
}
|
||||
#code pre {
|
||||
margin:0;
|
||||
color:#000;
|
||||
font: 12px monospace;
|
||||
}
|
||||
#code ol.linenums {
|
||||
color: #aaa;
|
||||
margin: 0;
|
||||
}
|
||||
dt {
|
||||
font-weight:bold;
|
||||
}
|
||||
footer {
|
||||
padding:3px 6px;
|
||||
color:#333;
|
||||
font-size:13px;
|
||||
text-align:right;
|
||||
position:absolute;
|
||||
top:0; right:0;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<map id="categories" name="categories">
|
||||
<area shape="poly" href="#Text" title="Text" alt="" coords="690,23 688,17 685,12 679,8 672,5 664,4 656,5 649,8 643,12 640,17 638,23 640,29 643,34 649,38 656,41 664,42 672,41 679,38 685,34 688,29"/>
|
||||
<area shape="poly" href="#Punct" title="Punct" alt="" coords="657,95 656,89 652,84 646,80 638,77 629,76 620,77 612,80 606,84 602,89 600,95 602,101 606,106 612,110 620,113 629,114 638,113 646,110 652,106 656,101"/>
|
||||
<area shape="poly" href="#Phr" title="Phr" alt="" coords="726,95 725,89 721,84 715,80 708,77 700,76 692,77 685,80 679,84 676,89 675,95 676,101 679,106 685,110 692,113 700,114 708,113 715,110 721,106 725,101"/>
|
||||
<area shape="poly" href="#PConj" title="PConj" alt="" coords="658,167 656,162 652,156 645,152 637,150 628,149 619,150 610,152 604,156 600,162 598,167 600,173 604,179 610,183 619,185 628,186 637,185 645,183 652,179 656,173"/>
|
||||
<area shape="poly" href="#Utt" title="Utt" alt="" coords="726,167 725,162 721,156 715,152 708,150 700,149 692,150 685,152 679,156 676,162 675,167 676,173 679,179 685,183 692,185 700,186 708,185 715,183 721,179 725,173"/>
|
||||
<area shape="poly" href="#Voc" title="Voc" alt="" coords="794,167 793,162 789,156 784,152 777,150 769,149 761,150 754,152 748,156 744,162 743,167 744,173 748,179 754,183 761,185 769,186 777,185 784,183 789,179 793,173"/>
|
||||
<area shape="poly" href="#Imp" title="Imp" alt="" coords="657,240 656,234 652,229 647,225 640,222 632,221 624,222 617,225 611,229 607,234 606,240 607,246 611,251 617,255 624,258 632,259 640,258 647,255 652,251 656,246"/>
|
||||
<area shape="poly" href="#S" title="S" alt="" coords="726,240 725,234 721,229 715,225 708,223 700,222 692,223 685,225 679,229 676,234 675,240 676,245 679,250 685,254 692,257 700,258 708,257 715,254 721,250 725,245"/>
|
||||
<area shape="poly" href="#QS" title="QS" alt="" coords="870,240 868,234 865,229 859,225 852,222 844,221 836,222 829,225 823,229 819,234 818,240 819,246 823,251 829,255 836,258 844,259 852,258 859,255 865,251 868,246"/>
|
||||
<area shape="poly" href="#Tense" title="Tense" alt="" coords="521,312 519,306 515,301 509,297 501,294 492,293 483,294 475,297 469,301 464,306 463,312 464,318 469,323 475,327 483,330 492,331 501,330 509,327 515,323 519,318"/>
|
||||
<area shape="poly" href="#Ant" title="Ant" alt="" coords="589,312 588,306 584,301 578,297 571,294 563,293 555,294 548,297 542,301 539,306 538,312 539,318 542,323 548,327 555,330 563,331 571,330 578,327 584,323 588,318"/>
|
||||
<area shape="poly" href="#Pol" title="Pol" alt="" coords="657,312 656,306 652,301 647,297 640,294 632,293 624,294 617,297 611,301 607,306 606,312 607,318 611,323 617,327 624,330 632,331 640,330 647,327 652,323 656,318"/>
|
||||
<area shape="poly" href="#Cl" title="Cl" alt="" coords="726,312 725,306 721,301 715,297 708,294 700,293 692,294 685,297 679,301 676,306 675,312 676,318 679,323 685,327 692,330 700,331 708,330 715,327 721,323 725,318"/>
|
||||
<area shape="poly" href="#ListS" title="ListS" alt="" coords="798,312 797,306 793,301 787,297 779,294 771,293 762,294 754,297 748,301 745,306 743,312 745,318 748,323 754,327 762,330 771,331 779,330 787,327 793,323 797,318"/>
|
||||
<area shape="poly" href="#Conj" title="Conj" alt="" coords="867,312 866,306 862,301 856,297 849,294 841,293 833,294 826,297 820,301 816,306 815,312 816,318 820,323 826,327 833,330 841,331 849,330 856,327 862,323 866,318"/>
|
||||
<area shape="poly" href="#QCl" title="QCl" alt="" coords="945,312 943,306 940,301 934,297 927,294 919,293 911,294 904,297 898,301 895,306 893,312 895,318 898,323 904,327 911,330 919,331 927,330 934,327 940,323 943,318"/>
|
||||
<area shape="poly" href="#NP" title="NP" alt="" coords="270,384 269,379 265,373 260,369 252,366 244,366 237,366 229,369 224,373 220,379 219,384 220,390 224,395 229,400 237,402 244,403 252,402 260,400 265,395 269,390"/>
|
||||
<area shape="poly" href="#VP" title="VP" alt="" coords="636,384 634,379 631,373 625,369 618,366 610,366 602,366 595,369 589,373 585,379 584,384 585,390 589,395 595,400 602,402 610,403 618,402 625,400 631,395 634,390"/>
|
||||
<area shape="rect" href="#Adv" title="Adv" alt="" coords="702,367,753,401"/>
|
||||
<area shape="poly" href="#Predet" title="Predet" alt="" coords="65,457 63,451 59,446 52,441 44,439 34,438 25,439 16,441 10,446 5,451 4,457 5,462 10,468 16,472 25,475 34,475 44,475 52,472 59,468 63,462"/>
|
||||
<area shape="poly" href="#Pron" title="Pron" alt="" coords="133,457 132,451 129,446 123,441 116,439 108,438 99,439 92,441 86,446 83,451 82,457 83,462 86,468 92,472 99,475 108,475 116,475 123,472 129,468 132,462"/>
|
||||
<area shape="rect" href="#PN" title="PN" alt="" coords="150,440,202,474"/>
|
||||
<area shape="poly" href="#Det" title="Det" alt="" coords="270,457 269,451 265,446 260,441 252,439 244,438 237,439 229,441 224,446 220,451 219,457 220,462 224,468 229,472 237,475 244,475 252,475 260,472 265,468 269,462"/>
|
||||
<area shape="poly" href="#CN" title="CN" alt="" coords="339,457 337,451 334,446 328,441 321,439 313,438 305,439 298,441 292,446 289,451 287,457 289,462 292,468 298,472 305,475 313,475 321,475 328,472 334,468 337,462"/>
|
||||
<area shape="poly" href="#ListNP" title="ListNP" alt="" coords="420,457 419,451 414,446 407,441 398,439 388,438 378,439 369,441 362,446 358,451 356,457 358,462 362,468 369,472 378,475 388,475 398,475 407,472 414,468 419,462"/>
|
||||
<area shape="poly" href="#AdV" title="AdV" alt="" coords="489,457 488,451 484,446 479,441 471,439 463,438 455,439 448,441 442,446 439,451 437,457 439,462 442,468 448,472 455,475 463,475 471,475 479,472 484,468 488,462"/>
|
||||
<area shape="rect" href="#V" title="V,V2,V3,V*,V2*" alt="" coords="506,440,616,474"/>
|
||||
<area shape="poly" href="#AP" title="AP" alt="" coords="685,457 684,451 680,446 674,441 667,439 659,438 651,439 644,441 639,446 635,451 634,457 635,462 639,468 644,472 651,475 659,475 667,475 674,472 680,468 684,462"/>
|
||||
<area shape="poly" href="#Subj" title="Subj" alt="" coords="753,457 752,451 749,446 743,441 736,439 728,438 720,439 713,441 707,446 703,451 702,457 703,462 707,468 713,472 720,475 728,475 736,475 743,472 749,468 752,462"/>
|
||||
<area shape="poly" href="#ListAdj" title="ListAdj" alt="" coords="837,457 836,451 831,446 824,441 814,439 804,438 794,439 784,441 777,446 772,451 770,457 772,462 777,468 784,472 794,475 804,475 814,475 824,472 831,468 836,462"/>
|
||||
<area shape="poly" href="#Art" title="Art" alt="" coords="90,529 89,523 85,518 80,514 73,511 65,510 57,511 50,514 44,518 40,523 39,529 40,535 44,540 50,544 57,547 65,548 73,547 80,544 85,540 89,535"/>
|
||||
<area shape="poly" href="#Quant" title="Quant" alt="" coords="166,529 165,523 161,518 154,514 146,511 137,510 128,511 120,514 113,518 109,523 108,529 109,535 113,540 120,544 128,547 137,548 146,547 154,544 161,540 165,535"/>
|
||||
<area shape="poly" href="#Num" title="Num" alt="" coords="237,529 235,523 232,518 226,514 218,511 210,510 202,511 195,514 189,518 185,523 184,529 185,535 189,540 195,544 202,547 210,548 218,547 226,544 232,540 235,535"/>
|
||||
<area shape="poly" href="#Ord" title="Ord" alt="" coords="305,529 304,523 300,518 295,514 288,511 280,510 272,511 265,514 259,518 255,523 254,529 255,535 259,540 265,544 272,547 280,548 288,547 295,544 300,540 304,535"/>
|
||||
<area shape="rect" href="#N" title="N,N2,N3" alt="" coords="323,512,387,546"/>
|
||||
<area shape="poly" href="#RS" title="RS" alt="" coords="456,529 454,523 451,518 445,514 438,511 430,510 422,511 415,514 409,518 406,523 404,529 406,535 409,540 415,544 422,547 430,548 438,547 445,544 451,540 454,535"/>
|
||||
<area shape="poly" href="#Card" title="Card" alt="" coords="236,601 235,595 231,590 226,586 218,583 210,582 202,583 195,586 189,590 186,595 184,601 186,607 189,612 195,616 202,619 210,620 218,619 226,616 231,612 235,607"/>
|
||||
<area shape="poly" href="#Numeral" title="Numeral,Digits" alt="" coords="216,674 214,668 206,662 194,658 179,656 162,655 145,656 130,658 118,662 110,668 107,674 110,679 118,685 130,689 145,691 162,692 179,691 194,689 206,685 214,679"/>
|
||||
<area shape="poly" href="#AdN" title="AdN" alt="" coords="285,674 283,668 280,662 274,658 267,656 259,655 251,656 244,658 238,662 234,668 233,674 234,679 238,685 244,689 251,691 259,692 267,691 274,689 280,685 283,679"/>
|
||||
<area shape="poly" href="#CAdv" title="CAdv" alt="" coords="288,746 286,740 282,735 276,731 268,728 259,727 250,728 242,731 235,735 231,740 230,746 231,752 235,757 242,761 250,764 259,765 268,764 276,761 282,757 286,752"/>
|
||||
<area shape="poly" href="#RCl" title="RCl" alt="" coords="456,601 454,595 451,590 445,586 438,583 430,582 422,583 415,586 409,590 406,595 404,601 406,607 409,612 415,616 422,619 430,620 438,619 445,616 451,612 454,607"/>
|
||||
<area shape="poly" href="#AdA" title="AdA" alt="" coords="617,529 615,523 612,518 606,514 599,511 591,510 583,511 576,514 570,518 566,523 565,529 566,535 570,540 576,544 583,547 591,548 599,547 606,544 612,540 615,535"/>
|
||||
<area shape="rect" href="#A" title="A, A2" alt="" coords="634,512,685,546"/>
|
||||
<area shape="poly" href="#ListAP" title="ListAP" alt="" coords="767,529 765,523 760,518 753,514 744,511 734,510 725,511 716,514 708,518 704,523 702,529 704,535 708,540 716,544 725,547 734,548 744,547 753,544 760,540 765,535"/>
|
||||
<area shape="poly" href="#IP" title="IP" alt="" coords="895,384 894,379 890,373 885,369 877,366 870,366 862,366 854,369 849,373 845,379 844,384 845,390 849,395 854,400 862,402 870,403 877,402 885,400 890,395 894,390"/>
|
||||
<area shape="poly" href="#IAdv" title="IAdv" alt="" coords="966,384 965,379 961,373 955,369 947,366 939,366 931,366 923,369 917,373 913,379 912,384 913,390 917,395 923,400 931,402 939,403 947,402 955,400 961,395 965,390"/>
|
||||
<area shape="poly" href="#ClSlash" title="ClSlash" alt="" coords="1050,384 1048,379 1043,373 1036,369 1026,366 1016,366 1006,366 996,369 989,373 984,379 982,384 984,390 989,395 996,400 1006,402 1016,403 1026,402 1036,400 1043,395 1048,390"/>
|
||||
<area shape="poly" href="#IDet" title="IDet" alt="" coords="906,457 904,451 901,446 895,441 888,439 880,438 872,439 865,441 859,446 856,451 854,457 856,462 859,468 865,472 872,475 880,475 888,475 895,472 901,468 904,462"/>
|
||||
<area shape="poly" href="#VPSlash" title="VPSlash" alt="" coords="1052,457 1050,451 1045,446 1037,441 1027,439 1016,438 1005,439 995,441 987,446 982,451 980,457 982,462 987,468 995,472 1005,475 1016,475 1027,475 1037,472 1045,468 1050,462"/>
|
||||
<area shape="poly" href="#IQuant" title="IQuant" alt="" coords="912,529 910,523 906,518 899,514 890,511 880,510 870,511 861,514 854,518 850,523 848,529 850,535 854,540 861,544 870,547 880,548 890,547 899,544 906,540 910,535"/>
|
||||
<area shape="poly" href="#RP" title="RP" alt="" coords="456,674 454,668 451,662 445,658 438,656 430,655 422,656 415,658 409,662 406,668 404,674 406,679 409,685 415,689 422,691 430,692 438,691 445,689 451,685 454,679"/>
|
||||
</map>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB |
BIN
doc/editor.png
BIN
doc/editor.png
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
19
doc/gfdoc/Makefile
Normal file
19
doc/gfdoc/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
TMP=tmp.html
|
||||
TEMPLATE=../synopsis/template.html
|
||||
ROOT=../..
|
||||
|
||||
TITLE=$(shell head -n 1 sources.txt)
|
||||
sources.html: sources.txt $(TEMPLATE)
|
||||
txt2tags --target=html --no-headers --quiet --outfile=$@ --infile=$<
|
||||
pandoc \
|
||||
--from=html \
|
||||
--to=html5 \
|
||||
--standalone \
|
||||
--template=$(TEMPLATE) \
|
||||
--metadata='title:"$(TITLE)"' \
|
||||
--variable='lang:en' \
|
||||
--variable='rel-root:$(ROOT)/..' \
|
||||
--output=$(TMP) \
|
||||
$@
|
||||
mv $(TMP) $@
|
||||
sed -i.bak "s/<table>/<table class=\"table w-auto\">/" $@ && rm "$@.bak"
|
||||
@@ -1,183 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.org">
|
||||
<TITLE>More modules in the GF Resource Grammar Library</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<CENTER>
|
||||
<H1>More modules in the GF Resource Grammar Library</H1>
|
||||
</CENTER>
|
||||
|
||||
<P>
|
||||
<A HREF="../synopsis.html">back to synopsis</A>
|
||||
</P>
|
||||
|
||||
<H2>Extra syntax modules</H2>
|
||||
|
||||
<P>
|
||||
These modules give language-specific extra constructs not available via the common API.
|
||||
</P>
|
||||
<P>
|
||||
<A HREF="../../src/abstract/Extra.gf">common repository</A>
|
||||
<A HREF="../../src/romance/ExtraRomanceAbs.gf">Romance (Cat, Fre, Ita, Spa)</A>
|
||||
<A HREF="../../src/scandinavian/ExtraScandAbs.gf">Scandinavian (Dan, Nor, Swe)</A>
|
||||
</P>
|
||||
<P>
|
||||
<A HREF="../../src/afrikaans/ExtraAfrAbs.gf">Afrikaans</A>
|
||||
<A HREF="../../src/bulgarian/ExtraBulAbs.gf">Bulgarian</A>
|
||||
<A HREF="../../src/catalan/ExtraCatAbs.gf">Catalan</A>
|
||||
<A HREF="../../src/danish/ExtraDanAbs.gf">Danish</A>
|
||||
<A HREF="../../src/dutch/ExtraDutAbs.gf">Dutch</A>
|
||||
<A HREF="../../src/english/ExtraEngAbs.gf">English</A>
|
||||
<A HREF="../../src/finnish/ExtraFinAbs.gf">Finnish</A>
|
||||
<A HREF="../../src/french/ExtraFreAbs.gf">French</A>
|
||||
<A HREF="../../src/german/ExtraGerAbs.gf">German</A>
|
||||
<A HREF="../../src/italian/ExtraItaAbs.gf">Italian</A>
|
||||
<A HREF="../../src/norwegian/ExtraNorAbs.gf">Norwegian</A>
|
||||
<A HREF="../../src/persian/ExtraPesAbs.gf">Persian</A>
|
||||
<A HREF="../../src/polish/ExtraPolAbs.gf">Polish</A>
|
||||
<A HREF="../../src/punjabi/ExtraPnbAbs.gf">Punjabi</A>
|
||||
<A HREF="../../src/romanian/ExtraRonAbs.gf">Romanian</A>
|
||||
<A HREF="../../src/russian/ExtraRusAbs.gf">Russian</A>
|
||||
<A HREF="../../src/spanish/ExtraSpaAbs.gf">Spanish</A>
|
||||
<A HREF="../../src/swedish/ExtraSweAbs.gf">Swedish</A>
|
||||
</P>
|
||||
|
||||
<H2>Irregular verbs and other words</H2>
|
||||
|
||||
<P>
|
||||
These modules give lists of irregular words, mostly verbs. Their completeness varies.
|
||||
</P>
|
||||
<P>
|
||||
<A HREF="../../src/catalan/IrregCatAbs.gf">Catalan</A>
|
||||
<A HREF="../../src/danish/IrregDanAbs.gf">Danish</A>
|
||||
<A HREF="../../src/dutch/IrregDutAbs.gf">Dutch</A>
|
||||
<A HREF="../../src/english/IrregEngAbs.gf">English</A>
|
||||
<A HREF="../../src/french/IrregFreAbs.gf">French</A>
|
||||
<A HREF="../../src/german/IrregGerAbs.gf">German</A>
|
||||
<A HREF="../../src/norwegian/IrregNorAbs.gf">Norwegian</A>
|
||||
<A HREF="../../src/spanish/IrregSpaAbs.gf">Spanish</A>
|
||||
<A HREF="../../src/swedish/IrregSweAbs.gf">Swedish</A>
|
||||
<A HREF="../../src/turkish/IrregTurAbs.gf">Turkish</A>
|
||||
</P>
|
||||
|
||||
<H2>Large-scale dictionaries</H2>
|
||||
|
||||
<P>
|
||||
These morphological dictionaries are extracted from open source lexica by using the resource grammar paradigms. The figures give the approximate number of lemmas.
|
||||
</P>
|
||||
<P>
|
||||
<A HREF="../../src/bulgarian/DictBulAbs.gf">Bulgarian</A> 53k
|
||||
<A HREF="../../src/english/DictEngAbs.gf">English</A> 43k
|
||||
<A HREF="../../src/finnish/DictFinAbs.gf">Finnish</A> 42k
|
||||
<A HREF="../../src/french/DictFreAbs.gf">French</A> 92k
|
||||
<A HREF="../../src/swedish/DictSweAbs.gf">Swedish</A> 43k
|
||||
<A HREF="../../src/turkish/DictTurAbs.gf">Turkish</A> 24k
|
||||
</P>
|
||||
|
||||
<H2>Abstract Syntax Modules</H2>
|
||||
|
||||
<P>
|
||||
These modules are for internal use of resource grammarians, but the comments give some more linguistic explanation of the different constructs.
|
||||
</P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="4">
|
||||
<TR>
|
||||
<TH>module</TH>
|
||||
<TH>contents</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Adjective.html">Adjective</A></TD>
|
||||
<TD>constructors for A, AP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Adverb.html">Adverb</A></TD>
|
||||
<TD>constructors for Adv, AdV</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Cat.html">Cat</A></TD>
|
||||
<TD>lincats of all categories</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Common.html">Common</A></TD>
|
||||
<TD>default lincats for string categories</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Conjunction.html">Conjunction</A></TD>
|
||||
<TD>coordination rules</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Extra.html">Extra</A></TD>
|
||||
<TD>constructs available in some languages only</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Grammar.html">Grammar</A></TD>
|
||||
<TD>everything except content lexicon</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Idiom.html">Idiom</A></TD>
|
||||
<TD>idiomatic constructions</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Lang.html">Lang</A></TD>
|
||||
<TD>everything (Grammar and Lexicon)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Lexicon.html">Lexicon</A></TD>
|
||||
<TD>content word lexicon</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Noun.html">Noun</A></TD>
|
||||
<TD>constructors for NP, CN, Det</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Numeral.html">Numeral</A></TD>
|
||||
<TD>constructors for Numeral and Digits</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Phrase.html">Phrase</A></TD>
|
||||
<TD>constructors for Phr, Utt</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Question.html">Question</A></TD>
|
||||
<TD>constructors for QS, QCl, IP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Relative.html">Relative</A></TD>
|
||||
<TD>constructors for RS, RCl, RP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Sentence.html">Sentence</A></TD>
|
||||
<TD>constructors for S, Cl, SC</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Structural.html">Structural</A></TD>
|
||||
<TD>structural word lexicon</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Symbol.html">Symbol</A></TD>
|
||||
<TD>mixtures of verbal and symbolic expressions</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Tense.html">Tense</A></TD>
|
||||
<TD>common API tense system</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Text.html">Text</A></TD>
|
||||
<TD>constructors for Tex</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="Verb.html">Verb</A></TD>
|
||||
<TD>constructors for VP, VPSlash, Comp</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<H2>The Module Dependency Tree</H2>
|
||||
|
||||
<P>
|
||||
<IMG ALIGN="middle" SRC="Syntax.png" BORDER="0" ALT="">
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
|
||||
<!-- cmdline: txt2tags -thtml sources.txt -->
|
||||
</BODY></HTML>
|
||||
@@ -3,33 +3,33 @@ More modules in the GF Resource Grammar Library
|
||||
|
||||
|
||||
|
||||
[back to synopsis ../synopsis.html]
|
||||
[Back to synopsis ../synopsis/index.html]
|
||||
|
||||
==Extra syntax modules==
|
||||
|
||||
These modules give language-specific extra constructs not available via the common API.
|
||||
|
||||
[common repository ../../src/abstract/Extra.gf]
|
||||
[Romance (Cat, Fre, Ita, Spa) ../../src/romance/ExtraRomanceAbs.gf]
|
||||
[Scandinavian (Dan, Nor, Swe) ../../src/scandinavian/ExtraScandAbs.gf]
|
||||
[common repository ../../src/abstract/Extra.gf]
|
||||
[Romance (Cat, Fre, Ita, Spa) ../../src/romance/ExtraRomanceAbs.gf]
|
||||
[Scandinavian (Dan, Nor, Swe) ../../src/scandinavian/ExtraScandAbs.gf]
|
||||
|
||||
[Afrikaans ../../src/afrikaans/ExtraAfrAbs.gf]
|
||||
[Bulgarian ../../src/bulgarian/ExtraBulAbs.gf]
|
||||
[Catalan ../../src/catalan/ExtraCatAbs.gf]
|
||||
[Danish ../../src/danish/ExtraDanAbs.gf]
|
||||
[Dutch ../../src/dutch/ExtraDutAbs.gf]
|
||||
[English ../../src/english/ExtraEngAbs.gf]
|
||||
[Finnish ../../src/finnish/ExtraFinAbs.gf]
|
||||
[French ../../src/french/ExtraFreAbs.gf]
|
||||
[German ../../src/german/ExtraGerAbs.gf]
|
||||
[Italian ../../src/italian/ExtraItaAbs.gf]
|
||||
[Norwegian ../../src/norwegian/ExtraNorAbs.gf]
|
||||
[Persian ../../src/persian/ExtraPesAbs.gf]
|
||||
[Polish ../../src/polish/ExtraPolAbs.gf]
|
||||
[Punjabi ../../src/punjabi/ExtraPnbAbs.gf]
|
||||
[Romanian ../../src/romanian/ExtraRonAbs.gf]
|
||||
[Russian ../../src/russian/ExtraRusAbs.gf]
|
||||
[Spanish ../../src/spanish/ExtraSpaAbs.gf]
|
||||
[Afrikaans ../../src/afrikaans/ExtraAfrAbs.gf]
|
||||
[Bulgarian ../../src/bulgarian/ExtraBulAbs.gf]
|
||||
[Catalan ../../src/catalan/ExtraCatAbs.gf]
|
||||
[Danish ../../src/danish/ExtraDanAbs.gf]
|
||||
[Dutch ../../src/dutch/ExtraDutAbs.gf]
|
||||
[English ../../src/english/ExtraEngAbs.gf]
|
||||
[Finnish ../../src/finnish/ExtraFinAbs.gf]
|
||||
[French ../../src/french/ExtraFreAbs.gf]
|
||||
[German ../../src/german/ExtraGerAbs.gf]
|
||||
[Italian ../../src/italian/ExtraItaAbs.gf]
|
||||
[Norwegian ../../src/norwegian/ExtraNorAbs.gf]
|
||||
[Persian ../../src/persian/ExtraPesAbs.gf]
|
||||
[Polish ../../src/polish/ExtraPolAbs.gf]
|
||||
[Punjabi ../../src/punjabi/ExtraPnbAbs.gf]
|
||||
[Romanian ../../src/romanian/ExtraRonAbs.gf]
|
||||
[Russian ../../src/russian/ExtraRusAbs.gf]
|
||||
[Spanish ../../src/spanish/ExtraSpaAbs.gf]
|
||||
[Swedish ../../src/swedish/ExtraSweAbs.gf]
|
||||
|
||||
|
||||
@@ -93,8 +93,3 @@ These modules are for internal use of resource grammarians, but the comments giv
|
||||
==The Module Dependency Tree==
|
||||
|
||||
[Syntax.png]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
doc/hovering.png
BIN
doc/hovering.png
Binary file not shown.
|
Before Width: | Height: | Size: 166 KiB |
267
doc/index.txt
267
doc/index.txt
@@ -1,267 +0,0 @@
|
||||
GF Resource Grammar Library v. 1.2
|
||||
Author: Aarne Ranta <aarne (at) cs.chalmers.se>
|
||||
Last update: %%date(%c)
|
||||
|
||||
% NOTE: this is a txt2tags file.
|
||||
% Create an html file from this file using:
|
||||
% txt2tags --toc -thtml index.txt
|
||||
|
||||
%!target:html
|
||||
|
||||
%!postproc(html): #BCEN <center>
|
||||
%!postproc(html): #ECEN </center>
|
||||
|
||||
|
||||
#BCEN
|
||||
|
||||
[10lang-large.png]
|
||||
|
||||
#ECEN
|
||||
|
||||
|
||||
The GF Resource Grammar Library defines the basic grammar of
|
||||
ten languages:
|
||||
Danish, English, Finnish, French, German,
|
||||
Italian, Norwegian, Russian, Spanish, Swedish.
|
||||
Still incomplete implementations for Arabic and Catalan are also
|
||||
included.
|
||||
|
||||
**New** in December 2007: Browsing the library by syntax editor
|
||||
[directly on the web ../../../demos/resource-api/editor.html].
|
||||
|
||||
|
||||
|
||||
|
||||
==Authors==
|
||||
|
||||
Inger Andersson and Therese Soderberg (Spanish morphology),
|
||||
Nicolas Barth and Sylvain Pogodalla (French verb list),
|
||||
Ali El Dada (Arabic modules),
|
||||
Magda Gerritsen and Ulrich Real (Russian paradigms and lexicon),
|
||||
Janna Khegai (Russian modules),
|
||||
Bjorn Bringert (many Swadesh lexica),
|
||||
Carlos Gonzalía (Spanish cardinals),
|
||||
Harald Hammarström (German morphology),
|
||||
Patrik Jansson (Swedish cardinals),
|
||||
Andreas Priesnitz (German lexicon),
|
||||
Aarne Ranta,
|
||||
Jordi Saludes (Catalan modules),
|
||||
Henning Thielemann (German lexicon).
|
||||
|
||||
|
||||
We are grateful for contributions and
|
||||
comments to several other people who have used this and
|
||||
the previous versions of the resource library, including
|
||||
Ludmilla Bogavac,
|
||||
Ana Bove,
|
||||
David Burke,
|
||||
Lauri Carlson,
|
||||
Gloria Casanellas,
|
||||
Karin Cavallin,
|
||||
Robin Cooper,
|
||||
Hans-Joachim Daniels,
|
||||
Elisabet Engdahl,
|
||||
Markus Forsberg,
|
||||
Kristofer Johannisson,
|
||||
Anni Laine,
|
||||
Hans Leiß,
|
||||
Peter Ljunglöf,
|
||||
Saara Myllyntausta,
|
||||
Wanjiku Ng'ang'a,
|
||||
Nadine Perera,
|
||||
Jordi Saludes.
|
||||
|
||||
|
||||
==License==
|
||||
|
||||
The GF Resource Grammar Library is open-source software licensed under
|
||||
GNU Lesser General Public License (LGPL). See the file [LICENSE ../LICENSE] for more
|
||||
details.
|
||||
|
||||
|
||||
==Scope==
|
||||
|
||||
Coverage, for each language:
|
||||
- complete morphology
|
||||
- lexicon of the ca. 100 most important structural words
|
||||
- test lexicon of ca. 300 content words (rough equivalents in each language)
|
||||
- list of irregular verbs (separately for each language)
|
||||
- representative fragment of syntax (cf. CLE (Core Language Engine))
|
||||
- rather flat semantics (cf. Quasi-Logical Form of CLE)
|
||||
|
||||
|
||||
Organization:
|
||||
- top-level (API) modules
|
||||
- Ground API + special-purpose APIs
|
||||
- "school grammar" concepts rather than advanced linguistic theory
|
||||
|
||||
|
||||
Presentation:
|
||||
- tool ``gfdoc`` for generating HTML from grammars
|
||||
- example collections
|
||||
|
||||
|
||||
==Location==
|
||||
|
||||
Assuming you have installed the libraries, you will find the precompiled
|
||||
``gfc`` and ``gfr`` files directly under ``$GF_LIB_PATH``, whose default
|
||||
value is ``/usr/local/share/GF/``. The precompiled subdirectories are
|
||||
```
|
||||
alltenses
|
||||
mathematical
|
||||
multimodal
|
||||
present
|
||||
```
|
||||
Do for instance
|
||||
```
|
||||
cd $GF_LIB_PATH
|
||||
gf alltenses/langs.gfcm
|
||||
|
||||
> p -cat=S -lang=LangEng "this grammar is too big" | tb
|
||||
```
|
||||
For more details, see the [Synopsis synopsis.html].
|
||||
|
||||
|
||||
==Compilation==
|
||||
|
||||
If you want to compile the library from scratch, use ``make`` in the root of
|
||||
the source directory:
|
||||
```
|
||||
cd GF/lib/resource-1.0
|
||||
make
|
||||
```
|
||||
The ``make`` procedure does not by default make Arabic and Catalan, but you
|
||||
can uncomment the relevant lines in ``Makefile`` to compile them.
|
||||
|
||||
|
||||
==Encoding==
|
||||
|
||||
Finnish, German, Romance, and Scandinavian languages are in isolatin-1.
|
||||
|
||||
Arabic and Russian are in UTF-8.
|
||||
|
||||
English is in pure ASCII.
|
||||
|
||||
The different encodings imply, unfortunately, that it is hard to get
|
||||
a nice view of all languages simultaneously. The easiest way to achieve this is
|
||||
to use ``gfeditor``, which automatically converts grammars to UTF-8.
|
||||
|
||||
|
||||
==Using the resource as library==
|
||||
|
||||
This API is accessible by both ``present`` and ``alltenses``. The modules you most often need are
|
||||
- ``Syntax``, the interface to syntactic structures
|
||||
- ``Syntax``//L//, the implementations of ``Syntax`` for each language //L//
|
||||
- ``Paradigms``//L//, the morphological paradigms for each language //L//
|
||||
|
||||
|
||||
The [Synopsis synopsis.html] gives examples on the typical usage of these
|
||||
modules.
|
||||
|
||||
|
||||
==Using the resource as top level grammar==
|
||||
|
||||
The following modules can be used for parsing and linearization. They are accessible from both
|
||||
``present`` and ``alltenses``.
|
||||
- ``Lang``//L// for each language //L//, implementing a common abstract syntax ``Lang``
|
||||
- ``Danish``, ``English``, etc, implementing ``Lang`` with language-specific extensions
|
||||
|
||||
|
||||
In addition, there is in both ``present`` and ``alltenses`` the file
|
||||
- ``langs.gfcm``, a package with precompiled ``Lang``//L// grammars
|
||||
|
||||
|
||||
A way to test and view the resource grammar is to load ``langs.gfcm`` either into ``gfeditor``
|
||||
or into the ``gf`` shell and perform actions such as syntax editing and treebank generation.
|
||||
For instance, the command
|
||||
```
|
||||
> p -lang=LangEng -cat=S "this grammar is too big" | tb
|
||||
```
|
||||
creates a treebank entry with translations of this sentence.
|
||||
|
||||
For parsing, currently only English and the Scandinavian languages are within the limits ofr
|
||||
reasonable resources. For other languages //L//, parsing with ``Lang``//L// will probably eat
|
||||
up the computer resources before finishing the parser generation.
|
||||
|
||||
|
||||
|
||||
==Accessing the lower level ground API==
|
||||
|
||||
The ``Syntax`` API is implemented in terms a bunch of ``abstract`` modules, which
|
||||
as of version 1.2 are mainly interesting for implementors of the resource.
|
||||
See the [documentation for version 1.1 index-1.1.html] for more details.
|
||||
|
||||
|
||||
==Known bugs and missing components==
|
||||
|
||||
Danish
|
||||
- the lexicon and chosen inflections are only partially verified
|
||||
|
||||
|
||||
English
|
||||
|
||||
|
||||
Finnish
|
||||
- wrong cases in some passive constructions
|
||||
|
||||
|
||||
French
|
||||
- multiple clitics (with V3) not always right
|
||||
- third person pronominal questions with inverted word order
|
||||
have wrong forms if "t" is required e.g.
|
||||
(e.g. "comment fera-t-il" becomes "comment fera il")
|
||||
|
||||
|
||||
German
|
||||
|
||||
|
||||
Italian
|
||||
- multiple clitics (with V3) not always right
|
||||
|
||||
|
||||
Norwegian
|
||||
- the lexicon and chosen inflections are only partially verified
|
||||
|
||||
|
||||
Russian
|
||||
- some functions missing
|
||||
- some regular paradigms are missing
|
||||
|
||||
|
||||
Spanish
|
||||
- multiple clitics (with V3) not always right
|
||||
- missing contractions with imperatives and clitics
|
||||
|
||||
|
||||
Swedish
|
||||
|
||||
|
||||
|
||||
|
||||
==More reading==
|
||||
|
||||
[Synopsis synopsis.html]. The concise guide to API v. 1.2.
|
||||
|
||||
[Grammars as Software Libraries gslt-sem-2006.html]. Slides
|
||||
with background and motivation for the resource grammar library.
|
||||
|
||||
[GF Resource Grammar Library Version 1.0 clt2006.html]. Slides
|
||||
giving an overview of the library and practical hints on its use.
|
||||
|
||||
[How to write resource grammars Resource-HOWTO.html]. Helps you
|
||||
start if you want to add another language to the library.
|
||||
|
||||
[Parametrized modules for Romance languages http://www.cs.chalmers.se/~aarne/geocal2006.pdf].
|
||||
Slides explaining some ideas in the implementation of
|
||||
French, Italian, and Spanish.
|
||||
|
||||
[Grammar writing by examples http://www.cs.chalmers.se/~aarne/slides/webalt-2005.pdf].
|
||||
Slides showing how linearization rules are written as strings parsable by the resource grammar.
|
||||
|
||||
[Multimodal Resource Grammars http://www.cs.chalmers.se/~aarne/slides/talk-edin2005.pdf].
|
||||
Slides showing how to use the multimodal resource library. N.B. the library
|
||||
examples are from ``multimodal/old``, which is a reduced-size API.
|
||||
|
||||
[GF Resource Grammar Library ../../../doc/resource.pdf] (pdf).
|
||||
Printable user manual with API documentation, for version 1.0.
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
Afrikaans
|
||||
Amharic
|
||||
Arabic
|
||||
Bulgarian
|
||||
Catalan
|
||||
Chinese
|
||||
Danish
|
||||
Dutch
|
||||
English
|
||||
Finnish
|
||||
French
|
||||
German
|
||||
Greek
|
||||
Hebrew
|
||||
Hindi
|
||||
Interlingua
|
||||
Japanese
|
||||
Italian
|
||||
Latin
|
||||
Latvian
|
||||
<li>Maltese
|
||||
Nepali
|
||||
Norwegian
|
||||
Persian
|
||||
Polish
|
||||
Punjabi
|
||||
Romanian
|
||||
Russian
|
||||
Sindhi
|
||||
Spanish
|
||||
Swahili
|
||||
Swedish
|
||||
Thai
|
||||
Turkish
|
||||
Urdu
|
||||
@@ -3,7 +3,7 @@ Aarne Ranta
|
||||
|
||||
|
||||
%!Encoding:utf8
|
||||
%!style(html): ../revealpopup.css
|
||||
%!style(html): revealpopup.css
|
||||
|
||||
%!postproc(tex) : "#BECE" "begin{center}"
|
||||
%!postproc(html) : "#BECE" "<center>"
|
||||
@@ -17,26 +17,26 @@ Also available for [Chinese gf-chinese.html] [Finnish gf-finnish.html] [French g
|
||||
|
||||
#HR
|
||||
|
||||
**Digital grammars** are grammars usable by computers, so that they can mechanically perform
|
||||
**Digital grammars** are grammars usable by computers, so that they can mechanically perform
|
||||
tasks like interpreting, producing, and translating languages. The **GF Resource Grammar Library**
|
||||
(RGL) is a set of digital grammars which, at the time of writing, covers 28 languages. These grammars
|
||||
are written in GF, **Grammatical Framework**, which is a programming language designed for
|
||||
writing digital grammars.
|
||||
writing digital grammars.
|
||||
|
||||
The grammars in the RGL have been written by linguists, computer scientists, and
|
||||
programmers who know the languages thoroughly, both in practice and in theory. Almost 50 persons from
|
||||
around the world have contributed to this work, and ongoing projects are expected to give us many new
|
||||
languages soon.
|
||||
languages soon.
|
||||
|
||||
The leading idea of the RGL is that different languages share large parts of their grammars, despite
|
||||
their observed differences. One important thing that is shared are the **categories**, that is, the
|
||||
types of words and expressions. For instance, every language in RGL has a category of **nouns**, but
|
||||
types of words and expressions. For instance, every language in RGL has a category of **nouns**, but
|
||||
what exactly a noun is varies from language to language. Thus English nouns have four forms
|
||||
(singular and plural, nominative and genitive, as in //house, houses, house's, houses'//)
|
||||
(singular and plural, nominative and genitive, as in //house, houses, house's, houses'//)
|
||||
whereas French nouns have just two forms (singular and plural //maison, maisons//, "house"), but they also
|
||||
have a piece of information that English nouns don't have, namely gender (masculine and feminine).
|
||||
Chinese nouns have just one form (房子 //fangzi// "house"), which is used for both singular and plural, but in
|
||||
addition, a little bit like the French gender, they have a **classifier** (间 //jian// for the word
|
||||
addition, a little bit like the French gender, they have a **classifier** (间 //jian// for the word
|
||||
"house"). German nouns have 8 forms and a gender, Finnish nouns have 26 forms, and so on.
|
||||
|
||||
This document provides a tour of the digital grammars in the RGL. It is intended to serve at least three kinds of readers.
|
||||
@@ -50,8 +50,8 @@ The document has two main parts: **Words** and **Syntax**. Both parts have a **g
|
||||
explaining the RGL structure from a multilingual perspective, followed by a **specific section**,
|
||||
going into the details of the grammar in a particular language. The general sections are the same
|
||||
in all languages. The specific sections differ in length and detail, depending on the complexity of
|
||||
the language and on what aspects are particularly interesting or problematic for the language
|
||||
in question.
|
||||
the language and on what aspects are particularly interesting or problematic for the language
|
||||
in question.
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ of their morphological aspects. Details of morphology for each language is given
|
||||
++Main parts of speech: content words++
|
||||
|
||||
The most important categories of words are given in the following table. More precisely, we will give the
|
||||
categories of **content words**, which, so so say, describe things and events in the real world.
|
||||
categories of **content words**, which, so so say, describe things and events in the real world.
|
||||
Content words are distinguished from **structural words**, whose purpose is to combine words into syntactic
|
||||
structures. Each category of content words may have thousands of words, and new words can be introduced
|
||||
continuously; therefore, these categories are also called **open categories**. In contrast, structural
|
||||
@@ -92,10 +92,10 @@ give us a short and precise way to state grammatical rules.
|
||||
|
||||
In addition to the names and examples, the table lists the **inflectional features** and **inherent features**
|
||||
typical of each category. Inflectional features are those that create different forms of words. For instance,
|
||||
French nouns have forms for number (singular and plural) - or, as one often says,
|
||||
French nouns have forms for number (singular and plural) - or, as one often says,
|
||||
French nouns are //inflected for number//. In contrast to number, the gender does not give rise to different forms
|
||||
of French nouns: //maison// ("house") //is// feminine, inherently, and there is no masculine form of //maison//.
|
||||
(Of course, there are some nouns that do have masculine and feminine forms, such as //étudiant, étudiante//
|
||||
(Of course, there are some nouns that do have masculine and feminine forms, such as //étudiant, étudiante//
|
||||
"male/female student", but this only applies to a minority of French nouns and shouldn't be taken as an
|
||||
indication of an inflectional gender.)
|
||||
|
||||
@@ -103,11 +103,11 @@ indication of an inflectional gender.)
|
||||
|
||||
++Syntactic implications++
|
||||
|
||||
The features given in the table are rough indications for what one can expect in different languages. Thus,
|
||||
The features given in the table are rough indications for what one can expect in different languages. Thus,
|
||||
for instance, some languages have no gender at all, and hence their nouns and adjectives won't have
|
||||
genders either. But the table is a rather good generalization from the 28 language of the RGL: we can
|
||||
safely say that, if a language //does// have gender, then nouns have an inherent gender and adjectives have
|
||||
a variable gender. This is not a coincidence but has to do with **syntax**, that is, the combination of words
|
||||
a variable gender. This is not a coincidence but has to do with **syntax**, that is, the combination of words
|
||||
into complex expressions. Thus, for instance, nouns are combined with adjectives that modify them, so that
|
||||
#BECE
|
||||
//blue// + //house// = //blue house//
|
||||
@@ -140,8 +140,8 @@ words depend on each other in combinations.
|
||||
//express logical relations, ontologies, etc//
|
||||
|
||||
The last column in the category table shows the **semantic type** corresponding to each category. This type gives an indication
|
||||
of the kind of meaning that the word of each type has. Starting from the simplest meanings, ``e`` is the type of **entities** that serve as meanings of proper names. Nouns, adjectives, and verbs have the type ``e -> t``, which means
|
||||
**functions from entities to propositions** (where the symbol ``t`` for propositions comes from **truth values**). Such a function can be **applied** to an entity to yield a proposition.
|
||||
of the kind of meaning that the word of each type has. Starting from the simplest meanings, ``e`` is the type of **entities** that serve as meanings of proper names. Nouns, adjectives, and verbs have the type ``e -> t``, which means
|
||||
**functions from entities to propositions** (where the symbol ``t`` for propositions comes from **truth values**). Such a function can be **applied** to an entity to yield a proposition.
|
||||
The type ``t`` itself is reserved for sentences, which are formed in syntax by putting words together.
|
||||
For example, the sentence //Paris is large//
|
||||
involves an application of the adjective //large// to //Paris//, and yields the value true if //large// applies to //Paris//.
|
||||
@@ -153,15 +153,15 @@ refers to an entity but an ``N`` expresses a property of an entity. Of course, t
|
||||
all distinctions of categories: nouns, verbs, and adjectives have the same semantic type, but different syntactic properties.
|
||||
We will occasionally use the **type synonyms** ``n``, ``a``, and ``v`` instead of ``e -> t``, to give a clearer structure to some semantic types. But from the semantic point of view, all these types are one and the same.
|
||||
|
||||
We should notice that the semantic types given here are quite rough and do not give a full picture of the nuances. For instance, many adjectives work in a different way than straightforwardly yielding truth values from entities. An example is
|
||||
the adjective //large//. Being a //large mouse// is different (in terms of absolute size) from being //a large elephant//,
|
||||
We should notice that the semantic types given here are quite rough and do not give a full picture of the nuances. For instance, many adjectives work in a different way than straightforwardly yielding truth values from entities. An example is
|
||||
the adjective //large//. Being a //large mouse// is different (in terms of absolute size) from being //a large elephant//,
|
||||
and a logical type for expressing this is ``n -> e -> t``, with an argument ``n`` indicating the domain of comparison (such as
|
||||
mice or elephants).
|
||||
|
||||
Another problem is that defining
|
||||
verbs as ``e -> t`` suggests that all verbs apply to all kinds of entities. But there are combinations of entities and
|
||||
verbs that make no sense semantically. For example, the verb //sleep// is only meaningful for animate entities, and
|
||||
a sentence like //this book sleeps//, if not senseless, requires some kind of a metaphorical interpretation
|
||||
a sentence like //this book sleeps//, if not senseless, requires some kind of a metaphorical interpretation
|
||||
of //sleep//.
|
||||
|
||||
The following table summarizes the most important semantic types that will be used. We use more primitive types than most traditional approaches, which reduce everything to ``e`` and ``t``. For instance, we can't see any way to reduce the top-level category ``p`` of phrases to these types. From a type-theoretical perspective, ``p`` is the category of **judgements**, whereas
|
||||
@@ -174,10 +174,10 @@ The following table summarizes the most important semantic types that will be us
|
||||
| ``t`` | proposition ("truth value") | //Paris is large// | (primitive)
|
||||
| ``q`` | question | //is Paris large// | (primitive)
|
||||
| ``p`` | top-level phrase | //Paris is large.// | (primitive)
|
||||
| ``n`` | substantive ("noun") | //man// | ``e -> t``
|
||||
| ``a`` | quality ("adjective") | //large// | ``e -> t``
|
||||
| ``v`` | action ("verb") | //sleep// | ``e -> t``
|
||||
| ``np`` | quantifier ("noun phase") | //every man// | ``(e -> t) -> t``
|
||||
| ``n`` | substantive ("noun") | //man// | ``e -> t``
|
||||
| ``a`` | quality ("adjective") | //large// | ``e -> t``
|
||||
| ``v`` | action ("verb") | //sleep// | ``e -> t``
|
||||
| ``np`` | quantifier ("noun phase") | //every man// | ``(e -> t) -> t``
|
||||
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ In addition to the features needed for inflection and agreement, the lexicon mus
|
||||
combinations are possible with each word. For most nouns and adjective, this is simple: a noun can be modified
|
||||
by an adjective, for instance, and there is a uniform syntax rule for this. However, there are some nouns and adjectives
|
||||
that are trickier, because they don't correspond to simple things but to **relations**. For instance, //brother// is
|
||||
a **relational noun**, since its primary usage is not alone bur in phrases like //brother of this man//.
|
||||
In the same way, //similar//
|
||||
a **relational noun**, since its primary usage is not alone bur in phrases like //brother of this man//.
|
||||
In the same way, //similar//
|
||||
is a **relational adjective**, since its primary use is in phrases like //similar to this//. The additional
|
||||
term attached to these words is called its **complement**; thus //this// is the complement in //similar to this//.
|
||||
The categories of words that take complements are called **subcategories**. They are morphologically similar to
|
||||
@@ -202,11 +202,11 @@ argument places in semantic types. Thus the number of places
|
||||
is one plus the number of complements, so that the first place is reserved for the subject of a sentence
|
||||
and the rest of the places for the complements.
|
||||
|
||||
The following table shows the categories of relational nouns and adjectives in the RGL. The inflectional and
|
||||
The following table shows the categories of relational nouns and adjectives in the RGL. The inflectional and
|
||||
inherent features are the same as for one-place nouns and adjectives, but for each complement, the lexicon
|
||||
must tell what preposition, if any, is needed to attach that complement. For instance, the preposition for
|
||||
//similar// is //to//, whereas the preposition for //different// is //from//. In languages with richer case
|
||||
systems (such as German, Latin, and Finnish), the complement information also determines the case (genitive,
|
||||
systems (such as German, Latin, and Finnish), the complement information also determines the case (genitive,
|
||||
dative, ablative, and so on).
|
||||
|
||||
|
||||
@@ -220,15 +220,15 @@ dative, ablative, and so on).
|
||||
|
||||
Verbs show a particularly rich variation in subcategorization. The most familiar distinction is the one between
|
||||
**intransitive** and **transitive** verbs: intransitive verbs need only a **subject** (like //she// in //she sleeps//),
|
||||
whereas transitive verbs also need an **object** (like //him// in //she loves him//). Our category ``V`` obviously includes
|
||||
whereas transitive verbs also need an **object** (like //him// in //she loves him//). Our category ``V`` obviously includes
|
||||
intransitive verbs. But there is no category for transitive verbs in the RGL. Instead, we have a more general category of
|
||||
**two-place verbs**, which includes transitive verbs but also verbs that need a preposition (such as //at// in
|
||||
**two-place verbs**, which includes transitive verbs but also verbs that need a preposition (such as //at// in
|
||||
//she looks at him//). Just like for relational nouns and adjectives, the complement of a two-place verb has variations
|
||||
in cases and prepositions.
|
||||
|
||||
The following table shows the subcategories of verbs in the RGL. The list is long but it may still be incomplete. For
|
||||
example, there are no four-place verbs (//she paid him one million pounds for the house//). Such constructions can
|
||||
be built, as we will see later, by using for instance a ``V3`` verb with an additional adverb. But we can envisage
|
||||
be built, as we will see later, by using for instance a ``V3`` verb with an additional adverb. But we can envisage
|
||||
future additions of more subcategories for verbs.
|
||||
|
||||
|
||||
@@ -263,9 +263,9 @@ Semantically, the type ``e -> e -> v -> t`` works for both of them. However, if
|
||||
them, then the two kinds of verbs apply their argument verb to different arguments:
|
||||
- ``promise subj obj verb`` is about the proposition ``verb subj``
|
||||
- ``force subj obj verb`` is about the proposition ``verb obj``
|
||||
|
||||
|
||||
Hence it would make sense to distinguish between subject-control and object-control ``V2V``'s on the category level rather
|
||||
|
||||
Hence it would make sense to distinguish between subject-control and object-control ``V2V``'s on the category level rather
|
||||
than with a complement feature. The agreement behaviour would them become simpler to describe, and, what is more important,
|
||||
the semantic behaviour would be predictable from the category alone.
|
||||
|
||||
@@ -274,7 +274,7 @@ table, //ask// appears in both ``VQ`` and ``V2Q``. Now, these uses are related,
|
||||
the same as to //ask someone something//. But in some other cases, the meaning can be completely different. For instance,
|
||||
//walk// in ``V2`` (as in //I walk the dog//) is different from //walk// in ``V`` (as in //the dog walks//). The ``V2`` is in
|
||||
this case **causative** with respect to the ``V``: I cause the walking of the dog. From the multilingual perspective, it is
|
||||
just a coincidence that English uses the same verb for the intransitive and the causative meanings. In many other languages,
|
||||
just a coincidence that English uses the same verb for the intransitive and the causative meanings. In many other languages,
|
||||
different words would be used. And so would English do for many other verbs: one cannot say //I eat the dog// to express that I make the dog eat; the verb //feed// is used instead.
|
||||
|
||||
|
||||
@@ -287,13 +287,13 @@ We have defined the categories of content along three criteria:
|
||||
- **semantic**: words belonging to the same category must have the same semantic type
|
||||
|
||||
|
||||
Thus morphological criteria are, in most languages, enough to tell apart ``N``, ``A``, ``V``, and ``Adv``.
|
||||
Syntactic criteria are appealed to when distinguishing the subcategories of nouns, adjectives, and verbs.
|
||||
Thus morphological criteria are, in most languages, enough to tell apart ``N``, ``A``, ``V``, and ``Adv``.
|
||||
Syntactic criteria are appealed to when distinguishing the subcategories of nouns, adjectives, and verbs.
|
||||
Semantic criteria are often obeyed as well, although we have noticed that finer distinctions could be useful
|
||||
for subject vs. object control verbs and for different kinds of adjectives.
|
||||
|
||||
For structural words, following the same criteria leads to a high number of categories, higher than in many traditional
|
||||
grammars. Thus, for instance the category of **pronouns** is divided to at least,
|
||||
grammars. Thus, for instance the category of **pronouns** is divided to at least,
|
||||
personal pronouns (//he//), determiners (//this//),
|
||||
interrogative pronouns (//who//), and relative pronouns (//that//). There is no way to see all these classes as subcategories
|
||||
of a uniform class of pronouns, as we did with the verb subcategories: for verbs, there was a uniform
|
||||
@@ -317,21 +317,21 @@ i.e. on how the structural words are actually used for building structures.
|
||||
|
||||
|| GF name | text name | example | inflectional features | inherent features | semantics ||
|
||||
| ``Det`` | determiner | //every// | gender, case | number, definiteness | ``det`` = ``n -> (e -> t) -> t``
|
||||
| ``Quant`` | quantifier | //this// | gender, number, case | definiteness | ``num -> det``
|
||||
| ``Quant`` | quantifier | //this// | gender, number, case | definiteness | ``num -> det``
|
||||
| ``Predet`` | predeterminer | //only// | gender, number, case | (none) | ``np -> np``
|
||||
| ``Pron`` | personal pronoun | //he// | case, possessives | gender, number, person | ``e``
|
||||
|
||||
The most important thing to notice is the distinction between ``Det`` and ``Quant``. The latter covers determiners that have
|
||||
"two forms", for both numbers, such as //this-these// and //that-those//. The former covers determiners with a fixed number,
|
||||
such as //every// (singular).
|
||||
such as //every// (singular).
|
||||
|
||||
|
||||
|
||||
**Building number expressions**
|
||||
|
||||
|| GF name | text name | example | inflectional features | inherent features | semantics ||
|
||||
| ``Num`` | number expression | //five// | gender, case | number | ``num`` = ``det``
|
||||
| ``Card`` | cardinal number | //five// | gender, case | number | ``num`` = ``det``
|
||||
| ``Num`` | number expression | //five// | gender, case | number | ``num`` = ``det``
|
||||
| ``Card`` | cardinal number | //five// | gender, case | number | ``num`` = ``det``
|
||||
| ``Ord`` | ordinal number | //fifth// | gender, number, case | (none) | ``e -> t``
|
||||
| ``Numeral`` | verbal numeral | //five// | gender, case, card/ord | number | ``num``
|
||||
| ``Digits`` | numeral in digits | //511// | card/ord | number | ``num``
|
||||
@@ -344,7 +344,7 @@ such as //every// (singular).
|
||||
**Building interrogatives and relatives**
|
||||
|
||||
|| GF name | text name | example | inflectional features | inherent features | semantics ||
|
||||
| ``IP`` | interrogative pronoun | //who// | case | gender, number | ``(e -> t) -> q``
|
||||
| ``IP`` | interrogative pronoun | //who// | case | gender, number | ``(e -> t) -> q``
|
||||
| ``IDet`` | interrogative determiner | //how many// | gender, case | number | ``n -> (e -> t) -> q``
|
||||
| ``IQuant`` | interrogative quantifier | //which// | gender, number, case | (none) | ``num -> n -> (e -> t) -> q``
|
||||
| ``IAdv`` | interrogative adverb | //why// | (none) | (none) | ``t -> q``
|
||||
@@ -372,10 +372,8 @@ The interrogative pronoun structure replicates a part of the determiner structur
|
||||
|
||||
One more thing to be taken into account is that many of the "structural word categories" also admit of complex
|
||||
expressions and not only words. That is, the RGL has not only words in these categories but also syntactic
|
||||
rules for building more expressions. Thus for instance //these five// is a ``Det`` built from the ``Quant`` //this//
|
||||
and the ``Num`` //five//. It is also common that a "structural word" in a particular language is realized as
|
||||
rules for building more expressions. Thus for instance //these five// is a ``Det`` built from the ``Quant`` //this//
|
||||
and the ``Num`` //five//. It is also common that a "structural word" in a particular language is realized as
|
||||
a feature of the other words it combines with, rather than as a word of its own. For instance,
|
||||
the determiner //the// in Swedish just selects an inflectional form of the noun that it is applied to:
|
||||
"the" + //bil// = //bilen// ("the car").
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ table { border-collapse: collapse; }
|
||||
td, th { padding: 5px; }
|
||||
th { background: #9df; }
|
||||
td { background: white }
|
||||
h1,h2,h3,h4 { font-family: sans-serif; color: #303030;
|
||||
text-shadow: rgba(0,0,0,0.25) 2px 2px 5px;
|
||||
}
|
||||
|
||||
/* Quick links */
|
||||
|
||||
581
doc/official.txt
581
doc/official.txt
@@ -1,581 +0,0 @@
|
||||
The Official EU languages
|
||||
|
||||
The 20 official languages of the EU and their abbreviations are as follows:
|
||||
|
||||
Español ES Spanish
|
||||
Dansk DA Danish
|
||||
Deutsch DE German
|
||||
Elinika EL Greek
|
||||
English EN
|
||||
Français FR French
|
||||
Italiano IT Italian
|
||||
Nederlands NL Dutch
|
||||
Português PT Portuguese
|
||||
Suomi FI Finnish
|
||||
Svenska SV Swedish
|
||||
?e?tina CS Czech
|
||||
Eesti ET Estonian
|
||||
Latviesu valoda LV Latvian
|
||||
Lietuviu kalba LT Lithuanian
|
||||
Magyar HU Hungarian
|
||||
Malti MT Maltese
|
||||
Polski PL Polish
|
||||
Sloven?ina SK Slovak
|
||||
Sloven??ina SL Slovene
|
||||
|
||||
http://europa.eu.int/comm/education/policies/lang/languages/index_en.html
|
||||
|
||||
-----
|
||||
http://www.w3.org/WAI/ER/IG/ert/iso639.htm
|
||||
|
||||
ar arabic
|
||||
no norwegian
|
||||
ru russian
|
||||
|
||||
--
|
||||
|
||||
ISO 639: 3-letter codes
|
||||
|
||||
abk ab Abkhazian
|
||||
ace Achinese
|
||||
ach Acoli
|
||||
ada Adangme
|
||||
aar aa Afar
|
||||
afh Afrihili
|
||||
afr af Afrikaans
|
||||
afa Afro-Asiatic (Other)
|
||||
aka Akan
|
||||
akk Akkadian
|
||||
alb/sqi sq Albanian
|
||||
ale Aleut
|
||||
alg Algonquian languages
|
||||
tut Altaic (Other)
|
||||
amh am Amharic
|
||||
apa Apache languages
|
||||
ara ar Arabic
|
||||
arc Aramaic
|
||||
arp Arapaho
|
||||
arn Araucanian
|
||||
arw Arawak
|
||||
arm/hye hy Armenian
|
||||
art Artificial (Other)
|
||||
asm as Assamese
|
||||
ath Athapascan languages
|
||||
map Austronesian (Other)
|
||||
ava Avaric
|
||||
ave Avestan
|
||||
awa Awadhi
|
||||
aym ay Aymara
|
||||
aze az Azerbaijani
|
||||
nah Aztec
|
||||
ban Balinese
|
||||
bat Baltic (Other)
|
||||
bal Baluchi
|
||||
bam Bambara
|
||||
bai Bamileke languages
|
||||
bad Banda
|
||||
bnt Bantu (Other)
|
||||
bas Basa
|
||||
bak ba Bashkir
|
||||
baq/eus eu Basque
|
||||
bej Beja
|
||||
bem Bemba
|
||||
ben bn Bengali
|
||||
ber Berber (Other)
|
||||
bho Bhojpuri
|
||||
bih bh Bihari
|
||||
bik Bikol
|
||||
bin Bini
|
||||
bis bi Bislama
|
||||
bra Braj
|
||||
bre be Breton
|
||||
bug Buginese
|
||||
bul bg Bulgarian
|
||||
bua Buriat
|
||||
bur/mya my Burmese
|
||||
bel be Byelorussian
|
||||
cad Caddo
|
||||
car Carib
|
||||
cat ca Catalan
|
||||
cau Caucasian (Other)
|
||||
ceb Cebuano
|
||||
cel Celtic (Other)
|
||||
cai Central American Indian (Other)
|
||||
chg Chagatai
|
||||
cha Chamorro
|
||||
che Chechen
|
||||
chr Cherokee
|
||||
chy Cheyenne
|
||||
chb Chibcha
|
||||
chi/zho zh Chinese
|
||||
chn Chinook jargon
|
||||
cho Choctaw
|
||||
chu Church Slavic
|
||||
chv Chuvash
|
||||
cop Coptic
|
||||
cor Cornish
|
||||
cos co Corsican
|
||||
cre Cree
|
||||
mus Creek
|
||||
crp Creoles and Pidgins (Other)
|
||||
cpe Creoles and Pidgins, English-based (Other)
|
||||
cpf Creoles and Pidgins, French-based (Other)
|
||||
cpp Creoles and Pidgins, Portuguese-based (Other)
|
||||
cus Cushitic (Other)
|
||||
hr Croatian
|
||||
ces/cze cs Czech
|
||||
dak Dakota
|
||||
dan da Danish
|
||||
del Delaware
|
||||
din Dinka
|
||||
div Divehi
|
||||
doi Dogri
|
||||
dra Dravidian (Other)
|
||||
dua Duala
|
||||
dut/nla nl Dutch
|
||||
dum Dutch, Middle (ca. 1050-1350)
|
||||
dyu Dyula
|
||||
dzo dz Dzongkha
|
||||
efi Efik
|
||||
egy Egyptian (Ancient)
|
||||
eka Ekajuk
|
||||
elx Elamite
|
||||
eng en English
|
||||
enm English, Middle (ca. 1100-1500)
|
||||
ang English, Old (ca. 450-1100)
|
||||
esk Eskimo (Other)
|
||||
epo eo Esperanto
|
||||
est et Estonian
|
||||
ewe Ewe
|
||||
ewo Ewondo
|
||||
fan Fang
|
||||
fat Fanti
|
||||
fao fo Faroese
|
||||
fij fj Fijian
|
||||
fin fi Finnish
|
||||
fiu Finno-Ugrian (Other)
|
||||
fon Fon
|
||||
fra/fre fr French
|
||||
frm French, Middle (ca. 1400-1600)
|
||||
fro French, Old (842- ca. 1400)
|
||||
fry fy Frisian
|
||||
ful Fulah
|
||||
gaa Ga
|
||||
gae/gdh Gaelic (Scots)
|
||||
glg gl Gallegan
|
||||
lug Ganda
|
||||
gay Gayo
|
||||
gez Geez
|
||||
geo/kat ka Georgian
|
||||
deu/ger de German
|
||||
gmh German, Middle High (ca. 1050-1500)
|
||||
goh German, Old High (ca. 750-1050)
|
||||
gem Germanic (Other)
|
||||
gil Gilbertese
|
||||
gon Gondi
|
||||
got Gothic
|
||||
grb Grebo
|
||||
grc Greek, Ancient (to 1453)
|
||||
ell/gre el Greek, Modern (1453-)
|
||||
kal kl Greenlandic
|
||||
grn gn Guarani
|
||||
guj gu Gujarati
|
||||
hai Haida
|
||||
hau ha Hausa
|
||||
haw Hawaiian
|
||||
heb he Hebrew
|
||||
her Herero
|
||||
hil Hiligaynon
|
||||
him Himachali
|
||||
hin hi Hindi
|
||||
hmo Hiri Motu
|
||||
hun hu Hungarian
|
||||
hup Hupa
|
||||
iba Iban
|
||||
ice/isl is Icelandic
|
||||
ibo Igbo
|
||||
ijo Ijo
|
||||
ilo Iloko
|
||||
inc Indic (Other)
|
||||
ine Indo-European (Other)
|
||||
ind id Indonesian
|
||||
ina ia Interlingua (International Auxiliary language Association)
|
||||
ine - Interlingue
|
||||
iku iu Inuktitut
|
||||
ipk ik Inupiak
|
||||
ira Iranian (Other)
|
||||
gai/iri ga Irish
|
||||
sga Irish, Old (to 900)
|
||||
mga Irish, Middle (900 - 1200)
|
||||
iro Iroquoian languages
|
||||
ita it Italian
|
||||
jpn ja Japanese
|
||||
jav/jaw jv/jw Javanese
|
||||
jrb Judeo-Arabic
|
||||
jpr Judeo-Persian
|
||||
kab Kabyle
|
||||
kac Kachin
|
||||
kam Kamba
|
||||
kan kn Kannada
|
||||
kau Kanuri
|
||||
kaa Kara-Kalpak
|
||||
kar Karen
|
||||
kas ks Kashmiri
|
||||
kaw Kawi
|
||||
kaz kk Kazakh
|
||||
kha Khasi
|
||||
khm km Khmer
|
||||
khi Khoisan (Other)
|
||||
kho Khotanese
|
||||
kik Kikuyu
|
||||
kin rw Kinyarwanda
|
||||
kir ky Kirghiz
|
||||
kom Komi
|
||||
kon Kongo
|
||||
kok Konkani
|
||||
kor ko Korean
|
||||
kpe Kpelle
|
||||
kro Kru
|
||||
kua Kuanyama
|
||||
kum Kumyk
|
||||
kur ku Kurdish
|
||||
kru Kurukh
|
||||
kus Kusaie
|
||||
kut Kutenai
|
||||
lad Ladino
|
||||
lah Lahnda
|
||||
lam Lamba
|
||||
oci oc Langue d'Oc (post 1500)
|
||||
lao lo Lao
|
||||
lat la Latin
|
||||
lav lv Latvian
|
||||
ltz Letzeburgesch
|
||||
lez Lezghian
|
||||
lin ln Lingala
|
||||
lit lt Lithuanian
|
||||
loz Lozi
|
||||
lub Luba-Katanga
|
||||
lui Luiseno
|
||||
lun Lunda
|
||||
luo Luo (Kenya and Tanzania)
|
||||
mac/mak mk Macedonian
|
||||
mad Madurese
|
||||
mag Magahi
|
||||
mai Maithili
|
||||
mak Makasar
|
||||
mlg mg Malagasy
|
||||
may/msa ms Malay
|
||||
mal Malayalam
|
||||
mlt ml Maltese
|
||||
man Mandingo
|
||||
mni Manipuri
|
||||
mno Manobo languages
|
||||
max Manx
|
||||
mao/mri mi Maori
|
||||
mar mr Marathi
|
||||
chm Mari
|
||||
mah Marshall
|
||||
mwr Marwari
|
||||
mas Masai
|
||||
myn Mayan languages
|
||||
men Mende
|
||||
mic Micmac
|
||||
min Minangkabau
|
||||
mis Miscellaneous (Other)
|
||||
moh Mohawk
|
||||
mol mo Moldavian
|
||||
mkh Mon-Kmer (Other)
|
||||
lol Mongo
|
||||
mon mn Mongolian
|
||||
mos Mossi
|
||||
mul Multiple languages
|
||||
mun Munda languages
|
||||
nau na Nauru
|
||||
nav Navajo
|
||||
nde Ndebele, North
|
||||
nbl Ndebele, South
|
||||
ndo Ndongo
|
||||
nep ne Nepali
|
||||
new Newari
|
||||
nic Niger-Kordofanian (Other)
|
||||
ssa Nilo-Saharan (Other)
|
||||
niu Niuean
|
||||
non Norse, Old
|
||||
nai North American Indian (Other)
|
||||
nor no Norwegian
|
||||
nno Norwegian (Nynorsk)
|
||||
nub Nubian languages
|
||||
nym Nyamwezi
|
||||
nya Nyanja
|
||||
nyn Nyankole
|
||||
nyo Nyoro
|
||||
nzi Nzima
|
||||
oji Ojibwa
|
||||
ori or Oriya
|
||||
orm om Oromo
|
||||
osa Osage
|
||||
oss Ossetic
|
||||
oto Otomian languages
|
||||
pal Pahlavi
|
||||
pau Palauan
|
||||
pli Pali
|
||||
pam Pampanga
|
||||
pag Pangasinan
|
||||
pan pa Panjabi
|
||||
pap Papiamento
|
||||
paa Papuan-Australian (Other)
|
||||
fas/per fa Persian
|
||||
peo Persian, Old (ca 600 - 400 B.C.)
|
||||
phn Phoenician
|
||||
pol pl Polish
|
||||
pon Ponape
|
||||
por pt Portuguese
|
||||
pra Prakrit languages
|
||||
pro Provencal, Old (to 1500)
|
||||
pus ps Pushto
|
||||
que qu Quechua
|
||||
roh rm Rhaeto-Romance
|
||||
raj Rajasthani
|
||||
rar Rarotongan
|
||||
roa Romance (Other)
|
||||
ron/rum ro Romanian
|
||||
rom Romany
|
||||
run rn Rundi
|
||||
rus ru Russian
|
||||
sal Salishan languages
|
||||
sam Samaritan Aramaic
|
||||
smi Sami languages
|
||||
smo sm Samoan
|
||||
sad Sandawe
|
||||
sag sg Sango
|
||||
san sa Sanskrit
|
||||
srd Sardinian
|
||||
sco Scots
|
||||
sel Selkup
|
||||
sem Semitic (Other)
|
||||
sr Serbian
|
||||
scr sh Serbo-Croatian
|
||||
srr Serer
|
||||
shn Shan
|
||||
sna sn Shona
|
||||
sid Sidamo
|
||||
bla Siksika
|
||||
snd sd Sindhi
|
||||
sin si Singhalese
|
||||
sit - Sino-Tibetan (Other)
|
||||
sio Siouan languages
|
||||
sla Slavic (Other)
|
||||
ssw ss Siswant
|
||||
slk/slo sk Slovak
|
||||
slv sl Slovenian
|
||||
sog Sogdian
|
||||
som so Somali
|
||||
son Songhai
|
||||
wen Sorbian languages
|
||||
nso Sotho, Northern
|
||||
sot st Sotho, Southern
|
||||
sai South American Indian (Other)
|
||||
esl/spa es Spanish
|
||||
suk Sukuma
|
||||
sux Sumerian
|
||||
sun su Sudanese
|
||||
sus Susu
|
||||
swa sw Swahili
|
||||
ssw Swazi
|
||||
sve/swe sv Swedish
|
||||
syr Syriac
|
||||
tgl tl Tagalog
|
||||
tah Tahitian
|
||||
tgk tg Tajik
|
||||
tmh Tamashek
|
||||
tam ta Tamil
|
||||
tat tt Tatar
|
||||
tel te Telugu
|
||||
ter Tereno
|
||||
tha th Thai
|
||||
bod/tib bo Tibetan
|
||||
tig Tigre
|
||||
tir ti Tigrinya
|
||||
tem Timne
|
||||
tiv Tivi
|
||||
tli Tlingit
|
||||
tog to Tonga (Nyasa)
|
||||
ton Tonga (Tonga Islands)
|
||||
tru Truk
|
||||
tsi Tsimshian
|
||||
tso ts Tsonga
|
||||
tsn tn Tswana
|
||||
tum Tumbuka
|
||||
tur tr Turkish
|
||||
ota Turkish, Ottoman (1500 - 1928)
|
||||
tuk tk Turkmen
|
||||
tyv Tuvinian
|
||||
twi tw Twi
|
||||
uga Ugaritic
|
||||
uig ug Uighur
|
||||
ukr uk Ukrainian
|
||||
umb Umbundu
|
||||
und Undetermined
|
||||
urd ur Urdu
|
||||
uzb uz Uzbek
|
||||
vai Vai
|
||||
ven Venda
|
||||
vie vi Vietnamese
|
||||
vol vo Volapük
|
||||
vot Votic
|
||||
wak Wakashan languages
|
||||
wal Walamo
|
||||
war Waray
|
||||
was Washo
|
||||
cym/wel cy Welsh
|
||||
wol wo Wolof
|
||||
xho xh Xhosa
|
||||
sah Yakut
|
||||
yao Yao
|
||||
yap Yap
|
||||
yid yi Yiddish
|
||||
yor yo Yoruba
|
||||
zap Zapotec
|
||||
zen Zenaga
|
||||
zha za Zhuang
|
||||
zul zu Zulu
|
||||
zun Zuni
|
||||
|
||||
ISO 639: 2-letter codes
|
||||
|
||||
AA "Afar"
|
||||
AB "Abkhazian"
|
||||
AF "Afrikaans"
|
||||
AM "Amharic"
|
||||
AR "Arabic"
|
||||
AS "Assamese"
|
||||
AY "Aymara"
|
||||
AZ "Azerbaijani"
|
||||
BA "Bashkir"
|
||||
BE "Byelorussian"
|
||||
BG "Bulgarian"
|
||||
BH "Bihari"
|
||||
BI "Bislama"
|
||||
BN "Bengali" "Bangla"
|
||||
BO "Tibetan"
|
||||
BR "Breton"
|
||||
CA "Catalan"
|
||||
CO "Corsican"
|
||||
CS "Czech"
|
||||
CY "Welsh"
|
||||
DA "Danish"
|
||||
DE "German"
|
||||
DZ "Bhutani"
|
||||
EL "Greek"
|
||||
EN "English" "American"
|
||||
EO "Esperanto"
|
||||
ES "Spanish"
|
||||
ET "Estonian"
|
||||
EU "Basque"
|
||||
FA "Persian"
|
||||
FI "Finnish"
|
||||
FJ "Fiji"
|
||||
FO "Faeroese"
|
||||
FR "French"
|
||||
FY "Frisian"
|
||||
GA "Irish"
|
||||
GD "Gaelic" "Scots Gaelic"
|
||||
GL "Galician"
|
||||
GN "Guarani"
|
||||
GU "Gujarati"
|
||||
HA "Hausa"
|
||||
HI "Hindi"
|
||||
HR "Croatian"
|
||||
HU "Hungarian"
|
||||
HY "Armenian"
|
||||
IA "Interlingua"
|
||||
IE "Interlingue"
|
||||
IK "Inupiak"
|
||||
IN "Indonesian"
|
||||
IS "Icelandic"
|
||||
IT "Italian"
|
||||
IW "Hebrew"
|
||||
JA "Japanese"
|
||||
JI "Yiddish"
|
||||
JW "Javanese"
|
||||
KA "Georgian"
|
||||
KK "Kazakh"
|
||||
KL "Greenlandic"
|
||||
KM "Cambodian"
|
||||
KN "Kannada"
|
||||
KO "Korean"
|
||||
KS "Kashmiri"
|
||||
KU "Kurdish"
|
||||
KY "Kirghiz"
|
||||
LA "Latin"
|
||||
LN "Lingala"
|
||||
LO "Laothian"
|
||||
LT "Lithuanian"
|
||||
LV "Latvian" "Lettish"
|
||||
MG "Malagasy"
|
||||
MI "Maori"
|
||||
MK "Macedonian"
|
||||
ML "Malayalam"
|
||||
MN "Mongolian"
|
||||
MO "Moldavian"
|
||||
MR "Marathi"
|
||||
MS "Malay"
|
||||
MT "Maltese"
|
||||
MY "Burmese"
|
||||
NA "Nauru"
|
||||
NE "Nepali"
|
||||
NL "Dutch"
|
||||
NO "Norwegian"
|
||||
OC "Occitan"
|
||||
OM "Oromo" "Afan"
|
||||
OR "Oriya"
|
||||
PA "Punjabi"
|
||||
PL "Polish"
|
||||
PS "Pashto" "Pushto"
|
||||
PT "Portuguese"
|
||||
QU "Quechua"
|
||||
RM "Rhaeto-Romance"
|
||||
RN "Kirundi"
|
||||
RO "Romanian"
|
||||
RU "Russian"
|
||||
RW "Kinyarwanda"
|
||||
SA "Sanskrit"
|
||||
SD "Sindhi"
|
||||
SG "Sangro"
|
||||
SH "Serbo-Croatian"
|
||||
SI "Singhalese"
|
||||
SK "Slovak"
|
||||
SL "Slovenian"
|
||||
SM "Samoan"
|
||||
SN "Shona"
|
||||
SO "Somali"
|
||||
SQ "Albanian"
|
||||
SR "Serbian"
|
||||
SS "Siswati"
|
||||
ST "Sesotho"
|
||||
SU "Sudanese"
|
||||
SV "Swedish"
|
||||
SW "Swahili"
|
||||
TA "Tamil"
|
||||
TE "Tegulu"
|
||||
TG "Tajik"
|
||||
TH "Thai"
|
||||
TI "Tigrinya"
|
||||
TK "Turkmen"
|
||||
TL "Tagalog"
|
||||
TN "Setswana"
|
||||
TO "Tonga"
|
||||
TR "Turkish"
|
||||
TS "Tsonga"
|
||||
TT "Tatar"
|
||||
TW "Twi"
|
||||
UK "Ukrainian"
|
||||
UR "Urdu"
|
||||
UZ "Uzbek"
|
||||
VI "Vietnamese"
|
||||
VO "Volapuk"
|
||||
WO "Wolof"
|
||||
XH "Xhosa"
|
||||
YO "Yoruba"
|
||||
ZH "Chinese"
|
||||
ZU "Zulu"
|
||||
@@ -1,48 +0,0 @@
|
||||
Morphological Paradigms in the GF Resource Grammar Library
|
||||
Aarne Ranta
|
||||
|
||||
|
||||
This is a synopsis of the main morphological paradigms for
|
||||
nouns (``N``), adjectives (``A``), and verbs (``V``).
|
||||
|
||||
|
||||
=English=
|
||||
|
||||
```
|
||||
mkN : (flash : Str) -> N ; -- car, bus, ax, hero, fly, boy
|
||||
mkN : (man,men : Str) -> N ; -- index, indices
|
||||
mkN : (man,men,man's,men's : Str) -> N ;
|
||||
mkN : Str -> N -> N ; -- baby boom
|
||||
|
||||
mkA : (happy : Str) -> A ; -- small, happy, free
|
||||
mkA : (fat,fatter : Str) -> A ;
|
||||
mkA : (good,better,best,well : Str) -> A
|
||||
compoundA : A -> A ; -- -/more/most ridiculous
|
||||
|
||||
mkV : (cry : Str) -> V ; -- call, kiss, echo, cry, pray
|
||||
mkV : (stop,stopped : Str) -> V ;
|
||||
mkV : (drink,drank,drunk : Str) -> V ;
|
||||
mkV : (run,ran,run,running : Str) -> V ;
|
||||
mkV : (go,goes,went,gone,going : Str) -> V
|
||||
```
|
||||
|
||||
=French=
|
||||
|
||||
```
|
||||
mkN : (cheval : Str) -> N ; -- pas, prix, nez, bijou, cheval
|
||||
mkN : (foie : Str) -> Gender -> N ;
|
||||
mkN : (oeil,yeux : Str) -> Gender -> N ;
|
||||
mkN : N -> Str -> N
|
||||
|
||||
mkA : (cher : Str) -> A ; -- banal, heureux, italien, jeune, amer, carré, joli
|
||||
mkA : (sec,seche : Str) -> A ;
|
||||
mkA : (banal,banale,banaux,banalement : Str) -> A ;
|
||||
mkA : (bon : A) -> (meilleur : A) -> A
|
||||
prefixA : A -> A ;
|
||||
|
||||
mkV : (finir : Str) -> V ; -- aimer, céder, placer, manger, payer, finir
|
||||
mkV : (jeter,jette,jettera : Str) -> V ;
|
||||
mkV : V2 -> V
|
||||
etreV : V -> V ;
|
||||
reflV : V -> V ;
|
||||
```
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
// Find an element with a certain tag containing a certain text.
|
||||
function findElement(tagname,text) {
|
||||
var els=document.body.getElementsByTagName(tagname)
|
||||
for(var i=0;i<els.length;i++)
|
||||
if(els[i].innerText==text) return els[i]
|
||||
return null
|
||||
}
|
||||
|
||||
function text(s) { return document.createTextNode(s); }
|
||||
|
||||
function appendChildren(n,ds) {
|
||||
if(Array.isArray(ds)) for(var i in ds) n.appendChild(ds[i]);
|
||||
else if(typeof ds=="string")
|
||||
n.appendChild(text(ds))
|
||||
else
|
||||
n.appendChild(ds)
|
||||
}
|
||||
|
||||
function node(tag,cls,ds) {
|
||||
var n=document.createElement(tag)
|
||||
if(cls) n.className=cls
|
||||
if(ds) appendChildren(n,ds)
|
||||
return n
|
||||
}
|
||||
|
||||
function a(href,txt) {
|
||||
var a=node("a","",txt)
|
||||
a.href=href
|
||||
return a
|
||||
}
|
||||
|
||||
function tr(ds) { return node("tr","",ds) }
|
||||
function th(d) { return node("th","",d) }
|
||||
function td(d) { return node("td","",d) }
|
||||
|
||||
function forAllLinks(list,f) {
|
||||
for(var i=0;i<list.length;i++) {
|
||||
var c=list[i].firstElementChild
|
||||
if(c && c.tagName=="A" && c.href) f(c)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
// Extract links to the syntax rules
|
||||
function listrules(ul) {
|
||||
var rules=[]
|
||||
if(ul.tagName!="UL") return []
|
||||
forAllLinks(ul.children,function(c) {
|
||||
rules.push({href:c.href,text:c.innerText.split(" -")[0],
|
||||
full:c.innerText})
|
||||
})
|
||||
return rules
|
||||
}
|
||||
|
||||
// Extract the links to the paradigm sections for all the languages
|
||||
function listlangs(ul) {
|
||||
var langs=[]
|
||||
if(ul.tagName!="UL") return []
|
||||
forAllLinks(ul.children,function(c) {
|
||||
if(/^Paradigms for /.test(c.innerText))
|
||||
langs.push({href:c.href,text:c.innerText.substr(14),
|
||||
full:c.innerText})
|
||||
})
|
||||
return langs
|
||||
}
|
||||
|
||||
function linklist(links) {
|
||||
var d=node("td","quicklinks")
|
||||
for(var i=0;i<links.length;i++) {
|
||||
var l=a(links[i].href,links[i].text)
|
||||
l.title=links[i].full
|
||||
d.appendChild(l)
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
function quicklinks() {
|
||||
// Find the detailed table of contents
|
||||
var h1toc=findElement("h1","Table of Contents")
|
||||
var ultoc=h1toc.nextElementSibling
|
||||
while(ultoc && ultoc.tagName!="UL") ultoc=ultoc.nextElementSibling
|
||||
|
||||
var lis=ultoc.children
|
||||
|
||||
var syntaxrules=[],langs=[]
|
||||
|
||||
// Find the Syntax Rules and Lexical Paradigms sections in the toc
|
||||
for(var i=0;i<lis.length;i++) {
|
||||
var li=lis[i],c=li.firstElementChild
|
||||
if(c.tagName=="A") {
|
||||
if(/^Syntax Rules /.test(c.innerText))
|
||||
syntaxrules=listrules(c.nextElementSibling)
|
||||
else if(c.innerText=="Lexical Paradigms")
|
||||
langs=listlangs(c.nextElementSibling)
|
||||
}
|
||||
}
|
||||
|
||||
var table=node("table","quicklinks",
|
||||
[tr([th("Syntax"),th("Morphology")]),
|
||||
tr([linklist(syntaxrules),linklist(langs)])])
|
||||
|
||||
return node("div","quicklinks",
|
||||
[text("Quick links"),
|
||||
node("div","expand",table)])
|
||||
}
|
||||
|
||||
document.body.appendChild(quicklinks())
|
||||
@@ -1,529 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.org">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
|
||||
<LINK REL="stylesheet" TYPE="text/css" HREF="../../css/style.css">
|
||||
<TITLE>GF Resource Grammar Library Documentation and Publications</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<CENTER>
|
||||
<H1>GF Resource Grammar Library Documentation and Publications</H1>
|
||||
<FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
|
||||
<FONT SIZE="4">20170119</FONT>
|
||||
</CENTER>
|
||||
|
||||
<P>
|
||||
<I>To be completed. Contributions welcome - in particular, links to open access publications!</I>
|
||||
</P>
|
||||
|
||||
<H3>Afrikaans</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/afrikaans">http://www.grammaticalframework.org/lib/src/afrikaans</A> (Laurette Pretorius, Laurette Marais)
|
||||
</UL>
|
||||
|
||||
<H3>Amharic</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/amharic">http://www.grammaticalframework.org/lib/src/amharic</A> (Markos Kassa Gobena)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Markos Kassa Gobena.
|
||||
<I>Implementing and Open Source Amharic Resource Grammar in GF</I>,
|
||||
MSc thesis, Chalmers University, 2010.
|
||||
<A HREF="http://publications.lib.chalmers.se/records/fulltext/146295.pdf">http://publications.lib.chalmers.se/records/fulltext/146295.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Arabic</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/arabic">http://www.grammaticalframework.org/lib/src/arabic</A> (Ali El Dada)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Ali El Dada.
|
||||
<I>Arabic Resource Grammar in GF</I>, MSc Thesis, Chalmers University, 2006.
|
||||
<P></P>
|
||||
A. El Dada and A. Ranta.
|
||||
Implementing an Open Source Arabic Resource Grammar in GF.
|
||||
In M. Mughazy (ed),
|
||||
<I>Perspectives on Arabic Linguistics XX. Papers from the Twentieth Annual Symposium on Arabic Linguistics, Kalamazoo, March 26</I>
|
||||
John Benjamins Publishing Company.
|
||||
2007.
|
||||
<br>
|
||||
<I>An outline of the Arabic resource grammar project, focusing on linguistic aspects.</I>
|
||||
<P></P>
|
||||
A. El Dada.
|
||||
Implementation of the Arabic Numerals and their Syntax in GF.
|
||||
Computational Approaches to Semitic Languages: Common Issues and Resources,
|
||||
ACL-2007 Workshop,
|
||||
June 28, 2007, Prague.
|
||||
2007.
|
||||
<A HREF="http://acl.ldc.upenn.edu/W/W07/W07-08.pdf">http://acl.ldc.upenn.edu/W/W07/W07-08.pdf</A>
|
||||
<br>
|
||||
<I>A case study with the resource grammar, focusing on the morphosyntax</I>
|
||||
<I>and agreement of constructions with numerals.</I>
|
||||
</UL>
|
||||
|
||||
<H3>Bulgarian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/bulgarian">http://www.grammaticalframework.org/lib/src/bulgarian</A> (Krasimir Angelov)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
K. Angelov.
|
||||
Type-Theoretical Bulgarian Grammar.
|
||||
In B. Nordström and A. Ranta (eds),
|
||||
<I>Advances in Natural Language Processing (GoTAL 2008)</I>,
|
||||
LNCS/LNAI 5221, Springer,
|
||||
2008.
|
||||
<A HREF="http://link.springer.com/chapter/10.1007%2F978-3-540-85287-2_6">http://link.springer.com/chapter/10.1007%2F978-3-540-85287-2_6</A>
|
||||
<br>
|
||||
<I>Explains the implementation of a Bulgarian resource grammar in GF.</I>
|
||||
</UL>
|
||||
|
||||
<H3>Catalan</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/catalan">http://www.grammaticalframework.org/lib/src/catalan</A> <A HREF="http://www.grammaticalframework.org/lib/src/romance">http://www.grammaticalframework.org/lib/src/romance</A> (Jordi Saludes, Inari Listenmaa)
|
||||
</UL>
|
||||
|
||||
<H3>Chinese</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/chinese">http://www.grammaticalframework.org/lib/src/chinese</A> (Aarne Ranta, Zhuo Lin Qiqige, Chen Peng, Qiao Haiyan)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Chen Peng,
|
||||
Implementation of a Chinese Resource Grammar in Grammatical Framework.
|
||||
<I>International Journal of Knowledge and Language Processing</I>,
|
||||
4(1),
|
||||
2013,
|
||||
pp. 26-34.
|
||||
<A HREF="http://www.ijklp.org/archives/vol4no1/Implementation%20of%20Chinese%20Resource%20Grammar%20in%20Grammatical%20Framework.pdf">http://www.ijklp.org/archives/vol4no1/Implementation%20of%20Chinese%20Resource%20Grammar%20in%20Grammatical%20Framework.pdf</A>
|
||||
<P></P>
|
||||
Aarne Ranta.
|
||||
Grammatical Framework and Chinese.
|
||||
Appendix to the GF book (A. Ranta, <I>Grammatical Framework</I>, CSLI 2011),
|
||||
2012.
|
||||
<A HREF="http://www.grammaticalframework.org/gf-book/gf-chinese-appendix.pdf">http://www.grammaticalframework.org/gf-book/gf-chinese-appendix.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Danish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/danish">http://www.grammaticalframework.org/lib/src/danish</A> <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta)
|
||||
</UL>
|
||||
|
||||
<H3>Dutch</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/dutch">http://www.grammaticalframework.org/lib/src/dutch</A> (Aarne Ranta, Femke Johansson)
|
||||
</UL>
|
||||
|
||||
<H3>English</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/english">http://www.grammaticalframework.org/lib/src/english</A> (Aarne Ranta, Björn Bringert, Krasimir Angelov)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
A. Ranta.
|
||||
The GF Resource Grammar Library.
|
||||
<I>Linguistic Issues in Language Technology</I>,
|
||||
2 (2),
|
||||
2009.
|
||||
<A HREF="http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158">PDF</A>
|
||||
<br>
|
||||
<I>A systematic presentation of the library from the linguistic point of view.</I>
|
||||
<I>Not only about English, but English examples abound.</I>
|
||||
</UL>
|
||||
|
||||
<H3>Estonian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/estonian">http://www.grammaticalframework.org/lib/src/estonian</A> (Kaarel Kaljurand, Inari Listenmaa)
|
||||
</UL>
|
||||
|
||||
<H3>Finnish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/finnish">http://www.grammaticalframework.org/lib/src/finnish</A> (Aarne Ranta, Inari Listenmaa)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
A. Ranta.
|
||||
On the Syntax and Translation of Finnish Discourse Clitics.
|
||||
In D. Santos, K. Lindén and W. Ng'ang'a (eds),
|
||||
<I>Shall We Play the Festschrift Game?</I>
|
||||
<I>Essays on the Occasion of Lauri Carlson's 60th Birthday</I>.
|
||||
Springer, Heidelberg, 2012.
|
||||
pp. 227-241.
|
||||
<A HREF="http://link.springer.com/chapter/10.1007/978-3-642-30773-7_14">http://link.springer.com/chapter/10.1007/978-3-642-30773-7_14</A>
|
||||
draft version <A HREF="http://www.cse.chalmers.se/~aarne/articles/discourse-clitics.pdf">http://www.cse.chalmers.se/~aarne/articles/discourse-clitics.pdf</A>
|
||||
<P></P>
|
||||
A. Ranta.
|
||||
How predictable is Finnish morphology? An experiment on lexicon construction.
|
||||
In J. Nivre, M. Dahllöf and B. Megyesi (eds),
|
||||
<I>Resourceful Language Technology: Festschrift in Honor of Anna Sågvall Hein</I>,
|
||||
University of Uppsala,
|
||||
2008.
|
||||
<A HREF="http://publications.uu.se/abstract.xsql?dbid=8933">http://publications.uu.se/abstract.xsql?dbid=8933</A>
|
||||
<br>
|
||||
<I>Presents an experiment on smart paradigms in Finnish.</I>
|
||||
</UL>
|
||||
|
||||
<H3>French</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/french">http://www.grammaticalframework.org/lib/src/french</A> <A HREF="http://www.grammaticalframework.org/lib/src/romance">http://www.grammaticalframework.org/lib/src/romance</A> (Aarne Ranta, Ramona Enache)
|
||||
</UL>
|
||||
|
||||
<H3>German</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/german">http://www.grammaticalframework.org/lib/src/german</A> (Aarne Ranta, Harald Hammarström, Erzsébet Galgóczy)
|
||||
</UL>
|
||||
|
||||
<H3>Greek</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/greek">http://www.grammaticalframework.org/lib/src/greek</A> (Ioanna Papadopoulou)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Ioanna Papadopoulou.
|
||||
GF Modern Greek Resource Grammar,
|
||||
MA thesis, University of Gothenburg,
|
||||
2013.
|
||||
<P></P>
|
||||
Ioanna Papadopoulou.
|
||||
GF Modern Greek Resource Grammar.
|
||||
RANLP 2013.
|
||||
</UL>
|
||||
|
||||
<H3>Hebrew</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/hebrew">http://www.grammaticalframework.org/lib/src/hebrew</A> (Dana Dannélls)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
D. Dannélls and J. Camilleri.
|
||||
Verb Morphology of Hebrew and Maltese - Towards an Open Source Type Theoretical Resource Grammar in GF.
|
||||
<I>Proceedings of the Language Resources (LRs) and Human Language Technologies (HLT) for Semitic Languages Status, Updates, and Prospects, LREC-2010 Workshop</I>,
|
||||
Malta, pp. 57-61.
|
||||
2010.
|
||||
<A HREF="http://spraakdata.gu.se/svedd/pub/lrec10.pdf">http://spraakdata.gu.se/svedd/pub/lrec10.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Hindi</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/hindi">http://www.grammaticalframework.org/lib/src/hindi</A> <A HREF="http://www.grammaticalframework.org/lib/src/hindustani">http://www.grammaticalframework.org/lib/src/hindustani</A> (Shafqat Virk, K.V.S. Prasad, Muhammad Humayoun, Aarne Ranta)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Shafqat Virk.
|
||||
<I>Computational Linguistics Resources for Indo-Iranian Languages</I>,
|
||||
PhD Thesis, University of Gothenburg, 2013.
|
||||
<A HREF="http://www.cse.chalmers.se/~virk/shafqat-phd-thesis.pdf">http://www.cse.chalmers.se/~virk/shafqat-phd-thesis.pdf</A>
|
||||
<P></P>
|
||||
K.V.S. Prasad and Shafqat Virk.
|
||||
Computational evidence that
|
||||
Hindi and Urdu share a grammar but not the lexicon.
|
||||
In The 3rd Workshop
|
||||
on South and Southeast Asian NLP, COLING 2012. <I>Reprinted in Shafqat's thesis</I>
|
||||
</UL>
|
||||
|
||||
<H3>Icelandic</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/icelandic">http://www.grammaticalframework.org/lib/src/icelandic</A> (Bjarki Traustason)
|
||||
<P></P>
|
||||
<B>Publications</B>
|
||||
<P></P>
|
||||
Bjarki Traustason, MSc thesis, Chalmers
|
||||
</UL>
|
||||
|
||||
<H3>Interlingua</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/interlingua">http://www.grammaticalframework.org/lib/src/interlingua</A> (Jean-Philippe Bernardy)
|
||||
</UL>
|
||||
|
||||
<H3>Italian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/italian">http://www.grammaticalframework.org/lib/src/italian</A> <A HREF="http://www.grammaticalframework.org/lib/src/romance">http://www.grammaticalframework.org/lib/src/romance</A> (Aarne Ranta, Ramona Enache, Gabriele Paganelli)
|
||||
</UL>
|
||||
|
||||
<H3>Japanese</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/japanese">http://www.grammaticalframework.org/lib/src/japanese</A> (Liza Zimina)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Elizaveta Zimina.
|
||||
GF Japanese Resource Grammar,
|
||||
MA Thesis, University of Gothenburg,
|
||||
2012.
|
||||
<A HREF="http://www.ling.gu.se/~lager/MLT/zimina_thesis_draft.pdf">http://www.ling.gu.se/~lager/MLT/zimina_thesis_draft.pdf</A>
|
||||
<P></P>
|
||||
Elizaveta Zimina.
|
||||
Fitting a Round Peg in a Square Hole: Japanese Resource Grammar in GF.
|
||||
<I>Advances in Natural Language Processing (JapTAL-2012)</I>
|
||||
Lecture Notes in Computer Science Volume 7614, 2012, pp 156-167.
|
||||
<A HREF="http://link.springer.com/chapter/10.1007%2F978-3-642-33983-7_16">http://link.springer.com/chapter/10.1007%2F978-3-642-33983-7_16</A>
|
||||
</UL>
|
||||
|
||||
<H3>Latin</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/latin">http://www.grammaticalframework.org/lib/src/latin</A> (Aarne Ranta)
|
||||
</UL>
|
||||
|
||||
<H3>Latvian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/latvian">http://www.grammaticalframework.org/lib/src/latvian</A> (Normunds Gruzitis, Peter Paikens)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
P. Paikens and N. Gruzitis.
|
||||
An implementation of a Latvian resource grammar in Grammatical Framework,
|
||||
LREC 2012, pp. 1680-1685.
|
||||
<A HREF="http://lrec.elra.info/proceedings/lrec2012/pdf/976_Paper.pdf">http://lrec.elra.info/proceedings/lrec2012/pdf/976_Paper.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Maltese</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/maltese">http://www.grammaticalframework.org/lib/src/maltese</A> (John J. Camilleri)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
John J. Camilleri,
|
||||
MSc thesis, Chalmers University of Technology, 2013.
|
||||
<P></P>
|
||||
John J. Camilleri.
|
||||
A computational grammar for Maltese: Talk at the 4th International Conference on Maltese Linguistics (GĦILM 2013). Lyon, France, 2013.
|
||||
<A HREF="http://academic.johnjcamilleri.com/presentations/2013-06%20G%C4%A6ILM%201.pdf">http://academic.johnjcamilleri.com/presentations/2013-06%20G%C4%A6ILM%201.pdf</A>
|
||||
<P></P>
|
||||
D. Dannélls and J. Camilleri.
|
||||
Verb Morphology of Hebrew and Maltese - Towards an Open Source Type Theoretical Resource Grammar in GF.
|
||||
<I>Proceedings of the Language Resources (LRs) and Human Language Technologies (HLT) for Semitic Languages Status, Updates, and Prospects, LREC-2010 Workshop</I>,
|
||||
Malta, pp. 57-61.
|
||||
2010.
|
||||
<A HREF="http://spraakdata.gu.se/svedd/pub/lrec10.pdf">http://spraakdata.gu.se/svedd/pub/lrec10.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Nepali</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/nepali">http://www.grammaticalframework.org/lib/src/nepali</A> (Dinesh Simk)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Dinesh Simk.
|
||||
Implementing the GF Resource Grammar for Nepali Language,
|
||||
MSc thesis, Chalmers University of Technology,
|
||||
2012.
|
||||
<A HREF="http://publications.lib.chalmers.se/records/fulltext/161384.pdf">http://publications.lib.chalmers.se/records/fulltext/161384.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Norwegian (bokmål)</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/norwegian">http://www.grammaticalframework.org/lib/src/norwegian</A> <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta)
|
||||
</UL>
|
||||
|
||||
<H3>Norwegian (nynorsk)</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/nynorsk">http://www.grammaticalframework.org/lib/src/nynorsk</A> (Stian Rødven Eide) <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta)
|
||||
</UL>
|
||||
|
||||
<H3>Persian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/persian">http://www.grammaticalframework.org/lib/src/persian</A> (Shafqat Virk, Elnaz Abolahrar, Sofy Moradi)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Shafqat Mumtaz Virk and Elnaz Abolahrar.
|
||||
An Open Source Persian Computational Grammar,
|
||||
LREC 2012, pp. 1686-1693.
|
||||
<A HREF="http://www.lrec-conf.org/proceedings/lrec2012/pdf/1028_Paper.pdf">http://www.lrec-conf.org/proceedings/lrec2012/pdf/1028_Paper.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Polish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/polish">http://www.grammaticalframework.org/lib/src/polish</A> (Adam Slaski, Ilona Novak)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Adam Slaski.
|
||||
Some Interesting Features of the Polish Language in Grammatical Framework.
|
||||
Slide presentation, TYPES 2010, Warsaw,
|
||||
2010.
|
||||
<A HREF="http://www.mimuw.edu.pl/~asl/publications/types2010-slides.pdf">http://www.mimuw.edu.pl/~asl/publications/types2010-slides.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Punjabi</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/punjabi">http://www.grammaticalframework.org/lib/src/punjabi</A> (Shafqat Virk, Muhammad Humayoun)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
S. Virk, M. Humayoun, and A. Ranta.
|
||||
An Open-Source Punjabi Resource Grammar.
|
||||
Proceedings of RANLP-2011, Recent Advances in Natural Language Processing,
|
||||
Hissar, Bulgaria, 12-14 September, 2011.
|
||||
pp. 70-76.
|
||||
<A HREF="http://lml.bas.bg/~iva/ranlp2011/RANLR2011_Proceedings.PDF">http://lml.bas.bg/~iva/ranlp2011/RANLR2011_Proceedings.PDF</A>
|
||||
<P></P>
|
||||
M. Humayoun and A. Ranta.
|
||||
Developing Punjabi Morphology, Corpus and Lexicon.
|
||||
<I>The 24th Pacific Asia conference on Language, Information and Computation (PACLIC24)</I>,
|
||||
2010.
|
||||
</UL>
|
||||
|
||||
<H3>Romanian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/romanian">http://www.grammaticalframework.org/lib/src/romanian</A> (Ramona Enache)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
R. Enache, A. Ranta, and K. Angelov.
|
||||
An Open-Source Computational Grammar of Romanian.
|
||||
A. Gelbukh (ed.), <I>CiCLING-2010</I>,
|
||||
LNCS 6008,
|
||||
2010.
|
||||
</UL>
|
||||
|
||||
<H3>Russian</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/russian">http://www.grammaticalframework.org/lib/src/russian</A> (Janna Khegai, Nikita Frolov)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
J. Khegai.
|
||||
GF parallel resource grammars and Russian.
|
||||
In proceedings of ACL2006
|
||||
(The joint conference of the International Committee on Computational
|
||||
Linguistics and the Association for Computational Linguistics) (pp. 475-482),
|
||||
Sydney, Australia, July 2006.
|
||||
<P></P>
|
||||
J. Khegai and A. Ranta.
|
||||
Building and Using a Russian Resource Grammar in GF.
|
||||
In A. Gelbukh (ed),
|
||||
<I>Intelligent Text Processing and Computational Linguistics (CICLing-2004)</I>,
|
||||
Seoul, Korea, February 2003,
|
||||
Springer LNCS 945,
|
||||
pp. 38-41,
|
||||
2004.
|
||||
</UL>
|
||||
|
||||
<H3>Sindhi</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/sindhi">http://www.grammaticalframework.org/lib/src/sindhi</A> (Jherna Devi Oad)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Jherna Devi Oad.
|
||||
Implementing GF Resource Grammar for Sindhi language,
|
||||
MSc Thesis, Chalmers University of Technology,
|
||||
2012.
|
||||
<A HREF="http://publications.lib.chalmers.se/records/fulltext/163234.pdf">http://publications.lib.chalmers.se/records/fulltext/163234.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Spanish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/spanish">http://www.grammaticalframework.org/lib/src/spanish</A> <A HREF="http://www.grammaticalframework.org/lib/src/romance">http://www.grammaticalframework.org/lib/src/romance</A>
|
||||
(Aarne Ranta, Ingrid Andersson, Therese Söderberg, Inari Listenmaa)
|
||||
</UL>
|
||||
|
||||
<H3>Swahili</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/swahili">http://www.grammaticalframework.org/lib/src/swahili</A> (Wanjiku Ng'ang'a)
|
||||
</UL>
|
||||
|
||||
<UL>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Wanjiku Ng'ng'a.
|
||||
Building Swahili Resource Grammars for the Grammatical Framework,
|
||||
In D. Santos, K. Lindén and W. Ng'ang'a (eds),
|
||||
<I>Shall We Play the Festschrift Game?</I>
|
||||
<I>Essays on the Occasion of Lauri Carlson's 60th Birthday</I>.
|
||||
Springer, Heidelberg, 2012.
|
||||
pp. 227-241.
|
||||
<A HREF="http://link.springer.com/chapter/10.1007/978-3-642-30773-7_13">http://link.springer.com/chapter/10.1007/978-3-642-30773-7_13</A>
|
||||
</UL>
|
||||
|
||||
<H3>Swedish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/swedish">http://www.grammaticalframework.org/lib/src/swedish</A> <A HREF="http://www.grammaticalframework.org/lib/src/scandinavian">http://www.grammaticalframework.org/lib/src/scandinavian</A> (Aarne Ranta, Malin Ahlberg, Markus Forsberg)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
Malin Ahlberg.
|
||||
<I>Towards a Wide-Coverage Grammar for Swedish Using GF</I>,
|
||||
MSc thesis, University of Gothenburg,
|
||||
2012.
|
||||
<A HREF="https://gupea.ub.gu.se/bitstream/2077/28838/1/gupea_2077_28838_1.pdf">https://gupea.ub.gu.se/bitstream/2077/28838/1/gupea_2077_28838_1.pdf</A>
|
||||
<P></P>
|
||||
Malin Ahlberg and Ramona Enache.
|
||||
A Type-Theoretical Wide-Coverage Computational Grammar for Swedish.
|
||||
P. Sojka et al (eds), TSD 2012, LNCS 7499, pp. 183-190.
|
||||
<A HREF="http://link.springer.com/content/pdf/10.1007%2F978-3-642-32790-2_22.pdf">http://link.springer.com/content/pdf/10.1007%2F978-3-642-32790-2_22.pdf</A>
|
||||
</UL>
|
||||
|
||||
<H3>Thai</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/thai">http://www.grammaticalframework.org/lib/src/thai</A> (Aarne Ranta, Chotiros Kairoje)
|
||||
</UL>
|
||||
|
||||
<H3>Turkish</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/turkish">http://www.grammaticalframework.org/lib/src/turkish</A> (Server Cimen)
|
||||
</UL>
|
||||
|
||||
<H3>Urdu</H3>
|
||||
|
||||
<UL>
|
||||
<LI><B>Source</B>: <A HREF="http://www.grammaticalframework.org/lib/src/urdu">http://www.grammaticalframework.org/lib/src/urdu</A> <A HREF="http://www.grammaticalframework.org/lib/src/hindustani">http://www.grammaticalframework.org/lib/src/hindustani</A> (Shafqat Virk, Muhamman Humayoun)
|
||||
<P></P>
|
||||
<LI><B>Publications</B>
|
||||
<P></P>
|
||||
S. Virk, M. Humayoun, and A. Ranta.
|
||||
An Open Source Urdu Resource Grammar.
|
||||
<I>Proceedings of the 8th Workshop on Asian Language Resources (Coling 2010 workshop)</I>,
|
||||
2010.
|
||||
<P></P>
|
||||
M. Humayoun, H. Hammarström, and A. Ranta.
|
||||
Urdu Morphology, Orthography and Lexicon Extraction.
|
||||
<I>CAASL-2: The Second Workshop on Computational Approaches to Arabic Script-based Languages</I>,
|
||||
July 21-22, 2007, LSA 2007 Linguistic Institute, Stanford University.
|
||||
2007.
|
||||
<P></P>
|
||||
See also <B>Hindi</B> above.
|
||||
</UL>
|
||||
|
||||
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
|
||||
<!-- cmdline: txt2tags -thtml rgl-publications.txt -->
|
||||
</BODY></HTML>
|
||||
862
doc/status.html
862
doc/status.html
@@ -1,862 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.org">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
|
||||
<TITLE>The Status of the GF Resource Grammar Library</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<CENTER>
|
||||
<H1>The Status of the GF Resource Grammar Library</H1>
|
||||
<FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
|
||||
<FONT SIZE="4">20170119</FONT>
|
||||
</CENTER>
|
||||
|
||||
<P>
|
||||
The following table gives the languages currently available in the
|
||||
GF Resource Grammar Library.
|
||||
</P>
|
||||
<P>
|
||||
For another view, see the
|
||||
<A HREF="http://www.postcrashgames.com/gf_world/">The Resource Grammar Library coverage map</A> .
|
||||
</P>
|
||||
<P>
|
||||
Corrections and additions are welcome! Notice that only those parts of implementations
|
||||
that are currently available via <A HREF="http://grammaticalframework.org">http://grammaticalframework.org</A>
|
||||
are marked in the table
|
||||
</P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="4">
|
||||
<TR>
|
||||
<TH>ISO</TH>
|
||||
<TH>Language</TH>
|
||||
<TH>Darcs</TH>
|
||||
<TH>Mini</TH>
|
||||
<TH>Parad</TH>
|
||||
<TH>Lex</TH>
|
||||
<TH>Lang</TH>
|
||||
<TH>API</TH>
|
||||
<TH>Symb</TH>
|
||||
<TH>Irreg</TH>
|
||||
<TH>Dict</TH>
|
||||
<TH>Trans</TH>
|
||||
<TH>tested</TH>
|
||||
<TH>publ</TH>
|
||||
<TH COLSPAN="2">authors</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Afr</TD>
|
||||
<TD>Afrikaans</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*LP,LM</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Amh</TD>
|
||||
<TD>Amharic</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*MK</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ara</TD>
|
||||
<TD>Arabic</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>AD</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Bul</TD>
|
||||
<TD>Bulgarian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*KA</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Cat</TD>
|
||||
<TD>Catalan</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*JS,*IL</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Chi</TD>
|
||||
<TD>Chinese</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>ZL,*AR,*CP,QH</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Dan</TD>
|
||||
<TD>Danish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Dut</TD>
|
||||
<TD>Dutch</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,FJ</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Eng</TD>
|
||||
<TD>English</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*AR,BB,KA</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Est</TD>
|
||||
<TD>Estonian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*KK,*IL</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Fin</TD>
|
||||
<TD>Finnish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*AR,*IL</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Fre</TD>
|
||||
<TD>French</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,RE</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ger</TD>
|
||||
<TD>German</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,HH,EG</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Gre</TD>
|
||||
<TD>Greek(mod)</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*IP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Grc</TD>
|
||||
<TD>Greek(anc)</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*HLe</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Heb</TD>
|
||||
<TD>Hebrew</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*DD</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Hin</TD>
|
||||
<TD>Hindi</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*SV,*KP,MH,AR,PK</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ice</TD>
|
||||
<TD>Icelandic</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*BT</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ina</TD>
|
||||
<TD>Interlingua</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>JB</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ita</TD>
|
||||
<TD>Italian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,*RE,GP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Jpn</TD>
|
||||
<TD>Japanese</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*LZ</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Lat</TD>
|
||||
<TD>Latin</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,*HLa</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Lav</TD>
|
||||
<TD>Latvian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*NG,*PP</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Mlt</TD>
|
||||
<TD>Maltese</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*JC</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Mon</TD>
|
||||
<TD>Mongolian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*NE</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Nep</TD>
|
||||
<TD>Nepali</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*DS</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Nno</TD>
|
||||
<TD>Norwegian(n)</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*SRE</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Nor</TD>
|
||||
<TD>Norwegian(b)</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Pes</TD>
|
||||
<TD>Persian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*SV,*EA,SM</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Pnb</TD>
|
||||
<TD>Punjabi</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*SV,MH</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Pol</TD>
|
||||
<TD>Polish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>IN,*AS</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Ron</TD>
|
||||
<TD>Romanian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*RE</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Rus</TD>
|
||||
<TD>Russian</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>JK,*NF</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Snd</TD>
|
||||
<TD>Sindhi</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*SV,*JD</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Spa</TD>
|
||||
<TD>Spanish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,IA,TS,*IL</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Swa</TD>
|
||||
<TD>Swahili</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*WN,JM</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Swe</TD>
|
||||
<TD>Swedish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*MA,*AR,MF</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Tha</TD>
|
||||
<TD>Thai</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*AR,CK</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Tsn</TD>
|
||||
<TD>Tswana</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*LPs,AB</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Tur</TD>
|
||||
<TD>Turkish</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>*SC,KA</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Urd</TD>
|
||||
<TD>Urdu</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>++</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>-</TD>
|
||||
<TD>+</TD>
|
||||
<TD>+</TD>
|
||||
<TD>*SV,MH</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
ISO = 3-letter ISO language code, used in library file names
|
||||
(mostly ISO 639-2 B (bibliographic))
|
||||
</P>
|
||||
<P>
|
||||
Darcs = available in the darcs repository of <S><A HREF="http://code.haskell.org/gf">http://code.haskell.org/gf</A></S> <A HREF="http://www.grammaticalframework.org/">http://www.grammaticalframework.org/</A>
|
||||
</P>
|
||||
<P>
|
||||
Mini = minimal resource, compiles with <CODE>make minimal</CODE> (obsolete)
|
||||
</P>
|
||||
<P>
|
||||
Parad = <CODE>Paradigms</CODE> file complete for major POS, ++ means with smart paradigms
|
||||
</P>
|
||||
<P>
|
||||
Lex = the resource <CODE>Lexicon</CODE> (nearly) complete
|
||||
</P>
|
||||
<P>
|
||||
Lang = the resource <CODE>Syntax</CODE> (nearly) complete
|
||||
</P>
|
||||
<P>
|
||||
API = the <CODE>Syntax</CODE> compiles
|
||||
</P>
|
||||
<P>
|
||||
API = the <CODE>Symbolic</CODE> API compiles
|
||||
</P>
|
||||
<P>
|
||||
Irreg = the <CODE>Irreg</CODE> module with irregular verbs exists
|
||||
</P>
|
||||
<P>
|
||||
Dict = the <CODE>Dict</CODE> module, large-scale morphological lexicon, exists
|
||||
</P>
|
||||
<P>
|
||||
Trans = large-scale translation module and dictionary exists
|
||||
</P>
|
||||
<P>
|
||||
tested = tested in some applications, ++ means extensively tested with no major issues
|
||||
</P>
|
||||
<P>
|
||||
publ = publications available, see <A HREF="./rgl-publications.html">RGL publication list</A>
|
||||
</P>
|
||||
<P>
|
||||
authors = main contributors, * means still active
|
||||
(ready to fix bugs, answer to questions, etc)
|
||||
</P>
|
||||
|
||||
<H3>Author codes</H3>
|
||||
|
||||
<P>
|
||||
AB Ansu Berg,
|
||||
AD Ali El Dada,
|
||||
AR Aarne Ranta,
|
||||
AS Adam Slaski,
|
||||
BB Björn Bringert,
|
||||
BT Bjarki Traustason,
|
||||
CK Chotiros Kairoje,
|
||||
CP Chen Peng,
|
||||
DD Dana Dannélls,
|
||||
DS Dinesh Simk,
|
||||
EA Elnaz Abolahrar,
|
||||
EG Erzsébet Galgóczy
|
||||
FJ Femke Johansson,
|
||||
HH Harald Hammarström,
|
||||
HLa Herbert Lange,
|
||||
HLe Hans Leiss,
|
||||
GP Gabriele Paganelli,
|
||||
IA Ingrid Andersson,
|
||||
IL Inari Listenmaa,
|
||||
IN Ilona Novak,
|
||||
IP Ioanna Papadopoulou,
|
||||
JB Jean-Philippe Bernardy,
|
||||
JC John J. Camilleri,
|
||||
JD Jherna Devi,
|
||||
JK Janna Khegai,
|
||||
JM Juliet Mutahi,
|
||||
JS Jordi Saludes,
|
||||
KA Krasimir Angelov,
|
||||
KK Kaarel Kaljurand,
|
||||
KP Kuchi Prasad,
|
||||
LM Laurette Marais,
|
||||
LP Laurette Pretorius,
|
||||
LZ Liza Zimina,
|
||||
MA Malin Ahlberg,
|
||||
MF Markus Forsberg,
|
||||
MK Markos Kassa Gobena,
|
||||
MH Muhammad Humayoun,
|
||||
NE Nyamsuren Erdenebadrakh,
|
||||
NF Nick Frolov,
|
||||
NG Normunds Gruzitis,
|
||||
QH Qiao Haiyan,
|
||||
RE Ramona Enache,
|
||||
PP Peteris Paikens,
|
||||
SC Server Cimen,
|
||||
SM Sofy Moradi,
|
||||
SRE Stian Rødven Eide,
|
||||
SV Shafqat Virk,
|
||||
TH Therese Söderberg,
|
||||
WN Wanjiku Ng'ang'a,
|
||||
ZL Zhuo Lin Qiqige
|
||||
</P>
|
||||
|
||||
<H2>Rules</H2>
|
||||
|
||||
<P>
|
||||
Only components available at <A HREF="http://grammaticalframework.org">http://grammaticalframework.org</A> are indicated in the table
|
||||
(exceptions: Ancient Greek, Mongolian, to appear soon).
|
||||
</P>
|
||||
<P>
|
||||
If you want to work on a language already in the table, please be kind and contact the
|
||||
active authors of it.
|
||||
</P>
|
||||
<P>
|
||||
Feel free to start a new language that is not yet in the table - but let us know and
|
||||
contribute some code as soon as you can!
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
|
||||
<!-- cmdline: txt2tags -thtml status.txt -->
|
||||
</BODY></HTML>
|
||||
14298
doc/synopsis.html
14298
doc/synopsis.html
File diff suppressed because it is too large
Load Diff
76
doc/synopsis/Makefile
Normal file
76
doc/synopsis/Makefile
Normal file
@@ -0,0 +1,76 @@
|
||||
# Your GF_LIB_PATH must be set in order for this build script to work
|
||||
|
||||
.PHONY: all index clean
|
||||
|
||||
GF_alltenses=$(GF_LIB_PATH)/alltenses
|
||||
GF=gf
|
||||
GFDOC=gfdoc
|
||||
|
||||
ROOT=../..
|
||||
S=$(ROOT)/src
|
||||
CONFIG=$(ROOT)/languages.csv
|
||||
|
||||
# List of languages extracted from languages.csv, with 'Synopsis' column == y
|
||||
LANGS=$(shell cat $(CONFIG) | cut -d',' -f1,11 | grep ',y' | cut -d',' -f1)
|
||||
|
||||
# This list was constructed by observing what files MkSynopsis.hs reads
|
||||
SRC_FILES=$(S)/abstract/Common.gf $(S)/abstract/Cat.gf $(S)/api/Constructors.gf $(S)/abstract/Structural.gf $(patsubst %,$S/*/Paradigms%.gf,$(LANGS))
|
||||
|
||||
EXAMPLES_OUT=$(patsubst %,api-examples-%.txt,$(LANGS))
|
||||
INCLUDES=intro.txt categories-intro.txt categories-imagemap.html categories.png additional.txt browse.txt example.txt
|
||||
|
||||
TMP=tmp.html
|
||||
TEMPLATE=template.html
|
||||
|
||||
all: index
|
||||
|
||||
index: index.html
|
||||
|
||||
index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
|
||||
runghc -i$(ROOT) MkSynopsis.hs
|
||||
|
||||
TITLE=$(shell head -n 1 index.txt)
|
||||
index.html: index.txt $(TEMPLATE)
|
||||
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$<
|
||||
sed -i.bak "s/<A NAME=\"\(.*\)\"><\/A>/<div id=\"\1\"><\/div>/" $@
|
||||
pandoc \
|
||||
--from=html \
|
||||
--to=html5 \
|
||||
--standalone \
|
||||
--template=$(TEMPLATE) \
|
||||
--metadata='title:"$(TITLE)"' \
|
||||
--variable='lang:en' \
|
||||
--variable='rel-root:$(ROOT)/..' \
|
||||
--css="synopsis.css" \
|
||||
--include-after-body="quicklinks.html" \
|
||||
--output=$(TMP) \
|
||||
$@
|
||||
mv $(TMP) $@
|
||||
sed -i.bak "s/<table>/<table class=\"table w-auto\">/" $@
|
||||
sed -i.bak -e '/img src="categories.png"/r categories-imagemap.html' -e '/img src="categories.png"/d' $@
|
||||
rm "$@.bak"
|
||||
|
||||
categories.png: categories.dot
|
||||
dot -Tpng $^ > $@
|
||||
|
||||
categories-imagemap.html: categories.dot
|
||||
rm -f $@
|
||||
echo '<img src="categories.png" usemap="#categories">' > $@
|
||||
dot -Tcmapx $^ >> $@
|
||||
|
||||
api-examples.gfs: api-examples.txt MkExx.hs
|
||||
runghc MkExx.hs < $< > $@
|
||||
|
||||
# Since .gfo files aren't self-contained, the dependencies given here are
|
||||
# incomplete. But I am thinking that the Try%.gfo file will always be newer
|
||||
# than any other files it depends on, so the rule will trigger when
|
||||
# needed anyway. //TH 2018-10-22
|
||||
api-examples-%.txt: $(GF_alltenses)/Try%.gfo api-examples.gfs
|
||||
GF_LIB_PATH=$(GF_LIB_PATH) $(GF) -retain -s $< <api-examples.gfs >$@
|
||||
|
||||
clean:
|
||||
rm -rf \
|
||||
index.txt \
|
||||
index.html \
|
||||
api-examples.gfs \
|
||||
$(EXAMPLES_OUT)
|
||||
32
doc/synopsis/MkExx.hs
Normal file
32
doc/synopsis/MkExx.hs
Normal file
@@ -0,0 +1,32 @@
|
||||
-- make a script for computing examples
|
||||
-- usage: runghc MkExx.hs <koe.txt >koe.gfs
|
||||
-- then: gf -retain -s ../alltenses/TryRon.gfo <koe.gfs
|
||||
-- called automatically by 'make exx'
|
||||
|
||||
main = interact (unlines . concatMap mkScript . takeWhile (/="--.") . lines)
|
||||
|
||||
mkScript l = case l of
|
||||
' ':_ ->
|
||||
let ident = mkIdent $ unwords $ takeWhile (/="--") $ words l
|
||||
in [add $ psq ident]
|
||||
'-':_ -> []
|
||||
_ -> [
|
||||
add $ psq l,
|
||||
add $ "cc -one " ++ l,
|
||||
add $ psq "*"
|
||||
]
|
||||
|
||||
add = ('\n':)
|
||||
|
||||
psq s = "ps \"" ++ s ++ "\""
|
||||
|
||||
-- makes mkUtt : QS -> Utt to mkUtt-QS-Utt
|
||||
mkIdent :: String -> String
|
||||
mkIdent = concatMap unspec where
|
||||
unspec c = case c of
|
||||
' ' -> ""
|
||||
'>' -> ""
|
||||
'(' -> ""
|
||||
')' -> ""
|
||||
':' -> "-"
|
||||
_ -> [c]
|
||||
@@ -1,29 +1,31 @@
|
||||
module MkExxTable (getApiExx, ApiExx, prApiEx, mkEx) where
|
||||
|
||||
import System.Cmd
|
||||
import System.Environment
|
||||
--import System.Cmd
|
||||
import System.Environment(getArgs)
|
||||
import Control.Monad(when)
|
||||
import qualified Data.Map as M
|
||||
import Data.Char
|
||||
|
||||
main = do
|
||||
xx <- getArgs
|
||||
aexx <- getApiExx xx
|
||||
xx <- getArgs
|
||||
aexx <- getApiExx' True xx
|
||||
return () -- putStrLn $ prApiExx aexx
|
||||
|
||||
getApiExx :: [FilePath] -> IO ApiExx
|
||||
getApiExx xx = do
|
||||
getApiExx = getApiExx' False
|
||||
|
||||
getApiExx' verbose xx = do
|
||||
s <- readFile (head xx)
|
||||
let aet = getApiExxTrees $ filter validOutput $ mergeOutput $ lines s
|
||||
aeos <- mapM readApiExxOne xx
|
||||
let aet = getApiExxTrees $ filter validOutput $ mergeOutput $ lines s
|
||||
aeos <- mapM (readApiExxOne verbose) xx
|
||||
let aexx = mkApiExx $ ("API",aet) : aeos
|
||||
-- putStrLn $ prApiExx aexx
|
||||
return aexx
|
||||
|
||||
readApiExxOne file = do
|
||||
readApiExxOne verbose file = do
|
||||
s <- readFile file
|
||||
let lang = reverse (take 3 (drop 4 (reverse file))) -- api-exx-*Eng*.txt
|
||||
let api = getApiExxOne $ filter validOutput $ mergeOutput $ lines s
|
||||
putStrLn $ unlines $ prApiEx api ---
|
||||
when verbose $ putStrLn $ unlines $ prApiEx api ---
|
||||
return (lang,api)
|
||||
|
||||
-- map function -> language -> example
|
||||
@@ -54,7 +56,7 @@ cleanUp = dropWhile (flip elem " >")
|
||||
--- this makes txt2tags loop...
|
||||
mergeOutput ls = ls
|
||||
mergeOutputt ls = case ls of
|
||||
l@('>':_):ll -> let (ll1,ll2) = span ((/=">") . take 1) ll in unwords (l : map (unwords . words) ll1) : mergeOutput ll2
|
||||
l@('>':_):ll -> let (ll1,ll2) = span ((/=">") . take 1) ll in unwords (l : map (unwords . words) ll1) : mergeOutput ll2
|
||||
_:ll -> mergeOutput ll
|
||||
_ -> []
|
||||
|
||||
@@ -62,15 +64,15 @@ mergeOutputt ls = case ls of
|
||||
validOutput = (==">") . take 1
|
||||
|
||||
mkApiExx :: [(String,ApiExxOne)] -> ApiExx
|
||||
mkApiExx ltes =
|
||||
M.fromList [(t,
|
||||
M.fromList [(l,maybe "NONE" id (M.lookup t te)) | (l,te) <- ltes])
|
||||
mkApiExx ltes =
|
||||
M.fromList [(t,
|
||||
M.fromList [(l,maybe "NONE" id (M.lookup t te)) | (l,te) <- ltes])
|
||||
| t <- M.keys firstL]
|
||||
where
|
||||
firstL = snd (head ltes)
|
||||
|
||||
prApiExx :: ApiExx -> String
|
||||
prApiExx aexx = unlines
|
||||
prApiExx aexx = unlines
|
||||
[unlines (t:prApiEx lexx) | (t,lexx) <- M.toList aexx]
|
||||
|
||||
prApiEx :: M.Map String String -> [String]
|
||||
@@ -78,7 +80,7 @@ prApiEx apexx = case M.toList apexx of
|
||||
(a,e):lexx -> (a ++ ": ``" ++ unwords (words e) ++ "``"):
|
||||
[l ++ ": //" ++ mkEx l e ++ "//" | (l,e) <- lexx]
|
||||
|
||||
mkEx l = unws . bind . mkE . words where
|
||||
mkEx l = unws . bind . mkE . words where
|
||||
unws = if elem l ["Chi","Jpn","Tha"] then concat else unwords -- remove spaces
|
||||
mkE e = case e of
|
||||
"atomic":"term":_ -> ["*"]
|
||||
@@ -98,6 +100,6 @@ bind ws = case ws of
|
||||
"&+":ws2 -> bind ws2
|
||||
"Predef.BIND":ws2 -> bind ws2
|
||||
"Predef.SOFT_BIND":ws2 -> bind ws2
|
||||
w : ws2 -> w : bind ws2
|
||||
w : "++" : ws2 -> w : bind ws2
|
||||
w : ws2 -> w : bind ws2
|
||||
_ -> ws
|
||||
@@ -1,64 +1,62 @@
|
||||
import MkExxTable
|
||||
import System.Cmd
|
||||
import System.Environment
|
||||
import System.Process(system)
|
||||
import System.FilePath((</>),(<.>))
|
||||
import Data.Char
|
||||
import Data.List
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.Map as M
|
||||
---import Debug.Trace ----
|
||||
import Text.Printf
|
||||
import Config (loadLangsFrom, LangInfo (..))
|
||||
import qualified Config
|
||||
|
||||
type Cats = [(String,String,String)]
|
||||
type Rules = [(String,String,String)]
|
||||
|
||||
-- the file generated
|
||||
synopsis = "synopsis.txt"
|
||||
outfile :: FilePath
|
||||
outfile = "index.txt"
|
||||
|
||||
-- the languages.csv config file
|
||||
configFile :: FilePath
|
||||
configFile = ".." </> ".." </> Config.configFile
|
||||
|
||||
-- the language in which revealed examples are shown
|
||||
revealedLang :: String
|
||||
revealedLang = "Eng"
|
||||
|
||||
-- all languages shown
|
||||
apiExxFiles = ["api-examples-" ++ lang ++ ".txt" | lang <- words
|
||||
-- "Eng Chi"
|
||||
"Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd"
|
||||
]
|
||||
|
||||
-- | This function puts together a txt2tags file which is then converted to HTML by the Makefile
|
||||
main :: IO ()
|
||||
main = do
|
||||
xx <- getArgs
|
||||
let isLatex = case xx of
|
||||
"-tex":_ -> True
|
||||
_ -> False
|
||||
langs <- loadLangsFrom configFile >>= return . filter langSynopsis
|
||||
cs1 <- getCats commonAPI
|
||||
cs2 <- getCats catAPI
|
||||
let cs = sortCats (cs1 ++ cs2)
|
||||
writeFile synopsis "GF Resource Grammar Library: Synopsis"
|
||||
append "B. Bringert, T. Hallgren, and A. Ranta"
|
||||
writeFile outfile "GF Resource Grammar Library: Synopsis"
|
||||
space
|
||||
append "%!Encoding:utf-8"
|
||||
append "%!style(html): ./revealpopup.css"
|
||||
space
|
||||
append "%!postproc(html): '#divreveal' '<div class=reveal>'"
|
||||
append "%!postproc(html): '#divpopup' '<div class=popup>'"
|
||||
append "%!postproc(html): '#ediv' '</div>'"
|
||||
append "%!postproc(html): '#UL' '<ul>'"
|
||||
append "%!postproc(html): '#EUL' '</ul>'"
|
||||
append "%!postproc(html): '#LI' '<li>'"
|
||||
append "%!postproc(html): '(SRC=\"categories.png\")' '\\1 USEMAP=\"#categories\"'"
|
||||
append "%!postproc(html): '#LParadigms' '<a name=\"RParadigms\"></a>'"
|
||||
append "%!postproc(tex): '#LParadigms' ''"
|
||||
append "%!postproc(html): '#quicklinks' '<script src=\"quicklinks.js\"></script>'"
|
||||
append "%!postproc(tex): '#quicklinks' ''"
|
||||
append ("%!postproc(html): '#LANGUAGE_COUNT' '" ++ show (length langs) ++ "'")
|
||||
append ("%!postproc(html): '#LANGUAGES' '" ++ intercalate ", " (map langName langs) ++ ".'")
|
||||
delimit $ addToolTips cs
|
||||
include "synopsis-intro.txt"
|
||||
include "intro.txt"
|
||||
space
|
||||
title "Categories"
|
||||
space
|
||||
link "Source 1:" commonAPI
|
||||
space
|
||||
link "Source 2:" catAPI
|
||||
space
|
||||
append "==A hierarchic view==\n"
|
||||
stitle "A hierarchic view"
|
||||
space
|
||||
include "categories-intro.txt"
|
||||
append "==Explanations==\n"
|
||||
delimit $ mkCatTable isLatex cs
|
||||
stitle "Explanations"
|
||||
space
|
||||
delimit $ mkCatTable cs
|
||||
space
|
||||
title "Syntax Rules and Structural Words"
|
||||
space
|
||||
@@ -66,42 +64,35 @@ main = do
|
||||
space
|
||||
link "Source 2:" structuralAPI
|
||||
space
|
||||
apiExx <- getApiExx apiExxFiles
|
||||
apiExx <- getApiExx (apiExxFiles langs)
|
||||
rs <- getRules apiExx syntaxAPI
|
||||
--- putStrLn $ unlines ["p -cat=" ++ last (words t) ++
|
||||
--- " \"" ++ e ++ "\"" | (_,t,e) <- rs, not (null e)] ----
|
||||
rs2 <- getRules apiExx structuralAPI
|
||||
let rss = rs ++ rs2
|
||||
--- mapM_ putStrLn [f ++ " " ++ e | (f,_,e) <- rss]
|
||||
delimit $ mkSplitTables True isLatex apiExx cs rss
|
||||
delimit $ mkSplitTables True apiExx cs rss
|
||||
space
|
||||
-- title "Structural Words"
|
||||
-- space
|
||||
-- link "Source:" structuralAPI
|
||||
-- space
|
||||
-- rs <- rulesTable False isLatex cs structuralAPI
|
||||
-- rs <- rulesTable False cs structuralAPI
|
||||
-- delimit rs
|
||||
space
|
||||
title "Lexical Paradigms"
|
||||
mapM_ (putParadigms isLatex cs) paradigmFiles
|
||||
append "#LParadigms"
|
||||
mapM_ (putParadigms cs) (paradigmFiles langs)
|
||||
space
|
||||
include "synopsis-additional.txt"
|
||||
include "additional.txt"
|
||||
space
|
||||
include "synopsis-browse.txt"
|
||||
include "browse.txt"
|
||||
space
|
||||
title "An Example of Usage"
|
||||
space
|
||||
include "synopsis-example.txt"
|
||||
include "example.txt"
|
||||
space
|
||||
title "Table of Contents"
|
||||
space
|
||||
append "%%toc"
|
||||
space
|
||||
append "#quicklinks"
|
||||
space
|
||||
let format = if isLatex then "tex" else "html"
|
||||
system $ "txt2tags -t" ++ format ++ " " ++ " --toc " ++ synopsis
|
||||
if isLatex then (system $ "pdflatex synopsis.tex") >> return () else return ()
|
||||
|
||||
addToolTips :: Cats -> [String]
|
||||
addToolTips = map f
|
||||
@@ -122,10 +113,10 @@ getCats file = do
|
||||
(expl,ex) = span (/="e.g.") exp
|
||||
_ -> getrs rs ss2
|
||||
|
||||
rulesTable :: ApiExx -> Bool -> Bool -> Cats -> FilePath -> IO [String]
|
||||
rulesTable aexx hasEx isLatex cs file = do
|
||||
rulesTable :: ApiExx -> Bool -> Cats -> FilePath -> IO [String]
|
||||
rulesTable aexx hasEx cs file = do
|
||||
rs <- getRules aexx file
|
||||
return $ mkTable hasEx isLatex aexx cs rs
|
||||
return $ mkTable hasEx aexx cs rs
|
||||
|
||||
|
||||
getRules :: ApiExx -> FilePath -> IO Rules
|
||||
@@ -153,14 +144,13 @@ getRules aexx file = do
|
||||
n:ws | last n == '.' && not (null (init n)) && all isDigit (init n) -> ws
|
||||
_ -> e
|
||||
|
||||
putParadigms :: Bool -> Cats -> (String, FilePath) -> IO ()
|
||||
putParadigms isLatex cs (lang,file) = do
|
||||
putParadigms :: Cats -> (String, FilePath) -> IO ()
|
||||
putParadigms cs (lang,file) = do
|
||||
stitle ("Paradigms for " ++ lang)
|
||||
append "#LParadigms"
|
||||
space
|
||||
link "source" file
|
||||
space
|
||||
rs <- rulesTable M.empty False isLatex cs file
|
||||
rs <- rulesTable M.empty False cs file
|
||||
space
|
||||
delimit rs
|
||||
space
|
||||
@@ -172,25 +162,25 @@ inChunks i f = concat . intersperse ["\n\n"] . map f . chunks i where
|
||||
|
||||
-- Makes one table per result category.
|
||||
-- Adds a subsection header for each table.
|
||||
mkSplitTables :: Bool -> Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkSplitTables hasEx isLatex aexx cs = concatMap t . addLexicalCats cs . sortRules
|
||||
where t (c, xs) = [subtitle c expl] ++ tableOrLink
|
||||
mkSplitTables :: Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkSplitTables hasEx aexx cs = concatMap t . addLexicalCats cs . sortRules
|
||||
where t (c, xs) = [subtitle c expl, "\n"] ++ tableOrLink
|
||||
where
|
||||
expl = case [e | (n,e,_) <- cs, n == c] of
|
||||
[] -> ""
|
||||
e:_ -> e
|
||||
tableOrLink = if null xs then parad else mkTable hasEx isLatex aexx cs xs
|
||||
tableOrLink = if null xs then parad else mkTable hasEx aexx cs xs
|
||||
parad = [
|
||||
"Lexical category, constructors given in",
|
||||
"[lexical paradigms #RParadigms]."
|
||||
]
|
||||
|
||||
mkTable :: Bool -> Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkTable hasEx isLatex aexx cs = inChunks chsize (\rs -> header : map (unwords . row) rs)
|
||||
mkTable :: Bool -> ApiExx -> Cats -> Rules -> [String]
|
||||
mkTable hasEx aexx cs = inChunks chsize (\rs -> header : map (unwords . row) rs)
|
||||
where
|
||||
chsize = if isLatex then 40 else 1000
|
||||
header = if hasEx then "|| Function | Type | Example ||"
|
||||
else "|| Function | Type | Explanation ||"
|
||||
chsize = 1000
|
||||
header = if hasEx then "|| Function | Type | Example |"
|
||||
else "|| Function | Type | Explanation |"
|
||||
row (name,typ,ex) =
|
||||
let ntyp = mkIdent (name ++ " : " ++ typ) in
|
||||
if hasEx then ["|", name', "|", typ', "|", ex' ntyp, "|"]
|
||||
@@ -205,6 +195,7 @@ mkTable hasEx isLatex aexx cs = inChunks chsize (\rs -> header : map (unwords .
|
||||
expl typ = if null ex then itf "-" else itf ex
|
||||
|
||||
-- make an example with hover-popup translations
|
||||
mkExample :: M.Map String String -> String -> String
|
||||
mkExample es ex = unwords [
|
||||
"#divreveal",
|
||||
itf (maybe ex (mkEx revealedLang) (M.lookup revealedLang es)),
|
||||
@@ -227,68 +218,56 @@ mkIdent = concatMap unspec where
|
||||
':' -> "-"
|
||||
_ -> [c]
|
||||
|
||||
|
||||
mkCatTable :: Bool -> Cats -> [String]
|
||||
mkCatTable isLatex cs = inChunks chsize (\rs -> header ++ map mk1 rs) cs
|
||||
mkCatTable :: Cats -> [String]
|
||||
mkCatTable cs = inChunks chsize (\rs -> header ++ map mk1 rs) cs
|
||||
where
|
||||
header = ["|| Category | Explanation | Example ||"]
|
||||
chsize = if isLatex then 40 else 1000
|
||||
header = ["|| Category | Explanation | Example |"]
|
||||
chsize = 1000
|
||||
mk1 (name,expl,ex) = unwords ["|", showCat cs name, "|", expl, "|", typo ex, "|"]
|
||||
typo ex = if take 1 ex == "\"" then itf (init (tail ex)) else ex
|
||||
|
||||
srcPath = ("../src" ++)
|
||||
srcPath :: FilePath -> FilePath
|
||||
srcPath = ((</>) "../../src")
|
||||
|
||||
commonAPI = srcPath "/abstract/Common.gf"
|
||||
catAPI = srcPath "/abstract/Cat.gf"
|
||||
syntaxAPI = srcPath "/api/Constructors.gf"
|
||||
structuralAPI = srcPath "/abstract/Structural.gf"
|
||||
paradigmFiles = [
|
||||
("Afrikaans", srcPath "/afrikaans/ParadigmsAfr.gf"),
|
||||
("Bulgarian", srcPath "/bulgarian/ParadigmsBul.gf"),
|
||||
("Catalan", srcPath "/catalan/ParadigmsCat.gf"),
|
||||
("Chinese", srcPath "/chinese/ParadigmsChi.gf"),
|
||||
("Danish", srcPath "/danish/ParadigmsDan.gf"),
|
||||
("Dutch", srcPath "/dutch/ParadigmsDut.gf"),
|
||||
("English", srcPath "/english/ParadigmsEng.gf"),
|
||||
("Estonian", srcPath "/estonian/ParadigmsEst.gf"),
|
||||
("Finnish", srcPath "/finnish/ParadigmsFin.gf"),
|
||||
("French", srcPath "/french/ParadigmsFre.gf"),
|
||||
("German", srcPath "/german/ParadigmsGer.gf"),
|
||||
("Greek", srcPath "/greek/ParadigmsGre.gf"),
|
||||
("Hindi", srcPath "/hindi/ParadigmsHin.gf"),
|
||||
("Icelandic", srcPath "/icelandic/ParadigmsIce.gf"),
|
||||
-- ("Interlingua", srcPath "/interlingua/ParadigmsIna.gf"),
|
||||
("Italian", srcPath "/italian/ParadigmsIta.gf"),
|
||||
("Japanese", srcPath "/japanese/ParadigmsJpn.gf"),
|
||||
("Latvian", srcPath "/latvian/ParadigmsLav.gf"),
|
||||
("Maltese", srcPath "/maltese/ParadigmsMlt.gf"),
|
||||
("Mongolian", srcPath "/mongolian/ParadigmsMon.gf"),
|
||||
("Nepali", srcPath "/nepali/ParadigmsNep.gf"),
|
||||
("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"),
|
||||
("Nynorsk", srcPath "/nynorsk/ParadigmsNno.gf"),
|
||||
("Polish", srcPath "/polish/ParadigmsPol.gf"),
|
||||
("Punjabi", srcPath "/punjabi/ParadigmsPnb.gf"),
|
||||
("Romanian", srcPath "/romanian/ParadigmsRon.gf"),
|
||||
("Russian", srcPath "/russian/ParadigmsRus.gf"),
|
||||
("Sindhi", srcPath "/sindhi/ParadigmsSnd.gf"),
|
||||
("Spanish", srcPath "/spanish/ParadigmsSpa.gf"),
|
||||
("Swedish", srcPath "/swedish/ParadigmsSwe.gf"),
|
||||
("Thai", srcPath "/thai/ParadigmsTha.gf"),
|
||||
("Urdu", srcPath "/urdu/ParadigmsUrd.gf")
|
||||
commonAPI = srcPath "abstract/Common.gf"
|
||||
catAPI = srcPath "abstract/Cat.gf"
|
||||
syntaxAPI = srcPath "api/Constructors.gf"
|
||||
structuralAPI = srcPath "abstract/Structural.gf"
|
||||
|
||||
-- all languages shown (a copy of this list appears in Makefile)
|
||||
apiExxFiles :: [LangInfo] -> [FilePath]
|
||||
apiExxFiles langs =
|
||||
[ "api-examples-" ++ (langCode lang) ++ ".txt"
|
||||
| lang <- langs
|
||||
]
|
||||
|
||||
append s = appendFile synopsis ('\n':s)
|
||||
paradigmFiles :: [LangInfo] -> [(String,FilePath)]
|
||||
paradigmFiles langs =
|
||||
[ (langName lang, srcPath $ printf "%s/Paradigms%s.gf" (langDir lang) (langCode lang))
|
||||
| lang <- langs
|
||||
]
|
||||
|
||||
-- | Split a string at given character, similar to words
|
||||
splitOn :: (Char -> Bool) -> String -> [String]
|
||||
splitOn _ "" = []
|
||||
splitOn f s = takeWhile (not.f) s : splitOn f rest
|
||||
where
|
||||
rest = case dropWhile (not.f) s of
|
||||
"" -> []
|
||||
_:xs -> xs
|
||||
|
||||
append s = appendFile outfile ('\n':s)
|
||||
title s = append $ "=" ++ s ++ "="
|
||||
stitle s = append $ "==" ++ s ++ "=="
|
||||
include s = append $ "%!include: " ++ s
|
||||
space = append "\n"
|
||||
delimit ss = mapM_ append ss
|
||||
link s f = append $ s ++ " [``" ++ f ++ "`` " ++ fa ++ "]" where
|
||||
fa = "http://www.grammaticalframework.org/lib" ++ dropWhile (=='.') f
|
||||
link s f = append $ s ++ " [``" ++ f ++ "`` " ++ f ++ "]"
|
||||
|
||||
ttf s = "``" ++ s ++ "``"
|
||||
itf s = "//" ++ s ++ "//"
|
||||
|
||||
hiddenLine :: String -> Bool
|
||||
hiddenLine s = case reverse (words s) of
|
||||
"--%":_ -> True
|
||||
_ -> False
|
||||
@@ -316,7 +295,7 @@ addLexicalCats cs rss =
|
||||
resultCat :: (String,String,String) -> String
|
||||
resultCat (_,t,_) = last (words t)
|
||||
|
||||
|
||||
subtitle :: String -> String -> String
|
||||
subtitle cat expl = "==" ++ cat ++ e ++ "==" ++ "[" ++ cat ++ "]"
|
||||
where e = if null expl then "" else " - " ++ expl
|
||||
|
||||
@@ -335,8 +314,9 @@ showTyp cs = unwords . map f . words
|
||||
&& isUpper (head cat)
|
||||
|
||||
-- to work around GHC 6.12 file input
|
||||
readFileC :: String -> FilePath -> IO String
|
||||
readFileC cod file = do
|
||||
let tmp = file ++ ".tmp"
|
||||
let tmp = file <.> "tmp"
|
||||
case cod of
|
||||
"utf8" -> readFile file
|
||||
_ -> do
|
||||
@@ -345,8 +325,9 @@ readFileC cod file = do
|
||||
|
||||
-- 'intelligently' determine the coding of a file
|
||||
---- AR 5/6/2016: now utf8 is used for all languages except Bul, where no characters are shown in documentation anyway
|
||||
coding :: FilePath -> String
|
||||
coding file = case language file of
|
||||
"Bul" -> "CP1251" --- "ISO-8859-1"
|
||||
_ -> "utf8"
|
||||
|
||||
language = reverse . take 3 . drop 3 . reverse
|
||||
where
|
||||
language = reverse . take 3 . drop 3 . reverse
|
||||
@@ -7,20 +7,19 @@
|
||||
|
||||
==The Prelude module==
|
||||
|
||||
The ``Prelude`` defines commonly used utility functions, in particular for
|
||||
strings and booleans.
|
||||
The ``Prelude`` defines commonly used utility functions, in particular for strings and booleans.
|
||||
|
||||
|| Oper | Type | Explanation ||
|
||||
|| Oper | Type | Explanation |
|
||||
| ``SS`` | ``Type`` | the type ``{s : Str}``
|
||||
| ``ss`` | ``Str -> SS`` | record from string
|
||||
| ``nonExist`` | ``Str`` | missing form
|
||||
| ``optStr`` | ``Str -> Str`` | optional string
|
||||
| ``bothWays`` | ``(x,y : Str) -> Str`` | either ``x ++ y`` or ``y ++ x``
|
||||
| ``Bool`` | ``PType`` | values ``True`` and ``False``
|
||||
| ``andB`` | ``(_,_ : Bool) -> Bool`` | conjunction
|
||||
| ``andB`` | ``(_,_ : Bool) -> Bool`` | conjunction
|
||||
| ``orB`` | ``(_,_ : Bool) -> Bool`` | disjunction
|
||||
| ``notB`` | ``Bool -> Bool`` | negation
|
||||
| ``if_then_else`` | ``(A:Type)->Bool->A->A->A`` | conditional
|
||||
| ``if_then_else`` | ``(A:Type)->Bool->A->A->A`` | conditional
|
||||
| ``init`` | ``Str -> Str`` | drop last character
|
||||
| ``last`` | ``Str -> Str`` | return last character
|
||||
| ``glue`` | ``Str -> Str -> Str`` | glue tokens together
|
||||
@@ -30,7 +29,7 @@ strings and booleans.
|
||||
|
||||
These functions are hard-coded in GF. They are available without explicit opening, by the used of qualified names, e.g. ``Predef.tk``.
|
||||
|
||||
|| operation | type | explanation ||
|
||||
|| Oper | Type | Explanation |
|
||||
| ``PBool`` | ``PType`` | ``PTrue | PFalse``
|
||||
| ``Error`` | ``Type`` | the empty type
|
||||
| ``Integer`` | ``Type`` | the type of integers
|
||||
@@ -57,7 +56,7 @@ These functions are hard-coded in GF. They are available without explicit openin
|
||||
This module is used for defining formal languages, in particular ones that
|
||||
use precedence levels and parentheses for grouping subexpressions.
|
||||
|
||||
|| Oper | Type | Explanation ||
|
||||
|| Oper | Type | Explanation |
|
||||
| ``Prec`` | ``PType`` | precedence levels 0..4
|
||||
| ``TermPrec`` | ``Type`` | string with precedence
|
||||
| ``mkPrec`` | ``Prec -> Str -> TermPrec`` | construct a ``TermPrec``
|
||||
@@ -75,7 +74,7 @@ This module is used for embedding symbolic notation in natural-language
|
||||
text constructed by the resource grammar API. It works for all resource
|
||||
languages.
|
||||
|
||||
|| Function | Type | Example ||
|
||||
|| Function | Type | Explanation |
|
||||
| ``symb`` | ``Str -> NP`` | //x//
|
||||
| ``symb`` | ``Int -> NP`` | //23//
|
||||
| ``symb`` | ``Float -> NP`` | //0.99//
|
||||
@@ -89,10 +88,10 @@ languages.
|
||||
|
||||
==The Combinators module==
|
||||
|
||||
This module gives shortcuts for defining predicates (``pred``) and function
|
||||
This module gives shortcuts for defining predicates (``pred``) and function
|
||||
expressions (``app``). It works for all resource languages.
|
||||
|
||||
|| Function | Type | Example ||
|
||||
|| Function | Type | Explanation |
|
||||
| ``pred`` | ``V -> NP -> Cl`` | //x converges//
|
||||
| ``pred`` | ``V2 -> NP -> NP -> Cl`` | //x intersects y//
|
||||
| ``pred`` | ``V -> NP -> NP -> Cl`` | //x and y intersect//
|
||||
@@ -100,7 +99,7 @@ expressions (``app``). It works for all resource languages.
|
||||
| ``pred`` | ``A2 -> NP -> NP -> Cl`` | //x is divisible by y//
|
||||
| ``pred`` | ``A -> NP -> NP -> Cl`` | //x and y are equal//
|
||||
| ``pred`` | ``N -> NP -> Cl`` | //x is a maximum//
|
||||
| ``pred`` | ``N -> NP -> NP -> Cl`` | //x and y are inverses//
|
||||
| ``pred`` | ``N -> NP -> NP -> Cl`` | //x and y are inverses//
|
||||
| ``pred`` | ``Adv -> NP -> Cl`` | //x is in scope//
|
||||
| ``pred`` | ``Prep -> NP -> NP -> Cl`` | //x is outside y//
|
||||
| ``app`` | ``N -> NP`` | //the bottom//
|
||||
@@ -111,5 +110,3 @@ expressions (``app``). It works for all resource languages.
|
||||
| ``app`` | ``N2 -> NP -> CN`` | //divisor of x//
|
||||
| ``app`` | ``N3 -> NP -> NP -> CN`` | //path from x to y//
|
||||
| ``app`` | ``N2 -> NP -> NP -> CN`` | //path between x and y//
|
||||
|
||||
|
||||
@@ -8,12 +8,9 @@ of //C// that takes //D// as an argument. What the constructors exactly are,
|
||||
and what other arguments they take, is described by separate tables for
|
||||
each category.
|
||||
|
||||
| [categories.png] |
|
||||
|
||||
%!include(html): ''categories-imagemap.html''
|
||||
|
||||
|
||||
The rectangular boxes mark open lexical categories, which have constructors
|
||||
also in the ``Paradigms`` modules.
|
||||
|
||||
|
||||
@@ -1,46 +1,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=Introduction=
|
||||
|
||||
The GF Resource Grammar Library is the standard library for Grammatical Framework.
|
||||
It covers the morphology and basic syntax of currently 32 languages:
|
||||
Afrikaans,
|
||||
Bulgarian,
|
||||
Catalan,
|
||||
Chinese (simplified),
|
||||
Danish,
|
||||
Dutch,
|
||||
English,
|
||||
Estonian,
|
||||
Finnish,
|
||||
French,
|
||||
German,
|
||||
Greek,
|
||||
Hindi,
|
||||
Icelandic,
|
||||
Japanese,
|
||||
Italian,
|
||||
Latvian,
|
||||
Maltese,
|
||||
Mongolian,
|
||||
Nepali,
|
||||
Norwegian (bokmål),
|
||||
Norwegial (nynorsk),
|
||||
Persian,
|
||||
Polish,
|
||||
Punjabi,
|
||||
Romanian,
|
||||
Russian,
|
||||
Sindhi,
|
||||
Spanish,
|
||||
Swedish,
|
||||
Thai,
|
||||
Urdu.
|
||||
It covers the morphology and basic syntax of currently #LANGUAGE_COUNT languages:
|
||||
#LANGUAGES
|
||||
|
||||
This document contains the most important parts of the GF Resource Grammar API,
|
||||
as needed by a GF application programmer.
|
||||
@@ -53,26 +17,29 @@ The main contents are:
|
||||
- [Chapter 1 #toc2]: categories, with links to the functions for
|
||||
constructing trees in them.
|
||||
- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and
|
||||
examples.
|
||||
- [Chapter 3 #toc84]: morphological paradigms.
|
||||
- [Chapter 4 #toc116]: additional libraries.
|
||||
- [Chapter 5 #toc122]: how to "browse" the library by
|
||||
examples.
|
||||
- [Chapter 3 #toc85]: morphological paradigms.
|
||||
- [Chapter 4 #toc120]: additional libraries.
|
||||
- [Chapter 5 #toc126]: how to "browse" the library by
|
||||
loading the grammars into the ``gf`` command editor.
|
||||
- [Chapter 6 #toc123]: a brief example of how application grammars can
|
||||
use the resource modules.
|
||||
- [Detailed table of contents #toc124].
|
||||
- [Chapter 6 #toc127]: a brief example of how application grammars can
|
||||
use the resource modules.
|
||||
- [Detailed table of contents #toc128].
|
||||
|
||||
|
||||
The [RGL Browser http://www.grammaticalframework.org/~john/rgl-browser/] tool allows you to interactively browse through
|
||||
the library, view all functions in a module's scope, and quickly jump to their definitions.
|
||||
|
||||
|
||||
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
|
||||
- [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
|
||||
- [More modules gfdoc/sources.html]: extra modules, dictionaries, and
|
||||
- [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
|
||||
- [More modules ../gfdoc/sources.html]: extra modules, dictionaries, and
|
||||
the internals of the resource grammar
|
||||
- [Internal abstract syntax ./absfuns.html]: synopsis of internal
|
||||
- [Internal abstract syntax ../absfuns.html]: synopsis of internal
|
||||
abstract functions and their Universal Dependency labels
|
||||
- [RGL Source Browser ./browse]: look up functions and their source code
|
||||
- [Minibar http://cloud.grammaticalframework.org/minibar/minibar.html]:
|
||||
find resource grammar expressions by parsing (select Grammar: LibraryBrowser)
|
||||
or test translations between all languages (select Grammar: ResourceDemo)
|
||||
@@ -84,16 +51,7 @@ abstract functions and their Universal Dependency labels
|
||||
[PDF http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158]
|
||||
- Paper "Grammars as Software Libraries" by A. Ranta
|
||||
(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,
|
||||
Cambridge, pp. 281--308, 2009).
|
||||
The library from a software engineering point of view.
|
||||
[PDF http://www.cse.chalmers.se/~aarne/old/articles/libraries-kahn.pdf]
|
||||
|
||||
|
||||
Many examples in [Chapter 2 #toc5] can be seen in multiple languages by hovering the
|
||||
mouse over the example, as shown in the following screenshot:
|
||||
|
||||
[hovering.png]
|
||||
|
||||
|
||||
|
||||
1
doc/synopsis/quicklinks.html
Normal file
1
doc/synopsis/quicklinks.html
Normal file
@@ -0,0 +1 @@
|
||||
<script src="quicklinks.js"></script>
|
||||
124
doc/synopsis/quicklinks.js
Normal file
124
doc/synopsis/quicklinks.js
Normal file
@@ -0,0 +1,124 @@
|
||||
// Find an element with a certain tag containing a certain text.
|
||||
function findElement (tagname, text) {
|
||||
var els = document.body.getElementsByTagName(tagname)
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
if (els[i].innerText === text) return els[i]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function text (s) {
|
||||
return document.createTextNode(s)
|
||||
}
|
||||
|
||||
function appendChildren (n, ds) {
|
||||
if (Array.isArray(ds)) for (var i in ds) n.appendChild(ds[i])
|
||||
else if (typeof ds === 'string') n.appendChild(text(ds))
|
||||
else n.appendChild(ds)
|
||||
}
|
||||
|
||||
function node (tag, cls, ds) {
|
||||
var n = document.createElement(tag)
|
||||
if (cls) n.className = cls
|
||||
if (ds) appendChildren(n, ds)
|
||||
return n
|
||||
}
|
||||
|
||||
function a (href, txt) {
|
||||
var a = node('a', '', txt)
|
||||
a.href = href
|
||||
return a
|
||||
}
|
||||
|
||||
function forAllLinks (list, f) {
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var c = list[i].firstElementChild
|
||||
if (c && c.tagName === 'A' && c.href) f(c)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
// Extract links to the syntax rules
|
||||
function listrules (ul) {
|
||||
var rules = []
|
||||
if (ul.tagName !== 'UL') return []
|
||||
forAllLinks(ul.children, function (c) {
|
||||
rules.push({
|
||||
href: c.href,
|
||||
text: c.innerText.split(' -')[0],
|
||||
full: c.innerText
|
||||
})
|
||||
})
|
||||
return rules
|
||||
}
|
||||
|
||||
// Extract the links to the paradigm sections for all the languages
|
||||
function listlangs (ul) {
|
||||
var langs = []
|
||||
if (ul.tagName !== 'UL') return []
|
||||
forAllLinks(ul.children, function (c) {
|
||||
if (/^Paradigms for /.test(c.innerText)) {
|
||||
langs.push({
|
||||
href: c.href,
|
||||
text: c.innerText.substr(14),
|
||||
full: c.innerText
|
||||
})
|
||||
}
|
||||
})
|
||||
return langs
|
||||
}
|
||||
|
||||
function linklist (links) {
|
||||
var d = node('div')
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var l = a(links[i].href, links[i].text)
|
||||
l.title = links[i].full
|
||||
d.appendChild(l)
|
||||
d.appendChild(text(' '))
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
function quicklinks () {
|
||||
// Find the detailed table of contents
|
||||
var h1toc = findElement('h1', 'Table of Contents')
|
||||
var ultoc = h1toc.nextElementSibling
|
||||
while (ultoc && ultoc.tagName !== 'UL') {
|
||||
ultoc = ultoc.nextElementSibling
|
||||
}
|
||||
|
||||
var lis = ultoc.children
|
||||
|
||||
var syntaxrules = []
|
||||
var langs = []
|
||||
|
||||
// Find the Syntax Rules and Lexical Paradigms sections in the toc
|
||||
for (var i = 0; i < lis.length; i++) {
|
||||
var li = lis[i]
|
||||
var c = li.firstElementChild
|
||||
if (c.tagName === 'A') {
|
||||
if (/^Syntax Rules /.test(c.innerText)) {
|
||||
syntaxrules = listrules(c.nextElementSibling)
|
||||
} else if (c.innerText === 'Lexical Paradigms') {
|
||||
langs = listlangs(c.nextElementSibling)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return node(
|
||||
'div',
|
||||
'row',
|
||||
[ node('div', 'col-5', [ node('h6', '', 'Syntax'), linklist(syntaxrules) ]),
|
||||
node('div', 'col-7', [ node('h6', '', 'Morphology'), linklist(langs) ])
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
appendChildren(
|
||||
document.getElementById('quicklinks'),
|
||||
[
|
||||
node('h5', '', 'Quick links'),
|
||||
quicklinks()
|
||||
]
|
||||
)
|
||||
35
doc/synopsis/synopsis.css
Normal file
35
doc/synopsis/synopsis.css
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Quick links */
|
||||
|
||||
#quicklinks {
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
#quicklinks.sidebar {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#quicklinks a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Reveal popup */
|
||||
|
||||
.popup {
|
||||
display: none;
|
||||
background: #ffffccee;
|
||||
border: 1px solid #dee2e6;
|
||||
padding: 1em 1em 1em 0;
|
||||
}
|
||||
|
||||
.reveal:hover .popup {
|
||||
display: block;
|
||||
position: absolute;
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
/* General */
|
||||
.table td, .table th {
|
||||
padding: 0.5em .75rem;
|
||||
}
|
||||
143
doc/synopsis/template.html
Normal file
143
doc/synopsis/template.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
$for(author-meta)$
|
||||
<meta name="author" content="$author-meta$" />
|
||||
$endfor$
|
||||
$if(date-meta)$
|
||||
<meta name="dcterms.date" content="$date-meta$" />
|
||||
$endif$
|
||||
$if(keywords)$
|
||||
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||
$endif$
|
||||
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$" />
|
||||
$endfor$
|
||||
$if(math)$
|
||||
$math$
|
||||
$endif$
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
</head>
|
||||
<body>
|
||||
$for(include-before)$
|
||||
$include-before$
|
||||
$endfor$
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<nav class="col-md-3 col-xl-2 d-none d-md-block sidebar pt-4" id="quicklinks">
|
||||
<!-- filled dynamically via quicklinks.js -->
|
||||
</nav>
|
||||
|
||||
<main role="main" class="col-md-9 col-xl-10 offset-md-3 offset-xl-2 pt-3">
|
||||
$if(title)$
|
||||
<header id="title-block-header">
|
||||
<a href="$rel-root$" title="Home">
|
||||
<img src="$rel-root$/doc/Logos/gf1.svg" height="200px" class="float-md-right mb-3 bg-white" alt="GF Logo">
|
||||
</a>
|
||||
<h1 class="title">$title$</h1>
|
||||
$if(subtitle)$
|
||||
<p class="subtitle">$subtitle$</p>
|
||||
$endif$
|
||||
$for(author)$
|
||||
<p class="author">$author$</p>
|
||||
$endfor$
|
||||
$if(date)$
|
||||
<p class="date">$date$</p>
|
||||
$endif$
|
||||
</header>
|
||||
$endif$
|
||||
$if(toc)$
|
||||
<nav id="$idprefix$TOC">
|
||||
$table-of-contents$
|
||||
</nav>
|
||||
$endif$
|
||||
$body$
|
||||
</main>
|
||||
</div><!-- .row -->
|
||||
</div><!-- .container-fluid -->
|
||||
|
||||
<footer class="bg-light mt-5 py-5 position-relative">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-6 col-sm-3">
|
||||
<a href="$rel-root$">
|
||||
<i class="fas fa-home"></i>
|
||||
Home
|
||||
</a>
|
||||
<h6 class="text-muted mt-3">Get started</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="https://www.youtube.com/watch?v=x1LFbDQhbso">Google Tech Talk</a></li>
|
||||
<li><a href="http://cloud.grammaticalframework.org/">GF Cloud</a></li>
|
||||
<li><a href="$rel-root$/doc/tutorial/gf-tutorial.html">Tutorial</a></li>
|
||||
<li><a href="$rel-root$/download"><strong>Download GF</strong></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3">
|
||||
<h6 class="text-muted">Learn more</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="$rel-root$/gf-book">The GF Book</a></li>
|
||||
<li><a href="$rel-root$/doc/gf-refman.html">Reference Manual</a></li>
|
||||
<li><a href="$rel-root$/doc/gf-shell-reference.html">GF Shell Reference</a></li>
|
||||
<li><a href="http://www.molto-project.eu/sites/default/files/MOLTO_D2.3.pdf">Best Practices</a></li>
|
||||
<li><a href="$rel-root$/lib/doc/synopsis/index.html"><strong>RGL Synopsis</strong></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3">
|
||||
<h6 class="text-muted">Develop</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="$rel-root$/doc/gf-developers.html">Developers Guide</a></li>
|
||||
<li><a href="http://hackage.haskell.org/package/gf/docs/PGF.html">PGF library API (Haskell runtime)</a></li>
|
||||
<li><a href="$rel-root$/doc/runtime-api.html">PGF library API (C runtime)</a></li>
|
||||
<li><a href="http://hackage.haskell.org/package/gf/docs/GF.html">GF compiler API</a></li>
|
||||
<li><a href="$rel-root$/doc/gf-editor-modes.html">Text Editor Support</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3">
|
||||
<h6 class="text-muted">Contribute</i>
|
||||
</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="http://groups.google.com/group/gf-dev">Mailing List</a></li>
|
||||
<li><a href="https://github.com/GrammaticalFramework/gf-core/issues">Issue Tracker</a></li>
|
||||
<li><a href="$rel-root$/doc/gf-people.html">Authors</a></li>
|
||||
<li><a href="http://school.grammaticalframework.org/2018/">Summer School</a></li>
|
||||
</ul>
|
||||
<h6 class="text-muted">
|
||||
Repositories
|
||||
<i class="fab fa-github ml-1"></i>
|
||||
</h6>
|
||||
<a href="https://github.com/GrammaticalFramework/gf-core">GF</a> ·
|
||||
<a href="https://github.com/GrammaticalFramework/gf-rgl">RGL</a> ·
|
||||
<a href="https://github.com/GrammaticalFramework/gf-contrib">Contributions</a>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
</footer>
|
||||
$for(include-after)$
|
||||
$include-after$
|
||||
$endfor$
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-7811807-3");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,329 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="generator" CONTENT="http://txt2tags.org">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
|
||||
<TITLE>From Resource Grammar to Wide Coverage Translation with GF</TITLE>
|
||||
</HEAD><BODY BGCOLOR="white" TEXT="black">
|
||||
<CENTER>
|
||||
<H1>From Resource Grammar to Wide Coverage Translation with GF</H1>
|
||||
<FONT SIZE="4"><I>Aarne Ranta et al.</I></FONT><BR>
|
||||
<FONT SIZE="4">January-May 2014</FONT>
|
||||
</CENTER>
|
||||
|
||||
|
||||
<H2>Scope</H2>
|
||||
|
||||
<P>
|
||||
Wide-coverage interlingual translator for
|
||||
Bulgarian, Chinese, Dutch, English, Finnish, French, German,
|
||||
Hindi, Italian, Spanish, Swedish.
|
||||
</P>
|
||||
|
||||
<H2>How to use it</H2>
|
||||
|
||||
<P>
|
||||
If you just want to try it before reading more,
|
||||
here are the main ways to get started:
|
||||
</P>
|
||||
<P>
|
||||
1. <B>Run on our server.</B> <A HREF="http://www.grammaticalframework.org/demos/translation.html">http://www.grammaticalframework.org/demos/translation.html</A>
|
||||
</P>
|
||||
<P>
|
||||
2. <B>Get an Android app.</B> <A HREF="http://www.grammaticalframework.org/demos/app.html">http://www.grammaticalframework.org/demos/app.html</A>
|
||||
</P>
|
||||
<P>
|
||||
3. <B>Compile and run in the shell.</B> Get the latest GF sources (with darcs or github) and then
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI>compile and install the GF compiler and library and the C runtime (<CODE>pgf-translate</CODE>).
|
||||
<P></P>
|
||||
<LI>compile the translator:
|
||||
|
||||
<PRE>
|
||||
cd GF/lib/src
|
||||
make -j Translate11.pgf
|
||||
</PRE>
|
||||
|
||||
This will take a long time (fifteen minutes or more) and will probably require at least 8GB of RAM.
|
||||
<P></P>
|
||||
<LI>run the translator
|
||||
|
||||
<PRE>
|
||||
pgf-translate Translate11.pgf Phr TranslateEng TranslateSwe
|
||||
</PRE>
|
||||
|
||||
with obviously the possibility to vary the source and the target language.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
4. To modify the sources, work on the files in
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
GF/lib/src/translator/
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
It is these files that will be explained below.
|
||||
</P>
|
||||
|
||||
<H2>GF and the RGL</H2>
|
||||
|
||||
<P>
|
||||
GF, Grammatical Framework, was originally designed for the purpose of <B>multilingual controlled language systems</B>,
|
||||
which would enable high-quality translation on limited domains. The <B>abstract syntax</B> of GF defines the semantic
|
||||
structures relevant for the domain, and the <B>concrete syntaxes</B> map these structures to grammatically correct
|
||||
and idiomatic text in each target language. The <B>reversibility</B> of GF enables both <B>generation</B> and <B>parsing</B>,
|
||||
and thereby <B>translation</B> where the abstract syntax functions as an <B>interlingua</B>.
|
||||
</P>
|
||||
<P>
|
||||
As a bottle-neck of GF applications, it was soon realized that the definition of concrete syntax requires a lot
|
||||
of manual work and linguistic skill, because of the complexities of natural language syntax and morphology. Some of
|
||||
the complexities can be ignored in a small system. For instance, in a mathematical system, it may be enough to
|
||||
use verbs in the present tense only. But very much the same linguistic problems must be solved again and again
|
||||
in new applications: French verb inflection is the same in mathematics as in a tourist phrasebook. To solve
|
||||
this problem, the <B>GF Resource Grammar Library</B> (RGL) was developed, to take care of "low-level" linguistic
|
||||
rules such as inflection, agreement, and word order. This enables the authors of <B>application grammars</B> to focus
|
||||
on the semantics (when designing the abstract syntax) and on selecting RGL functions that produce the idioms they
|
||||
want. The RGL grew into an international open-source project, where more than 50 persons have contributed to
|
||||
implementing it for 29 languages by the time of writing this.
|
||||
</P>
|
||||
|
||||
<H2>Scaling up GF translation</H2>
|
||||
|
||||
<P>
|
||||
The RGL was thus originally designed to be used just as its name says: as a library
|
||||
for application grammars. Only the latter were meant to be used as <B>top-level grammars</B>, i.e. for
|
||||
parsing, generation, and translation at run time. Little attention was therefore
|
||||
paid to the usability of RGL as a top-level
|
||||
grammar by itself. But when applications accumulated, ranging from technical text to spoken dialogue, the coverage
|
||||
of the RGL grew into a coverage that approximates a "complete grammar" of many of the languages.
|
||||
And recently, there has indeed been success in using the RGL as a wide-coverage translation grammar,
|
||||
mainly due to Krasimir Angelov's efforts to scale up the size of GF applications from language fragments
|
||||
to open-text processing. This success is a result of four lines of development:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>More efficient processing</B>, both due to better algorithms and to an optimized C implementation of a PGF
|
||||
interpreter, the <B>C runtime</B>, achieving speeds competitive with the state of the art, e.g. the Stanford parser.
|
||||
This development is also based on the work of Peter Ljunglöf on GF parsing and Lauri Alanko on the C runtime.
|
||||
<P></P>
|
||||
<LI><B>Large-scale dictionaries</B>, both manually built and extracted from free sources, and linked into a multilingual
|
||||
translation dictionary now covering 10k to 60k entries for eleven languages. This work was started by Björn Bringert,
|
||||
who ported the Oxford Advanced Learner's Dictionary of English to GF.
|
||||
<P></P>
|
||||
<LI><B>Probabilistic disambiguation</B>, using a model trained from the Penn Treebank. Due to the common abstract syntax,
|
||||
the same model can be used for other languages as well, even though the adequacy of this transfer has not
|
||||
been systematically evaluated.
|
||||
<P></P>
|
||||
<LI><B>Robust parsing</B>, which recovers from unknown words and syntax
|
||||
by using chunk-by-chunk translations. This leads to loss of quality, but fulfills the principle that
|
||||
"something is better than nothing".
|
||||
</UL>
|
||||
|
||||
<H2>Remaining problems</H2>
|
||||
|
||||
<P>
|
||||
The result of all this work is a wide-coverage translation system, which can be used in the same way as Google
|
||||
Translate, Bing, Systran, and Apertium - to "translate anything", albeit with a varying quality. At the moment of
|
||||
writing, the performance is not yet generally on the level with the best of the competition, but shows some promising
|
||||
improvements in e.g. long-distance agreement and word order. To make these advantages into absolute improvements, we
|
||||
will need to fix problems that the other systems (or at least some of them) get right but where GF translation
|
||||
often fails:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Lexical coverage</B>, to eliminate parsing failures due to unknown words.
|
||||
<P></P>
|
||||
<LI><B>Disambiguation</B>, with more sophisticated than the essentially context-free tree model used now.
|
||||
<P></P>
|
||||
<LI><B>Speed</B>, which gets worse with long sentences and with more complex languages.
|
||||
<P></P>
|
||||
<LI><B>Idiomacy</B>, due to the lack of idiomatic constructions that are not compositional and therefore don't get right
|
||||
in the RGL but are often correct in phrase-based SMT.
|
||||
</UL>
|
||||
|
||||
<H2>Advantages of GF translation</H2>
|
||||
|
||||
<P>
|
||||
Given that these issues get resolved, the strengths of the GF approach can be made more visible:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Grammaticality</B>, in particular the already mentioned issues of agreement and word order.
|
||||
<P></P>
|
||||
<LI><B>Predictability</B>, in the sense that a local change in the input usually results in a corresponding
|
||||
local change in the output (unless otherwise required by idiomacy).
|
||||
<P></P>
|
||||
<LI><B>Feedback</B>, i.e. the ease of showing the confidence level of the translation, alternative translations,
|
||||
and linguistic information.
|
||||
<P></P>
|
||||
<LI><B>Adaptability</B>, i.e. the ease of fixing bugs, adapting the system to special domains, and personalizing it.
|
||||
This can be done with great precision. For instance, a bug in a grammar can be fixed without
|
||||
breaking anything else.
|
||||
<P></P>
|
||||
<LI><B>Light weight</B>. The system runs on standard laptops and even on mobile phones; the size of the run-time
|
||||
system for all pairs of 11 languages is under 25MB (on the Android platform), and recompiling the whole
|
||||
system (e.g. after bug fixes or
|
||||
domain adaptation) is a matter of a few minutes, where corresponding figures for SMT systems are gigabytes of size
|
||||
and days of retraining.
|
||||
<P></P>
|
||||
<LI><B>Multilinguality</B>, in the sense that once the parsing of the input is settled, the output can be readily
|
||||
rendered into all other languages,
|
||||
and also in the sense that the GF model works equally well for any language pair.
|
||||
</UL>
|
||||
|
||||
<H2>Wanted: more work, new ideas</H2>
|
||||
|
||||
<P>
|
||||
The recipes for improvement are, as always, <B>more work</B> and <B>new ideas</B>. Each of the four weaknesses mentioned
|
||||
above can be relieved by more work - in particular, lexical coverage by more work on the lexicon, since
|
||||
automatic extraction methods cannot really be trusted. As for disambiguation, new ideas about probabilistic
|
||||
tree models are being discussed. As for speed, new ideas on parsing (in particular, the integration of disambiguation
|
||||
with parsing) would help, but also the complexity of grammatical structures plays a major role. As for idiomacy,
|
||||
more work is being done in introducing <B>constructions</B> (non-compositional syntax rules, generalizing the notion of
|
||||
<B>multiword expressions</B>, in particular, <B>phrases</B> in SMT), but also new ideas are being discussed on how to
|
||||
extract such constructions from e.g. phrase tables.
|
||||
</P>
|
||||
<P>
|
||||
In the following, we will focus on describing the role of grammar in the GF translation system - in particular, how
|
||||
RGL can be modified to become usable as a top-level grammar for translating open text.
|
||||
As RGL was not meant to be used for parsing open text, but rather for the controlled language generation task,
|
||||
it has serious restrictions:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Limited coverage</B>. The RGL does not cover all structures in any language - hence it is likely to fail when
|
||||
parsing unlimited text.
|
||||
<P></P>
|
||||
<LI><B>Semantic overgeneration</B>. Semantic distinctions, such as between mass and count nouns, or place and manner
|
||||
adverbials, are assumed to be defined in application grammars; the RGL just defines the combinatorics of
|
||||
elements, but doesn't prescribe which elements can really go together.
|
||||
<P></P>
|
||||
<LI><B>Spurious ambiguities</B>. RGL parsing creates more ambiguities than what would be necessary, if there
|
||||
was more semantic control. In addition, there are partly overlapping structures, which generate
|
||||
spurious syntactic ambiguities.
|
||||
<B>Example</B>: the very liberal apposition function.
|
||||
<P></P>
|
||||
<LI><B>Inefficiency</B>. Partly because of ambiguities, partly of the deep nesting and complex data structures, parsing
|
||||
with the RGL can be very slow when compared to application grammars, even the comprehensive ResourceDemo grammar.
|
||||
For some languages (Romanian, versions of French and Finnish), parsing is not practically possible at all because
|
||||
PGF generation fails for memory reasons.
|
||||
<P></P>
|
||||
<LI><B>Syntax orientation</B>. The structures of the RGL are rather superficial and don't guarantee translation
|
||||
equivalence when used as interlingua.
|
||||
<P></P>
|
||||
<LI><B>Coarse categories</B>. This is a particular aspect of syntax orientation, and causes at the same time overgeneration
|
||||
and spurious ambiguities.
|
||||
<B>Example</B>: the category <CODE>Adv</CODE>.
|
||||
</UL>
|
||||
|
||||
<H2>What speaks for using RGL</H2>
|
||||
|
||||
<P>
|
||||
Despite these problems, the RGL has shown to be a possible starting point for large-scale translation. It has a couple
|
||||
of advantages speaking for this:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Coverage</B>. Even though not complete, the RGL has grown into a coverage that is close to complete enough; work
|
||||
with English shows that just about 20% more constructions can take us there.
|
||||
<P></P>
|
||||
<LI><B>Maintainability</B>. The RGL is constantly developed and maintained on its own right, and it makes sense to take
|
||||
advantage of this and avoid duplicated work with some other large-scale grammar.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
Of course, we are still left with the other
|
||||
option of addressing translation with an <I>application grammar</I>, something
|
||||
similar to the ResourceDemo with flatter and more semantic structures. But this would in turn require
|
||||
the replication of many rules, even though it would be to a large extent doable by using a <B>functor</B>, that is,
|
||||
by just one set of rules covering all languages.
|
||||
</P>
|
||||
|
||||
<H2>The structure of the wide-coverage translation grammar</H2>
|
||||
|
||||
<P>
|
||||
Thus the path chosen is a mixture of RGL and application grammar. In brief, the translation grammar consists of
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Selected RGL modules and functions</B>, as they are (using restricted inheritance); around 80% of the syntax.
|
||||
<P></P>
|
||||
<LI><B>Overridden RGL functions</B>, with more general types; just a few of them.
|
||||
<P></P>
|
||||
<LI><B>Overridden RGL linearizations</B>, typically with more <B>variants</B> in individual languages; just a few, but
|
||||
increasing.
|
||||
<P></P>
|
||||
<LI><B>Syntax extension</B>, new categories and functions, around 20% of the syntax, and increasing.
|
||||
<P></P>
|
||||
<LI><B>Big lexicon</B>, with an abstract syntax of 65k lemmas, increasing.
|
||||
<P></P>
|
||||
<LI><B>Constructions</B>, inspired by (and partly derived from) Construction Grammars, to capture idioms that
|
||||
involve specific lexical items and are therefore "between the syntax and the lexicon".
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
The following picture shows the principal module structure of the translation grammar.
|
||||
</P>
|
||||
<P>
|
||||
<IMG ALIGN="middle" SRC="translation.png" BORDER="0" ALT="">
|
||||
</P>
|
||||
<P>
|
||||
Here is a description of each of the modules:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Translate</B> is the top module, which combines the RGL syntax with syntax extensions and a dictionary.
|
||||
The RGL syntax is not inherited in its entirety, which is indicated by a dashed line. The overridden abstract
|
||||
syntax functions (common to all languages) are replaced by functions in the Extensions module, whereas the
|
||||
overridden concrete syntax definitions (specific to each language) are defined in this Translate module.
|
||||
This consists of the module named <CODE>Translate</CODE>.
|
||||
<P></P>
|
||||
<LI><B>RGLSyntax</B> stands for the standard RGL module for syntax, excluding the RGL test lexicon and
|
||||
the language-specific extensions of it. This consists of the standard module named <CODE>Grammar</CODE> and
|
||||
the emerging module named <CODE>Construction</CODE>.
|
||||
<P></P>
|
||||
<LI><B>Extensions</B> stands for the syntax extensions added to the RGL syntax. This consists of the module
|
||||
named <CODE>Extensions</CODE>.
|
||||
<P></P>
|
||||
<LI><B>Dictionary</B> is a large-scale multilingual dictionary. Its abstract syntax uses as identifiers English words
|
||||
suffixed by categories and word sense information. This consists of the module named <CODE>Dictionary</CODE>.
|
||||
<P></P>
|
||||
<LI><B>RGLCategories</B> stands for the type system of the standard RGL, the module named <CODE>Cat</CODE>.
|
||||
<P></P>
|
||||
<LI><B>Chunk</B> is the grammar defining what chunks (noun phrases, verbs,
|
||||
adverbs, etc) can be used and how they are combined, when exact
|
||||
syntactic combination fails.
|
||||
</UL>
|
||||
|
||||
<H2>Where and why the translation grammar differs from the RGL</H2>
|
||||
|
||||
<P>
|
||||
A guiding principle is thus that the translation grammar preserves <I>as much as possible</I> of the RGL, so that
|
||||
duplicated work is avoided. But as the purposes of the two are different, not everything is possible. Two
|
||||
diverging principles have already been mentioned:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI><B>Free variation</B>. The RGL bans free variation, because library users need to have full control on selecting
|
||||
variants. For instance, English negation has two forms, contracted (<I>don't</I>) and uncontracted (<I>do not</I>),
|
||||
which in the translation grammar are treated as variants. But RGL users sometimes need to choose the one or the
|
||||
other, for instance, excluding contracted negation in formal style.
|
||||
<P></P>
|
||||
<LI><B>Semantic distinctions</B>. The RGL avoids semantic distinctions that are not absolutely necessary for syntax.
|
||||
The reason for this is the ambition to keep the library as simple as possible, in particular for the voluntary
|
||||
implementors of new languages. But meaning-preserving translation needs more distinctions, for instance, in
|
||||
word senses, subcategorizations, selection restrictions, and tense and aspect systems.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
The old design principles of the RGL are thus kept in force, and this is made possible by separating parts of the
|
||||
translation grammar modules from the RGL.
|
||||
</P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
|
||||
<!-- cmdline: txt2tags -thtml translation.txt -->
|
||||
</BODY></HTML>
|
||||
45
languages.csv
Normal file
45
languages.csv
Normal file
@@ -0,0 +1,45 @@
|
||||
Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis
|
||||
Afr,Afrikaans,afrikaans,,,,,,n,,y
|
||||
Amh,Amharic,amharic,,,,,n,n,,n
|
||||
Ara,Arabic,arabic,,,,,,y,,y
|
||||
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
||||
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
||||
Chi,Chinese (simplified),chinese,,,,,,,,y
|
||||
Dan,Danish,danish,Scand,,y,,,,,y
|
||||
Dut,Dutch,dutch,,,y,,,,,y
|
||||
Eng,English,english,,,y,,,,y,y
|
||||
Est,Estonian,estonian,,,,,,,,y
|
||||
Eus,Basque,basque,,,,,,,,y
|
||||
Fin,Finnish,finnish,,,y,,,,y,y
|
||||
Fre,French,french,Romance,,y,,,,y,y
|
||||
Ger,German,german,,,,,,,,y
|
||||
Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n
|
||||
Gre,Greek,greek,,,,,,,,y
|
||||
Heb,Hebrew,hebrew,,,,,n,n,,n
|
||||
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
|
||||
Hun,Hungarian,hungarian,,,y,n,n,n,,n
|
||||
Ice,Icelandic,icelandic,,,,,,n,,y
|
||||
Ina,Interlingua,interlingua,,,y,,n,n,,n
|
||||
Ita,Italian,italian,Romance,,y,,,,y,y
|
||||
Jpn,Japanese,japanese,,,,,,,,y
|
||||
Lat,Latin,latin,,,y,,n,n,,n
|
||||
Lav,Latvian,latvian,,,,,,,y,y
|
||||
Mlt,Maltese,maltese,,,,,,,,y
|
||||
Mon,Mongolian,mongolian,,,,,,n,,y
|
||||
Nep,Nepali,nepali,,,,,,n,,y
|
||||
Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y
|
||||
Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y
|
||||
Pes,Persian,persian,,,,,,,,y
|
||||
Pnb,Punjabi,punjabi,,,y,,,,,y
|
||||
Pol,Polish,polish,,,,,,,,y
|
||||
Por,Portuguese,portuguese,Romance,,y,,,,y,y
|
||||
Ron,Pomanian,romanian,,,y,,,,,y
|
||||
Rus,Russian,russian,,,y,,,,,y
|
||||
Snd,Sindhi,sindhi,,,,,,,,y
|
||||
Spa,Spanish,spanish,Romance,,y,,,,y,y
|
||||
Swa,Swahili,swahili,,,,n,n,n,y,n
|
||||
Swe,Swedish,swedish,Scand,,y,,,,y,y
|
||||
Tel,Telugu,telugu,,,y,n,n,n,,n
|
||||
Tha,Thai,thai,,to_thai,,,,,,y
|
||||
Tur,Turkish,turkish,,,,,n,n,,n
|
||||
Urd,Urdu,urdu,Hindustani,,,,,,,y
|
||||
|
103
src/Clone.hs
103
src/Clone.hs
@@ -3,58 +3,82 @@ module Main where
|
||||
import Control.Monad
|
||||
import Data.Maybe
|
||||
import Data.Char
|
||||
import System.Cmd
|
||||
import Data.List
|
||||
import System.Process
|
||||
import System.Directory
|
||||
import System.Environment
|
||||
import System.FilePath
|
||||
import System.Environment (getArgs)
|
||||
import System.Exit
|
||||
|
||||
import Text.Printf
|
||||
|
||||
-- To clone a project from one language to another:
|
||||
-- Clone fromdir todir fromlang tolang
|
||||
--
|
||||
-- 1. for each Module in 'modules', copy ModuleFROM to ModuleTO
|
||||
-- 2. in each ModuleTO, replace substrings FROM by TO, if not prefixes of an Ident
|
||||
-- 3. in each ModuleTO in 'specifics', comment out every line in the body, except
|
||||
-- those whose first word is in 'commons'.
|
||||
-- 1. for each Module in 'fromdir', copy Module(fromlang) to todir/Module(tolang) ; create todir if it doesn't exist
|
||||
-- 2. in each Module(tolang), replace substrings fromlang by tolang, if proper suffixes of identifiers
|
||||
-- 3. repeat the above for api/Module(fromlang) to api/Module(tolang)
|
||||
-- 4. add the language to config file if not present
|
||||
-- - If the option --comment-body is present, comment out every line in the body
|
||||
-- - If the option --comment-body is present, comment out every line in the body
|
||||
--
|
||||
-- Syntax: runghc Clone FROM TO
|
||||
-- Example: runhugs Clone Swe Nor
|
||||
|
||||
-- The following lines are for the resource grammar project, and can be changed
|
||||
-- to fit other projects.
|
||||
|
||||
modules = [
|
||||
"Adjective", "Adverb", "Cat", "Conjunction", "Extra", "Grammar", "Idiom", "Lang", "Noun", "Numeral",
|
||||
"Phrase", "Question", "Relative", "Sentence", "Symbol", "Text", "Verb",
|
||||
"All", "Res", "Paradigms"]
|
||||
++ specifics
|
||||
specifics = ["Lexicon","Structural"]
|
||||
commons = []
|
||||
-- Example: runghc Clone swedish danish Swe Dan
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
from:to:_ <- getArgs
|
||||
mapM_ (clone from to) modules
|
||||
args <- getArgs
|
||||
if length args < 4
|
||||
then putStrLn "usage: Clone (--comment-body|--drop-comments) fromdir todir fromlang tolang"
|
||||
else do
|
||||
let (options,[fromdir,todir,fromlang,tolang]) = span ((=='-') . head) args
|
||||
allfromfiles <- getDirectoryContents fromdir
|
||||
let fromfiles = filter (\f -> isSuffixOf (fromlang ++ ".gf") f || isSuffixOf (fromlang ++ "Abs.gf") f) allfromfiles
|
||||
let modules = map (getAbstractName fromlang) fromfiles
|
||||
createDirectoryIfMissing True todir
|
||||
mapM_ (clone options fromdir todir fromlang tolang) modules
|
||||
|
||||
clone from to pref = do
|
||||
s <- readFile (pref ++ from ++ ".gf")
|
||||
writeFile (pref ++ to ++ ".gf") (commentIf (isSpecific pref) (replaceLang from to s))
|
||||
mapM_ (\md -> clone options "api" "api" fromlang tolang (md,"")) apiModules
|
||||
conf <- readFile configFile
|
||||
if not (any (isPrefixOf tolang) (lines conf))
|
||||
then do
|
||||
appendFile configFile (printf "%s,%s\n" tolang todir)
|
||||
printf "Language '%s' has been added to %s\n" tolang configFile
|
||||
else return ()
|
||||
|
||||
isSpecific = flip elem specifics
|
||||
configFile :: FilePath
|
||||
configFile = ".." </> "languages.csv"
|
||||
|
||||
apiModules :: [String]
|
||||
apiModules = ["Try","Symbolic","Syntax","Constructors","Combinators"]
|
||||
|
||||
clone :: [String] -> String -> String -> String -> String -> (String, String) -> IO ()
|
||||
clone options fromdir todir from to (absname,absfx) = do
|
||||
s <- readFile (fromdir ++ "/" ++ absname ++ from ++ absfx ++ ".gf")
|
||||
writeAndReportFile (todir ++ "/" ++ absname ++ to ++ absfx ++ ".gf") (commentIf options (replaceLang from to s))
|
||||
|
||||
getAbstractName :: String -> String -> (String, String)
|
||||
getAbstractName from file
|
||||
| isSuffixOf (from ++ "Abs.gf") file = (take (length file - (length from + 6)) file, "Abs") -- (NewDict, Abs)
|
||||
| isSuffixOf (from ++ ".gf") file = (take (length file - (length from + 3)) file, "") -- (NewDict, [])
|
||||
| otherwise = error ("Need suffix " ++ (from ++ ".gf") ++ " or " ++ (from ++ "Abs.gf") ++ " therefore cannot clone file name " ++ file)
|
||||
|
||||
replaceLang :: String -> String -> String -> String
|
||||
replaceLang s1 s2 = repl where
|
||||
repl s = case s of
|
||||
c:cs -> case splitAt lgs s of
|
||||
(pre,'A':'b':'s':c:rest) | pre == s1 && elem c " \n\t,:=(){}.-[];" -> s2 ++ "Abs" ++ [c] ++ repl rest
|
||||
(pre,c:rest) | pre == s1 && elem c " \n\t,:=(){}.-[];" -> s2 ++ [c] ++ repl rest
|
||||
_ -> c : repl cs
|
||||
_ -> s
|
||||
lgs = 3 -- length s1
|
||||
lgs = length s1
|
||||
|
||||
-- the file name has the form p....pLLL.gf, i.e. 3-letter lang name, suffix .gf
|
||||
getLangName fi =
|
||||
let (nal,ferp) = splitAt 3 (drop 3 (reverse fi)) in
|
||||
(reverse ferp,reverse nal)
|
||||
|
||||
commentIf c = if c then (unlines . commentBody . lines) else id
|
||||
commentIf :: [String] -> String -> String
|
||||
commentIf options =
|
||||
let commentbody = if (elem "--comment-body" options) then commentBody else id
|
||||
dropcomments = if (elem "--drop-comments" options) then dropComments else id
|
||||
in
|
||||
unlines . commentbody . dropcomments . lines
|
||||
|
||||
commentBody :: [String] -> [String]
|
||||
commentBody ss = header ++ map comment body ++ ["}"] where
|
||||
(header,body) = break (isJment . words) ss
|
||||
isJment ws = case ws of
|
||||
@@ -63,5 +87,16 @@ commentBody ss = header ++ map comment body ++ ["}"] where
|
||||
comment l = case l of
|
||||
_ | take 2 l == "--" -> l -- already commented
|
||||
_ | all isSpace l -> l -- empty line
|
||||
_ | elem (head (words l)) commons -> l -- in 'commons'
|
||||
_ -> "--" ++ l
|
||||
|
||||
dropComments :: [String] -> [String]
|
||||
dropComments = filter (not . isComment) where
|
||||
isComment line = case dropWhile isSpace line of
|
||||
'-':'-':'#':_ -> False
|
||||
'-':'-':_ -> True
|
||||
_ -> False
|
||||
|
||||
writeAndReportFile :: FilePath -> String -> IO ()
|
||||
writeAndReportFile file s = do
|
||||
writeFile file s
|
||||
putStrLn $ "wrote " ++ file
|
||||
|
||||
@@ -66,8 +66,8 @@ RelSlash mark head
|
||||
ComplN2 head nmod
|
||||
ComplN3 nmod head
|
||||
AdvCN head nmod
|
||||
PossNP nmod head
|
||||
PartNP nmod head
|
||||
PossNP head nmod
|
||||
PartNP head nmod
|
||||
ExistNPAdv head nmod
|
||||
|
||||
OrdNumeralSuperl nummod head -- quite wrong; cannot find relevant details in the documentation; but most probably head lies outside the score of this function
|
||||
@@ -80,7 +80,7 @@ ApposNP head appos
|
||||
RelNP head acl
|
||||
RelCN head acl
|
||||
SentCN head acl
|
||||
SentAP amod acl
|
||||
SentAP head acl
|
||||
|
||||
DetQuantOrd head nummod amod -- quite wrong; again for same reason as DetQuant function
|
||||
DetCN det head
|
||||
|
||||
281
src/Make.hs
281
src/Make.hs
@@ -1,281 +0,0 @@
|
||||
module Main where
|
||||
|
||||
import Control.Monad
|
||||
import Data.Maybe
|
||||
import System.Cmd
|
||||
import System.Directory
|
||||
import System.Environment
|
||||
import System.Exit
|
||||
|
||||
-- Make commands for compiling and testing resource grammars.
|
||||
-- usage: runghc Make (((present|alltenses)? OPT?) | (clone FILE))? LANGS?
|
||||
-- where
|
||||
-- - OPT = (lang | api | pgf | test | parse | clean | clone)
|
||||
-- - LANGS has the form e.g. langs=Eng,Fin,Rus
|
||||
-- - clone with a flag file=FILENAME clones the file to the specified languages,
|
||||
-- by replacing the 3-letter language name of the original in both
|
||||
-- the filename and the body
|
||||
-- with each name in the list (default: all languages)
|
||||
-- With no argument, lang and api are done, in this order.
|
||||
-- See 'make' below for what is done by which command.
|
||||
|
||||
default_gf = "../../dist/build/gf/gf"
|
||||
|
||||
presApiPath = "-path=api:present:../present"
|
||||
presSymbolPath = "" -- "-path=.:abstract:present:common:romance:scandinavian" ----
|
||||
|
||||
-- the languages have long directory names and short ISO codes (3 letters)
|
||||
-- we also give the functors implied
|
||||
|
||||
langsCoding = [
|
||||
(("afrikaans","Afr"),""),
|
||||
(("amharic", "Amh"),""),
|
||||
(("arabic", "Ara"),""),
|
||||
(("bulgarian","Bul"),""),
|
||||
(("catalan", "Cat"),"Romance"),
|
||||
(("chinese", "Chi"),""),
|
||||
(("danish", "Dan"),"Scand"),
|
||||
(("dutch", "Dut"),""),
|
||||
(("english", "Eng"),""),
|
||||
(("estonian", "Est"),""),
|
||||
(("finnish", "Fin"),""),
|
||||
(("french", "Fre"),"Romance"),
|
||||
(("german", "Ger"),""),
|
||||
(("Greek", "Gre"),""),
|
||||
(("hebrew", "Heb"),""),
|
||||
(("hindi", "Hin"),"Hindustani"),
|
||||
(("interlingua","Ina"),""),
|
||||
(("italian", "Ita"),"Romance"),
|
||||
(("japanese", "Jpn"),""),
|
||||
(("latin", "Lat"),""),
|
||||
(("latvian", "Lav"),""),
|
||||
(("maltese", "Mlt"),""),
|
||||
(("nepali", "Nep"),""),
|
||||
(("norwegian","Nor"),"Scand"),
|
||||
(("persian", "Pes"),""),
|
||||
(("polish", "Pol"),""),
|
||||
(("punjabi", "Pnb"),""),
|
||||
(("romanian", "Ron"),""),
|
||||
(("russian", "Rus"),""),
|
||||
(("sindhi", "Snd"),""),
|
||||
(("spanish", "Spa"),"Romance"),
|
||||
(("swedish", "Swe"),"Scand"),
|
||||
(("thai", "Tha"),""),
|
||||
(("thai", "Thb"),""), -- Thai pronunciation
|
||||
(("turkish", "Tur"),""),
|
||||
(("urdu", "Urd"),"Hindustani")
|
||||
]
|
||||
|
||||
implied (_,lan) = [fun | ((_,la),fun) <- langsCoding, la == lan, fun /= ""]
|
||||
|
||||
langs = map fst langsCoding
|
||||
|
||||
-- all languagues for which Lang can be compiled
|
||||
langsLangAll = langs
|
||||
|
||||
-- languagues that are almost complete and for which Lang is normally compiled
|
||||
langsLang = langs `except` langsIncomplete
|
||||
|
||||
-- languagues that have notpresent marked
|
||||
langsPresent = langsLang `except` ["Chi","Est","Gre","Heb","Jpn","Mlt","Nep","Pes","Snd","Tha","Thb"]
|
||||
|
||||
-- languages for which Lang can be compiled but which are incomplete
|
||||
langsIncomplete = ["Amh","Ara","Heb","Lat","Tur","Thb"]
|
||||
|
||||
-- languages for which to compile Try
|
||||
langsAPI = langsLang `except` langsIncomplete
|
||||
|
||||
-- languages for which to compile Symbolic
|
||||
langsSymbolic = langsLang `except` (langsIncomplete ++ ["Afr","Ina","Jpn","Nep","Pnb","Snd", "Thb"])
|
||||
|
||||
-- languages for which to compile minimal Syntax
|
||||
langsMinimal = langs `only` ["Ara","Eng","Bul","Rus"]
|
||||
|
||||
-- languages for which to run treebank test
|
||||
langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Lav","Rus","Spa","Tha","Thb"]
|
||||
|
||||
-- languages for which to run demo test
|
||||
langsDemo = langsLang `except` ["Ara","Hin","Ina","Lat","Lav","Tha","Thb"]
|
||||
|
||||
-- languages for which to compile parsing grammars
|
||||
langsParse = langs `only` ["Eng"]
|
||||
|
||||
-- languages for which langs.pgf is built
|
||||
langsPGF = langsTest `only` ["Eng","Fre","Swe"]
|
||||
|
||||
-- languages for which Compatibility exists (to be extended)
|
||||
langsCompat = langsLang `only` ["Cat","Eng","Fin","Fre","Ita","Lav","Spa","Swe"]
|
||||
|
||||
treebankExx = "exx-resource.gft"
|
||||
treebankResults = "exx-resource.gftb"
|
||||
|
||||
main = do
|
||||
xx <- getArgs
|
||||
make xx
|
||||
|
||||
make :: [String] -> IO ()
|
||||
make xx = do
|
||||
let ifx opt act = if null xx || elem opt xx then act >> return () else return ()
|
||||
let ifxx opt act = if elem opt xx then act >> return () else return ()
|
||||
let pres
|
||||
| elem "present" xx = 1
|
||||
| elem "alltenses" xx = 2
|
||||
| elem "newcomp" xx = 3
|
||||
| otherwise = 0
|
||||
let dir = case pres of
|
||||
1 -> "../present"
|
||||
2 -> "../alltenses"
|
||||
3 -> "../newcomp"
|
||||
_ -> "../full"
|
||||
|
||||
let optl ls = maybe ls id $ getOptLangs xx
|
||||
|
||||
ifx "lang" $ do
|
||||
let lans = optl $ if (pres == 1) then langsPresent else langsLangAll
|
||||
mapM_ (gfc pres [] . lang) lans
|
||||
mapM_ (gfc pres presSymbolPath . symbol) lans ---- (optl langsAPI)
|
||||
copyl lans "*.gfo" dir
|
||||
ifx "compat" $ do
|
||||
let lans = optl langsCompat
|
||||
mapM_ (gfc pres [] . compat) lans
|
||||
copyld lans "*/Compatibility" ".gfo" dir
|
||||
ifx "api" $ do
|
||||
let lans = optl langsAPI
|
||||
mapM_ (gfc pres presApiPath . try) lans
|
||||
copy "api/Constructors.gfo api/Combinators.gfo api/Syntax.gfo" dir
|
||||
copyld lans "api/*" ".gfo" dir
|
||||
ifx "symbolic" $ do
|
||||
let lans = optl langsSymbolic
|
||||
mapM_ (gfc pres presApiPath . symbolic) lans
|
||||
copy "api/Symbolic.gfo" dir
|
||||
copyld lans "api/Symbolic" ".gfo" dir
|
||||
ifx "minimal" $ do
|
||||
let lans = optl langsMinimal
|
||||
mapM_ (gfcmin presApiPath . syntax) lans
|
||||
copyld lans "api/*" ".gfo" "../minimal"
|
||||
ifxx "pgf" $ do
|
||||
run_gfc $ ["-s","--make","--name=langs","--parser=off",
|
||||
"--output-dir=" ++ dir]
|
||||
++ [dir ++ "/Lang" ++ la ++ ".gfo" | (_,la) <- optl langsPGF]
|
||||
ifxx "test" $ do
|
||||
let ls = optl langsTest
|
||||
gf (treeb "Lang" ls) $ unwords [dir ++ "/Lang" ++ la ++ ".gfo" | (_,la) <- ls]
|
||||
ifxx "parse" $ do
|
||||
mapM_ (gfc pres [] . parse) (optl langsParse)
|
||||
copy "parse/*.gfo parse/oald/*.gfo" dir
|
||||
ifxx "clean" $ do
|
||||
system "rm -f */*.gfo ../alltenses/*.gfo ../present/*.gfo ../prelude/*.gfo ../full/*.gfo"
|
||||
ifxx "clone" $ do
|
||||
let (pref,lang) = case getLangName xx of
|
||||
Just pl -> pl
|
||||
_ -> error "expected flag option file=ppppppLLL.gf"
|
||||
s <- readFile (pref ++ lang ++ ".gf")
|
||||
mapM_ (\la -> writeFile (pref ++ la ++ ".gf") (replaceLang lang la s)) (map snd (optl langs))
|
||||
return ()
|
||||
|
||||
-- pres = 0 (full), 1 (present), 2 (alltenses)
|
||||
gfc pres ppath file = do
|
||||
let preproc = if (pres==1) then "-preproc=mkPresent" else ""
|
||||
let path = if (pres==1) then ppath else ""
|
||||
putStrLn $ "Compiling " ++ file
|
||||
case pres of
|
||||
0 -> run_gfc ["-s","-src",preproc, path, file]
|
||||
3 -> run_gfc ["-s","-src","-no-pmcfg", "-new-comp", preproc, path, file]
|
||||
_ -> run_gfc ["-s","-src","-no-pmcfg",preproc, path, file]
|
||||
|
||||
|
||||
gfcmin path file = do
|
||||
let preproc = "-preproc=mkMinimal"
|
||||
putStrLn $ "Compiling minimal " ++ file
|
||||
run_gfc ["-s","-src", preproc, path, file]
|
||||
|
||||
gf comm file = do
|
||||
putStrLn $ "Reading " ++ file
|
||||
let cmd = "echo \"" ++ comm ++ "\" | gf -s " ++ file
|
||||
putStrLn cmd
|
||||
system cmd
|
||||
|
||||
treeb abstr ls = "rf -lines -tree -file=" ++ treebankExx ++
|
||||
" | l -treebank " ++ unlexer abstr ls ++ " | wf -file=" ++ treebankResults
|
||||
|
||||
demos abstr ls = "gr -number=100 | l -treebank " ++ unlexer abstr ls ++
|
||||
" | ps -to_html | wf -file=resdemo.html"
|
||||
|
||||
lang (lla,la) = lla ++ "/All" ++ la ++ ".gf"
|
||||
compat (lla,la) = lla ++ "/Compatibility" ++ la ++ ".gf"
|
||||
symbol (lla,la) = lla ++ "/Symbol" ++ la ++ ".gf"
|
||||
|
||||
try (lla,la) = "api/Try" ++ la ++ ".gf"
|
||||
syntax (lla,la) = "api/Syntax" ++ la ++ ".gf"
|
||||
|
||||
symbolic (lla,la) = "api/Symbolic" ++ la ++ ".gf"
|
||||
parse (lla,la) = "parse/Parse" ++ la ++ ".gf"
|
||||
|
||||
except ls es = filter (flip notElem es . snd) ls
|
||||
only ls es = filter (flip elem es . snd) ls
|
||||
|
||||
-- list of languages overriding the definitions above
|
||||
getOptLangs args = case [ls | a <- args, let (f,ls) = splitAt 6 a, f=="langs="] of
|
||||
ls:_ -> return $ findLangs $ seps ls
|
||||
_ -> Nothing
|
||||
where
|
||||
seps = words . map (\c -> if c==',' then ' ' else c)
|
||||
findLangs ls = [lang | lang@(_,la) <- langs, elem la ls]
|
||||
|
||||
-- the file name has the form p....pLLL.gf, i.e. 3-letter lang name, suffix .gf
|
||||
getLangName args = case [ls | a <- args, let (f,ls) = splitAt 5 a, f=="file="] of
|
||||
fi:_ -> let (nal,ferp) = splitAt 3 (drop 3 (reverse fi)) in return (reverse ferp,reverse nal)
|
||||
_ -> Nothing
|
||||
|
||||
replaceLang s1 s2 = repl where
|
||||
repl s = case s of
|
||||
c:cs -> case splitAt lgs s of
|
||||
(pre,rest) | pre == s1 -> s2 ++ repl rest
|
||||
_ -> c : repl cs
|
||||
_ -> s
|
||||
lgs = 3 -- length s1
|
||||
|
||||
unlexer abstr ls =
|
||||
"-unlexer=\\\"" ++ unwords
|
||||
[abstr ++ la ++ "=" ++ unl |
|
||||
lla@(_,la) <- ls, let unl = unlex lla, not (null unl)] ++
|
||||
"\\\""
|
||||
where
|
||||
unlex lla = maybe "" id $ lookup lla langsCoding
|
||||
|
||||
-- | Runs the gf executable in compile mode with the given arguments.
|
||||
run_gfc :: [String] -> IO ()
|
||||
run_gfc args =
|
||||
do let args' = ["-batch"] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"]
|
||||
----do let args' = ["-batch","-new-comp"] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"]
|
||||
--- do let args' = ["-batch","-gf-lib-path=."] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"] --- why path? AR
|
||||
putStrLn $ "Running: " ++ default_gf ++ " " ++ unwords (map showArg args')
|
||||
e <- rawSystem default_gf args'
|
||||
case e of
|
||||
ExitSuccess -> return ()
|
||||
ExitFailure i -> putStrLn $ "gf exited with exit code: " ++ show i
|
||||
where rts_flags = ["-K100M"]
|
||||
showArg arg = "'" ++ arg ++ "'"
|
||||
|
||||
copy :: String -> String -> IO ()
|
||||
copy from to =
|
||||
do system $ "cp " ++ from ++ " " ++ to
|
||||
return ()
|
||||
|
||||
copyl :: [(String,String)] -> String -> String -> IO ()
|
||||
copyl lans from to = do
|
||||
echosystem $ "cp abstract/" ++ from ++ " " ++ to
|
||||
echosystem $ "cp common/" ++ from ++ " " ++ to
|
||||
mapM_ (\lan -> echosystem $ "cp */*" ++ lan ++ from ++ " " ++ to)
|
||||
(map snd lans ++ concatMap implied lans)
|
||||
return ()
|
||||
|
||||
copyld :: [(String,String)] -> String -> String -> String -> IO ()
|
||||
copyld lans dir from to = do
|
||||
mapM_ (\lan -> echosystem $ "cp " ++ dir ++ lan ++ from ++ " " ++ to)
|
||||
(map snd lans ++ if (take 3 dir == "api") then [] else concatMap implied lans)
|
||||
return ()
|
||||
|
||||
echosystem c = do
|
||||
putStrLn c
|
||||
system c
|
||||
261
src/Makefile
261
src/Makefile
@@ -1,261 +0,0 @@
|
||||
RUNGHC=runghc
|
||||
RUNMAKE=$(RUNGHC) Make.hs
|
||||
|
||||
PROBSFILE=../../treebanks/PennTreebank/ParseEngAbs.probs
|
||||
TPROBSFILE=translator/translate.probs
|
||||
|
||||
#GF_LIB_PATH=..
|
||||
|
||||
.PHONY: all present alltenses full lang api math prelude test demo parse synopsis link compiled constructX clean
|
||||
|
||||
all: link prelude constructX present alltenses
|
||||
#full
|
||||
|
||||
present:
|
||||
$(RUNMAKE) present lang
|
||||
$(RUNMAKE) present api
|
||||
$(RUNMAKE) present symbolic
|
||||
|
||||
alltenses:
|
||||
$(RUNMAKE) alltenses lang
|
||||
$(RUNMAKE) alltenses api
|
||||
$(RUNMAKE) alltenses symbolic
|
||||
|
||||
full:
|
||||
$(RUNMAKE) lang
|
||||
|
||||
lang:
|
||||
$(RUNMAKE) alltenses lang
|
||||
|
||||
api:
|
||||
$(RUNMAKE) alltenses api
|
||||
|
||||
dict: DictBul DictEng DictEst DictFin DictFre DictRus DictGer DictSwe
|
||||
|
||||
DictBul:
|
||||
gf -batch bulgarian/DictBul.gf +RTS -K100M
|
||||
cp -p bulgarian/DictBul*.gfo ../alltenses
|
||||
|
||||
DictEng:
|
||||
gf -batch english/DictEng.gf +RTS -K100M
|
||||
cp -p english/DictEng*.gfo ../alltenses
|
||||
|
||||
DictEst:
|
||||
gf -batch estonian/DictEst.gf +RTS -K100M
|
||||
cp -p estonian/DictEst*.gfo ../alltenses
|
||||
|
||||
DictFin:
|
||||
gf -batch finnish/DictFin.gf +RTS -K100M
|
||||
cp -p finnish/DictFin*.gfo ../alltenses
|
||||
|
||||
DictFre:
|
||||
gf -batch french/DictFre.gf +RTS -K100M
|
||||
cp -p french/DictFre*.gfo ../alltenses
|
||||
|
||||
DictGer:
|
||||
gf -batch german/DictGer.gf +RTS -K100M
|
||||
cp -p german/DictGer*.gfo ../alltenses
|
||||
|
||||
DictRus:
|
||||
gf -batch russian/DictRus.gf +RTS -K100M
|
||||
cp -p russian/DictRus*.gfo ../alltenses
|
||||
|
||||
DictSwe:
|
||||
gf -batch swedish/DictSwe.gf +RTS -K100M
|
||||
cp -p swedish/DictSwe*.gfo ../alltenses
|
||||
|
||||
|
||||
# thai with pronunciation
|
||||
thp:
|
||||
cd thai ; runghc ThaiScript.hs ; cd ..
|
||||
|
||||
|
||||
prelude:
|
||||
gf -batch -path=prelude prelude/*.gf
|
||||
cp -p prelude/*.gfo ../prelude
|
||||
|
||||
constructX:
|
||||
gf -batch common/ConstructX.gf
|
||||
cp -p common/ConstructX.gfo ../prelude
|
||||
|
||||
MakeStructural:
|
||||
gf -batch */MakeStructural*.gf
|
||||
cp -p */MakeStructural*.gfo ../present
|
||||
cp -p */MakeStructural*.gfo ../alltenses
|
||||
|
||||
# the rest is mostly obsolete 24/8/2012
|
||||
|
||||
compatibility:
|
||||
$(RUNMAKE) present compat
|
||||
|
||||
test:
|
||||
$(RUNMAKE) test
|
||||
|
||||
demo:
|
||||
gf -make -name=Demo0 demo/DemoBul.gf demo/DemoCat.gf +RTS -K48M
|
||||
gf -make -name=Demo1 demo/DemoDan.gf demo/DemoDut.gf demo/DemoEng.gf
|
||||
gf -make -name=Demo2 demo/DemoFin.gf +RTS -K48M
|
||||
gf -make -name=Demo3 demo/DemoFre.gf demo/DemoGer.gf demo/DemoIta.gf demo/DemoNor.gf demo/DemoPol.gf +RTS -K48M
|
||||
gf -make -name=Demo4 demo/DemoRon.gf +RTS -K48M
|
||||
gf -make -name=Demo5 demo/DemoRus.gf demo/DemoSpa.gf demo/DemoSwe.gf
|
||||
gf -make -name=Demo6 demo/DemoUrd.gf +RTS -K48M
|
||||
gf -make Demo0.pgf Demo1.pgf Demo2.pgf Demo3.pgf Demo4.pgf Demo5.pgf Demo6.pgf
|
||||
rm Demo?.pgf
|
||||
|
||||
demoex:
|
||||
echo "gr -number=100 -cat=S | l -treebank | ps -to_html | wf -file=resdemo.html" | gf Demo.pgf
|
||||
|
||||
parse:
|
||||
$(RUNMAKE) parse
|
||||
|
||||
synopsis:
|
||||
cd ../doc ; $(RUNGHC) MkSynopsis ; cd ../src
|
||||
|
||||
link:
|
||||
chmod a+x mkPresent mkMinimal
|
||||
|
||||
compiled:
|
||||
(cd .. && tar -zcf resource-compiled.tar.gz prelude alltenses present)
|
||||
|
||||
clean:
|
||||
$(RUNMAKE) clean
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# the previous translation grammar "Parse" now replaced by Translate:
|
||||
|
||||
# Dummy targets, just for convenience
|
||||
Translate: TranslateEng TranslateBul TranslateChi TranslateGer TranslateSwe TranslateHin TranslateFin TranslateFre Translate8
|
||||
TranslateEng: TranslateEng.pgf
|
||||
TranslateBul: TranslateBul.pgf
|
||||
TranslateChi: TranslateChi.pgf
|
||||
TranslateGer: TranslateGer.pgf
|
||||
TranslateDut: TranslateDut.pgf
|
||||
TranslateSwe: TranslateSwe.pgf
|
||||
TranslateHin: TranslateHin.pgf
|
||||
TranslateFin: TranslateFin.pgf
|
||||
TranslateFre: TranslateFre.pgf
|
||||
TranslateIta: TranslateIta.pgf
|
||||
TranslateSpa: TranslateSpa.pgf
|
||||
|
||||
S=-s
|
||||
GFMKT=mkdir -p ../translator && gf $S -make -literal=PN,Symb -probs=$(TPROBSFILE) -gfo-dir ../translator
|
||||
|
||||
TRANSLATE8=TranslateEng.pgf TranslateBul.pgf TranslateChi.pgf TranslateGer.pgf TranslateSwe.pgf TranslateHin.pgf TranslateFin.pgf TranslateFre.pgf
|
||||
TRANSLATE10=TranslateEng.pgf TranslateBul.pgf TranslateChi.pgf TranslateGer.pgf TranslateSwe.pgf TranslateHin.pgf TranslateFin.pgf TranslateFre.pgf TranslateIta.pgf TranslateSpa.pgf
|
||||
|
||||
TRANSLATE11=$(TRANSLATE10) TranslateDut.pgf
|
||||
|
||||
TRANSLATE15=$(TRANSLATE10) TranslateDut.pgf TranslateCat.pgf TranslateEst.pgf TranslateTha.pgf TranslateJpn.pgf
|
||||
|
||||
# Without dependencies:
|
||||
Translate10:
|
||||
$(GFMKT) -name=Translate10 $(TRANSLATE10) +RTS -K32M
|
||||
|
||||
# With dependencies:
|
||||
Translate10.pgf: $(TRANSLATE10)
|
||||
$(GFMKT) -name=Translate10 $(TRANSLATE10) +RTS -K32M
|
||||
|
||||
# Without dependencies:
|
||||
Translate11:
|
||||
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
|
||||
|
||||
# With dependencies:
|
||||
Translate11.pgf: $(TRANSLATE11)
|
||||
$(GFMKT) -name=Translate11 $(TRANSLATE11) +RTS -K32M
|
||||
|
||||
# Without dependencies:
|
||||
Translate8:
|
||||
$(GFMKT) -name=Translate8 $(TRANSLATE8) +RTS -K32M
|
||||
|
||||
# With dependencies:
|
||||
Translate8.pgf: $(TRANSLATE8)
|
||||
$(GFMKT) -name=Translate8 $(TRANSLATE8) +RTS -K32M
|
||||
|
||||
Translate15.pgf: $(TRANSLATE15)
|
||||
$(GFMKT) -name=Translate15 $(TRANSLATE15) +RTS -K32M
|
||||
|
||||
# Translate grammars for individual languages
|
||||
TranslateEng.pgf:: ; $(GFMKT) -name=TranslateEng translator/TranslateEng.gf
|
||||
TranslateBul.pgf:: ; $(GFMKT) -name=TranslateBul translator/TranslateBul.gf
|
||||
TranslateChi.pgf:: ; $(GFMKT) -name=TranslateChi translator/TranslateChi.gf +RTS -K200M
|
||||
TranslateFin.pgf:: ; $(GFMKT) -name=TranslateFin translator/TranslateFin.gf +RTS -K64M
|
||||
TranslateGer.pgf:: ; $(GFMKT) -name=TranslateGer translator/TranslateGer.gf
|
||||
TranslateDut.pgf:: ; $(GFMKT) -name=TranslateDut translator/TranslateDut.gf
|
||||
TranslateHin.pgf:: ; $(GFMKT) -name=TranslateHin translator/TranslateHin.gf
|
||||
TranslateFre.pgf:: ; $(GFMKT) -name=TranslateFre translator/TranslateFre.gf +RTS -K64M
|
||||
TranslateSwe.pgf:: ; $(GFMKT) -name=TranslateSwe translator/TranslateSwe.gf
|
||||
TranslateIta.pgf:: ; $(GFMKT) -name=TranslateIta translator/TranslateIta.gf +RTS -K64M
|
||||
TranslateSpa.pgf:: ; $(GFMKT) -name=TranslateSpa translator/TranslateSpa.gf +RTS -K64M
|
||||
TranslateCat.pgf:: ; $(GFMKT) -name=TranslateCat translator/TranslateCat.gf +RTS -K64M
|
||||
TranslateEst.pgf:: ; $(GFMKT) -name=TranslateEst translator/TranslateEst.gf +RTS -K64M
|
||||
TranslateTha.pgf:: ; $(GFMKT) -name=TranslateTha translator/TranslateTha.gf +RTS -K64M
|
||||
TranslateJpn.pgf:: ; $(GFMKT) -name=TranslateJpn translator/TranslateJpn.gf +RTS -K64M
|
||||
|
||||
# Selected language pairs:
|
||||
TranslateEngFin: ; $(GFMKT) -name=TranslateEngFin TranslateEng.pgf TranslateFin.pgf
|
||||
TranslateEngGer: ; $(GFMKT) -name=TranslateEngGer TranslateEng.pgf TranslateGer.pgf
|
||||
TranslateEngHin: ; $(GFMKT) -name=TranslateEngHin TranslateEng.pgf TranslateHin.pgf
|
||||
TranslateEngBul: ; $(GFMKT) -name=TranslateEngBul TranslateEng.pgf TranslateBul.pgf
|
||||
TranslateEngSpa: ; $(GFMKT) -name=TranslateEngSpa TranslateEng.pgf TranslateSpa.pgf
|
||||
TranslateEngFre: ; $(GFMKT) -name=TranslateEngFre TranslateEng.pgf TranslateFre.pgf
|
||||
TranslateEngSwe: ; $(GFMKT) -name=TranslateEngSwe TranslateEng.pgf TranslateSwe.pgf
|
||||
TranslateEngChi: ; $(GFMKT) -name=TranslateEngChi TranslateEng.pgf TranslateChi.pgf
|
||||
|
||||
|
||||
|
||||
|
||||
############################## begin Parse
|
||||
## now obsolete
|
||||
|
||||
# Dummy targets, just for convenience
|
||||
Parse: ParseEng ParseBul ParseChi ParseGer ParseSwe ParseHin ParseFin ParseFre Parse8
|
||||
ParseEng: ParseEng.pgf
|
||||
ParseBul: ParseBul.pgf
|
||||
ParseChi: ParseChi.pgf
|
||||
ParseGer: ParseGer.pgf
|
||||
ParseSwe: ParseSwe.pgf
|
||||
ParseHin: ParseHin.pgf
|
||||
ParseFin: ParseFin.pgf
|
||||
ParseFre: ParseFre.pgf
|
||||
|
||||
S=-s
|
||||
GFMKP=mkdir -p ../parse8 && gf $S -make -literal=PN -probs=$(PROBSFILE) -gfo-dir ../parse8
|
||||
|
||||
PARSE8=ParseEng.pgf ParseBul.pgf ParseChi.pgf ParseGer.pgf ParseSwe.pgf ParseHin.pgf ParseFin.pgf ParseFre.pgf
|
||||
|
||||
# Without dependencies:
|
||||
Parse8:
|
||||
$(GFMKP) -name=Parse8 $(PARSE8) +RTS -K200M
|
||||
|
||||
# With dependencies:
|
||||
Parse8.pgf: $(PARSE8)
|
||||
$(GFMKP) -name=Parse8 $(PARSE8) +RTS -K200M
|
||||
|
||||
# Parse grammars for individual languages
|
||||
ParseEng.pgf:: ; $(GFMKP) -name=ParseEng english/ParseEng.gf +RTS -K32M
|
||||
ParseBul.pgf:: ; $(GFMKP) -name=ParseBul bulgarian/ParseBul.gf +RTS -K32M
|
||||
ParseChi.pgf:: ; $(GFMKP) -name=ParseChi chinese/ParseChi.gf +RTS -K200M
|
||||
ParseFin.pgf:: ; $(GFMKP) -name=ParseFin finnish/stemmed/ParseFin.gf +RTS -K200M
|
||||
ParseGer.pgf:: ; $(GFMKP) -name=ParseGer german/ParseGer.gf +RTS -K200M
|
||||
ParseHin.pgf:: ; $(GFMKP) -name=ParseHin hindi/ParseHin.gf +RTS -K200M
|
||||
ParseFre.pgf:: ; $(GFMKP) -name=ParseFre french/ParseFre.gf +RTS -K200M
|
||||
ParseSwe.pgf:: ; $(GFMKP) -name=ParseSwe swedish/ParseSwe.gf +RTS -K32M
|
||||
|
||||
ParseSpa.pgf:: ; $(GFMKP) -name=ParseSpa spanish/ParseSpa.gf
|
||||
|
||||
# Selected language pairs:
|
||||
ParseEngFin: ; $(GFMKP) -name=ParseEngFin ParseEng.pgf ParseFin.pgf
|
||||
ParseEngGer: ; $(GFMKP) -name=ParseEngGer ParseEng.pgf ParseGer.pgf
|
||||
ParseEngHin: ; $(GFMKP) -name=ParseEngHin ParseEng.pgf ParseHin.pgf
|
||||
ParseEngBul: ; $(GFMKP) -name=ParseEngBul ParseEng.pgf ParseBul.pgf
|
||||
ParseEngSpa: ; $(GFMKP) -name=ParseEngSpa ParseEng.pgf ParseSpa.pgf
|
||||
ParseEngFre: ; $(GFMKP) -name=ParseEngFre ParseEng.pgf ParseFre.pgf
|
||||
ParseEngSwe: ; $(GFMKP) -name=ParseEngSwe ParseEng.pgf ParseSwe.pgf
|
||||
ParseEngChi: ; $(GFMKP) -name=ParseEngChi ParseEng.pgf ParseChi.pgf
|
||||
|
||||
############################################## end Parse
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
module Main where
|
||||
|
||||
-- Prepare a new resource directory. Usage:
|
||||
-- 1. $ cp german/*.gf dutch/
|
||||
-- 2. $ cd dutch/
|
||||
-- 3. $ runghc ../MkLang.hs Ger Dut
|
||||
-- AR 6/11/2009
|
||||
|
||||
import System.Cmd
|
||||
import System.Environment
|
||||
import Data.List
|
||||
|
||||
main = do
|
||||
xx <- getArgs
|
||||
change xx
|
||||
|
||||
change xx = case xx of
|
||||
from:to:_ -> do
|
||||
system "ls *.gf > files.tmp"
|
||||
files <- readFile "files.tmp" >>= return . lines
|
||||
mapM_ (changeFileName from to) files
|
||||
system "ls *.gf > files.tmp"
|
||||
files <- readFile "files.tmp" >>= return . lines
|
||||
mapM_ (changeIdents from to) files
|
||||
---- mapM_ commentOut files
|
||||
comment -> do
|
||||
files <- readFile "files.tmp" >>= return . lines
|
||||
mapM_ commentOut files
|
||||
|
||||
changeFileName from to file = system $ "mv " ++ file ++ " " ++ to_file where
|
||||
to_file = take (length file - 3 - length from) (takeWhile (/='.') file) ++ to ++ ".gf"
|
||||
|
||||
changeIdents from to = changeInFile changes
|
||||
where
|
||||
lg = length from
|
||||
changes s = case s of
|
||||
c:cs
|
||||
| take lg s == from -> to ++ changes (drop lg s)
|
||||
| otherwise -> c : changes cs
|
||||
_ -> s
|
||||
|
||||
commentOut = changeInFile comm where
|
||||
comm s = let (hd,tl) = break (=='{') s in
|
||||
hd ++ "\n{\n" ++ unlines ["--" ++ l | l <- lines tl] ++ "\n}\n"
|
||||
|
||||
changeInFile ch file = do
|
||||
s <- readFile file
|
||||
writeFile "gf.tmp" (ch s)
|
||||
system $ "mv gf.tmp " ++ file
|
||||
@@ -83,6 +83,7 @@ abstract Cat = Common ** {
|
||||
Quant ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||
Num ; -- number determining element e.g. "seven"
|
||||
Card ; -- cardinal number e.g. "seven"
|
||||
ACard ; -- adjective like cardinal e.g. "few", "many"
|
||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||
DAP ; -- determiner with adjective e.g. "three small"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--1 Common: Structures with Common Implementations.
|
||||
|
||||
-- This module defines the categories that uniformly have the
|
||||
-- linearization type ${s:Str}$ in all languages.
|
||||
-- This module defines the categories that uniformly have the same
|
||||
-- linearization type (usually ${s:Str}$) in all languages.
|
||||
|
||||
abstract Common = {
|
||||
|
||||
|
||||
@@ -71,13 +71,43 @@ fun
|
||||
|
||||
cat
|
||||
Timeunit ;
|
||||
Hour ;
|
||||
Weekday ;
|
||||
Month ;
|
||||
Monthday ;
|
||||
Year ;
|
||||
|
||||
fun
|
||||
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
||||
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
||||
timeunitRange : Card -> Card -> Timeunit -> Adv ; -- (cats live) ten to twenty years
|
||||
|
||||
oneHour : Hour ;
|
||||
twoHour : Hour ;
|
||||
threeHour : Hour ;
|
||||
fourHour : Hour ;
|
||||
fiveHour : Hour ;
|
||||
sixHour : Hour ;
|
||||
sevenHour : Hour ;
|
||||
eightHour : Hour ;
|
||||
nineHour : Hour ;
|
||||
tenHour : Hour ;
|
||||
elevenHour : Hour ;
|
||||
twelveHour : Hour ;
|
||||
thirteenHour : Hour ;
|
||||
fourteenHour : Hour ;
|
||||
fifteenHour : Hour ;
|
||||
sixteenHour : Hour ;
|
||||
seventeenHour : Hour ;
|
||||
eighteenHour : Hour ;
|
||||
nineteenHour : Hour ;
|
||||
twentyHour : Hour ;
|
||||
twentyOneHour : Hour ;
|
||||
twentyTwoHour : Hour ;
|
||||
twentyThreeHour : Hour ;
|
||||
twentyFourHour : Hour ;
|
||||
|
||||
timeHour : Hour -> Adv ; -- at three a.m./p.m.
|
||||
timeHourMinute : Hour -> Card -> Adv ; -- at six forty a.m./p.m.
|
||||
|
||||
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
||||
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
||||
|
||||
225
src/abstract/Extend.gf
Normal file
225
src/abstract/Extend.gf
Normal file
@@ -0,0 +1,225 @@
|
||||
--1 Extensions of core RGL syntax (the Grammar module)
|
||||
|
||||
-- This module defines syntax rules that are not yet implemented in all
|
||||
-- languages, and perhaps never implementable either. But all rules are given
|
||||
-- a default implementation in common/ExtendFunctor.gf so that they can be included
|
||||
-- in the library API. The default implementations are meant to be overridden in each
|
||||
-- xxxxx/ExtendXxx.gf when the work proceeds.
|
||||
--
|
||||
-- This module is aimed to replace the original Extra.gf, which is kept alive just
|
||||
-- for backwardcommon compatibility. It will also replace translator/Extensions.gf
|
||||
-- and thus eliminate the often duplicated work in those two modules.
|
||||
--
|
||||
-- (c) Aarne Ranta 2017-08-20 under LGPL and BSD
|
||||
|
||||
|
||||
abstract Extend = Cat ** {
|
||||
|
||||
fun
|
||||
GenNP : NP -> Quant ; -- this man's
|
||||
GenIP : IP -> IQuant ; -- whose
|
||||
GenRP : Num -> CN -> RP ; -- whose car
|
||||
|
||||
-- In case the first two are not available, the following applications should in any case be.
|
||||
|
||||
GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s)
|
||||
GenModIP : Num -> IP -> CN -> IP ; -- whose car(s)
|
||||
|
||||
CompBareCN : CN -> Comp ; -- (is) teacher
|
||||
|
||||
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : ClSlash -> RCl ; -- he lives in
|
||||
|
||||
|
||||
-- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
|
||||
-- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
|
||||
|
||||
cat
|
||||
VPS ; -- finite VP's with tense and polarity
|
||||
[VPS] {2} ;
|
||||
VPI ;
|
||||
[VPI] {2} ; -- infinitive VP's (TODO: with anteriority and polarity)
|
||||
|
||||
fun
|
||||
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||
|
||||
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
||||
ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
|
||||
|
||||
-- the same for VPSlash, taking a complement with shared V2 verbs
|
||||
|
||||
cat
|
||||
VPS2 ; -- have loved (binary version of VPS)
|
||||
[VPS2] {2} ; -- has loved, hates"
|
||||
VPI2 ; -- to love (binary version of VPI)
|
||||
[VPI2] {2} ; -- to love, to hate
|
||||
|
||||
fun
|
||||
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||
ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||
ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
|
||||
|
||||
MkVPI2 : VPSlash -> VPI2 ; -- to love
|
||||
ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
|
||||
ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||
|
||||
fun
|
||||
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
|
||||
|
||||
ICompAP : AP -> IComp ; -- "how old"
|
||||
IAdvAdv : Adv -> IAdv ; -- "how often"
|
||||
|
||||
CompIQuant : IQuant -> IComp ; -- which (is it) [agreement to NP]
|
||||
|
||||
PrepCN : Prep -> CN -> Adv ; -- by accident [Prep + CN without article]
|
||||
|
||||
-- fronted/focal constructions, only for main clauses
|
||||
|
||||
fun
|
||||
FocusObj : NP -> SSlash -> Utt ; -- her I love
|
||||
FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||
FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||
FocusAP : AP -> NP -> Utt ; -- green was the tree
|
||||
|
||||
-- participle constructions
|
||||
PresPartAP : VP -> AP ; -- (the man) looking at Mary
|
||||
EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
|
||||
|
||||
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||
|
||||
-- this is a generalization of Verb.PassV2 and should replace it in the future.
|
||||
|
||||
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
|
||||
|
||||
-- the form with an agent may result in a different linearization
|
||||
-- from an adverbial modification by an agent phrase.
|
||||
|
||||
PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
|
||||
|
||||
-- publishing of the document
|
||||
|
||||
NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
||||
|
||||
-- existential for mathematics
|
||||
|
||||
ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
|
||||
|
||||
-- existentials with a/no variation
|
||||
|
||||
ExistCN : CN -> Cl ; -- there is a car / there is no car
|
||||
ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
|
||||
ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
|
||||
|
||||
-- infinitive for purpose AR 21/8/2013
|
||||
|
||||
PurposeVP : VP -> Adv ; -- to become happy
|
||||
|
||||
-- object S without "that"
|
||||
|
||||
ComplBareVS : VS -> S -> VP ; -- say she runs
|
||||
SlashBareV2S : V2S -> S -> VPSlash ; -- answer (to him) it is good
|
||||
|
||||
ComplDirectVS : VS -> Utt -> VP ; -- say: "today"
|
||||
ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when"
|
||||
|
||||
-- front the extraposed part
|
||||
|
||||
FrontComplDirectVS : NP -> VS -> Utt -> Cl ; -- "I am here", she said
|
||||
FrontComplDirectVQ : NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
||||
|
||||
-- proper structure of "it is AP to VP"
|
||||
|
||||
PredAPVP : AP -> VP -> Cl ; -- it is good to walk
|
||||
|
||||
-- to use an AP as CN or NP without CN
|
||||
|
||||
AdjAsCN : AP -> CN ; -- a green one ; en grön (Swe)
|
||||
AdjAsNP : AP -> NP ; -- green (is good)
|
||||
|
||||
-- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
|
||||
-- This is necessary in languages like Swedish, which have special reflexive possessives.
|
||||
-- However, it is also needed in application grammars that want to treat "brush one's teeth" as a one-place predicate.
|
||||
|
||||
cat
|
||||
RNP ; -- reflexive noun phrase, e.g. "my family and myself"
|
||||
RNPList ; -- list of reflexives to be coordinated, e.g. "my family, myself, everyone"
|
||||
|
||||
-- Notice that it is enough for one NP in RNPList to be RNP.
|
||||
|
||||
fun
|
||||
ReflRNP : VPSlash -> RNP -> VP ; -- love my family and myself
|
||||
|
||||
ReflPron : RNP ; -- myself
|
||||
ReflPoss : Num -> CN -> RNP ; -- my car(s)
|
||||
|
||||
PredetRNP : Predet -> RNP -> RNP ; -- all my brothers
|
||||
|
||||
ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
|
||||
|
||||
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself
|
||||
Base_nr_RNP : NP -> RNP -> RNPList ; -- John, myself
|
||||
Base_rn_RNP : RNP -> NP -> RNPList ; -- myself, John
|
||||
Cons_rr_RNP : RNP -> RNPList -> RNPList ; -- my family, myself, John
|
||||
Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself
|
||||
---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary
|
||||
|
||||
|
||||
--- from Extensions
|
||||
|
||||
ComplGenVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
|
||||
---- SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
|
||||
|
||||
CompoundN : N -> N -> N ; -- control system / controls system / control-system
|
||||
CompoundAP : N -> A -> AP ; -- language independent / language-independent
|
||||
|
||||
GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
|
||||
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
|
||||
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
|
||||
|
||||
WithoutVP : VP -> Adv ; -- without publishing the document
|
||||
ByVP : VP -> Adv ; -- by publishing the document
|
||||
InOrderToVP : VP -> Adv ; -- (in order) to publish the document
|
||||
|
||||
ApposNP : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||
|
||||
AdAdV : AdA -> AdV -> AdV ; -- almost always
|
||||
UttAdV : AdV -> Utt ; -- always(!)
|
||||
PositAdVAdj : A -> AdV ; -- (that she) positively (sleeps)
|
||||
|
||||
CompS : S -> Comp ; -- (the fact is) that she sleeps
|
||||
CompQS : QS -> Comp ; -- (the question is) who sleeps
|
||||
CompVP : Ant -> Pol -> VP -> Comp ; -- (she is) to go
|
||||
|
||||
-- very language-specific things
|
||||
|
||||
-- Eng
|
||||
UncontractedNeg : Pol ; -- do not, etc, as opposed to don't
|
||||
UttVPShort : VP -> Utt ; -- have fun, as opposed to "to have fun"
|
||||
ComplSlashPartLast : VPSlash -> NP -> VP ; -- set it apart, as opposed to "set apart it"
|
||||
|
||||
-- Romance
|
||||
DetNPMasc : Det -> NP ;
|
||||
DetNPFem : Det -> NP ;
|
||||
|
||||
iFem_Pron : Pron ; -- I (Fem)
|
||||
youFem_Pron : Pron ; -- you (Fem)
|
||||
weFem_Pron : Pron ; -- we (Fem)
|
||||
youPlFem_Pron : Pron ; -- you plural (Fem)
|
||||
theyFem_Pron : Pron ; -- they (Fem)
|
||||
youPolFem_Pron : Pron ; -- you polite (Fem)
|
||||
youPolPl_Pron : Pron ; -- you polite plural (Masc)
|
||||
youPolPlFem_Pron : Pron ; -- you polite plural (Fem)
|
||||
|
||||
-- German
|
||||
UttAccNP : NP -> Utt ; -- him (accusative)
|
||||
UttDatNP : NP -> Utt ; -- him (dative)
|
||||
UttAccIP : IP -> Utt ; -- whom (accusative)
|
||||
UttDatIP : IP -> Utt ; -- whom (dative)
|
||||
|
||||
|
||||
}
|
||||
@@ -70,7 +70,7 @@ abstract Sentence = Cat ** {
|
||||
|
||||
-- This covers subjunctive clauses, but they can also be added to the end.
|
||||
|
||||
SSubjS : S -> Subj -> S -> S ; -- I go home if she comes
|
||||
SSubjS : S -> Subj -> S -> S ; -- I go home, if she comes
|
||||
|
||||
-- A sentence can be modified by a relative clause referring to its contents.
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--1 Structural: Structural Words
|
||||
--
|
||||
--
|
||||
-- Here we have some words belonging to closed classes and appearing
|
||||
-- in all languages we have considered.
|
||||
-- Sometimes more distinctions are needed, e.g. $we_Pron$ in Spanish
|
||||
-- should be replaced by masculine and feminine variants, found in
|
||||
-- [``ExtraSpa`` ../spanish/ExtraSpa.gf].
|
||||
-- [``ExtendSpa`` ../spanish/ExtendSpa.gf].
|
||||
|
||||
abstract Structural = Cat ** {
|
||||
|
||||
@@ -12,11 +12,11 @@ abstract Structural = Cat ** {
|
||||
|
||||
-- This is an alphabetical list of structural words
|
||||
|
||||
above_Prep : Prep ;
|
||||
above_Prep : Prep ;
|
||||
after_Prep : Prep ;
|
||||
all_Predet : Predet ;
|
||||
almost_AdA : AdA ;
|
||||
almost_AdN : AdN ;
|
||||
almost_AdA : AdA ;
|
||||
almost_AdN : AdN ;
|
||||
although_Subj : Subj ;
|
||||
always_AdV : AdV ;
|
||||
and_Conj : Conj ;
|
||||
@@ -84,7 +84,7 @@ abstract Structural = Cat ** {
|
||||
there7to_Adv : Adv ; -- to there
|
||||
there7from_Adv : Adv ; -- from there
|
||||
therefore_PConj : PConj ;
|
||||
they_Pron : Pron ;
|
||||
they_Pron : Pron ;
|
||||
this_Quant : Quant ;
|
||||
through_Prep : Prep ;
|
||||
to_Prep : Prep ;
|
||||
@@ -110,7 +110,7 @@ abstract Structural = Cat ** {
|
||||
youPl_Pron : Pron ; -- you (plural)
|
||||
youPol_Pron : Pron ; -- you (polite)
|
||||
|
||||
no_Quant : Quant ;
|
||||
no_Quant : Quant ;
|
||||
not_Predet : Predet ;
|
||||
if_then_Conj : Conj ;
|
||||
at_least_AdN : AdN ;
|
||||
|
||||
@@ -156,7 +156,7 @@ abstract IrregAfrAbs = Cat ** {
|
||||
-- fun vragen_V : V ; -- to ask
|
||||
-- fun vreten_V : V ; -- to eat, to devour
|
||||
-- fun vriezen_V : V ; -- to freeze ("it's freezing")
|
||||
-- fun vrijen_V : V ; -- vreeën / vrijden gevreeën / gevrijd to make love
|
||||
-- fun vrijen_V : V ; -- vreeën / vrijden gevreeën / gevrijd to make love
|
||||
-- fun wassen_V : V ; -- to wash
|
||||
-- fun wegen_V : V ; -- to weigh
|
||||
-- fun werpen_V : V ; -- to throw
|
||||
|
||||
7
src/api/CombinatorsEus.gf
Normal file
7
src/api/CombinatorsEus.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:alltenses:prelude:../basque
|
||||
|
||||
resource CombinatorsEus = Combinators with
|
||||
(Cat = CatEus),
|
||||
(Structural = StructuralEus),
|
||||
(Noun = NounEus),
|
||||
(Constructors = ConstructorsEus) ** {} ;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user