846 Commits

Author SHA1 Message Date
John J. Camilleri
d63311c65c Add link to new RGL Browser in synopsis 2018-12-02 09:17:16 +01:00
Aarne Ranta
ddafbb6316 some fixes in labels, assume GF 3.10 2018-12-01 09:43:49 +01:00
Inari Listenmaa
fab03c7675 Merge pull request #91 from inariksit/arabic
Arabic
2018-12-01 00:06:48 +01:00
Inari Listenmaa
0475955567 (Ara) Add state parameter to regNP + small cleanup/move around code 2018-11-30 15:23:49 +01:00
Inari Listenmaa
fc0c504107 (Ara) Add new constructor irregFemA 2018-11-30 14:12:28 +01:00
Inari Listenmaa
cb90184a95 (Ara) SlashV2V: fix a bug about object placement 2018-11-30 13:08:50 +01:00
Inari Listenmaa
51f6d6247c (Ara) Low-level hacks for overriding verb agreement and word order 2018-11-30 13:08:18 +01:00
Inari Listenmaa
73771e317b Merge pull request #88 from kitukb/master
The error is only on Mac, and doesn't seem to be due to the contents of the pull request.
2018-11-29 17:07:29 +01:00
Inari Listenmaa
f7e26bb199 Merge pull request #90 from inariksit/arabic
Arabic
2018-11-29 16:09:10 +01:00
Inari Listenmaa
ccfa60cbba (Ara) Fixes in noun attributes 2018-11-29 15:52:17 +01:00
Inari Listenmaa
f71e504f9c (Ara) Fixes in prepositions binding to words 2018-11-29 15:51:57 +01:00
kitukb
93cf7c9c08 Merge branch 'master' into master 2018-11-29 16:47:13 +03:00
Inari Listenmaa
31e5411f20 Merge pull request #89 from inariksit/somali
(Som) Improvements in noun and verb paradigms
2018-11-29 13:34:07 +01:00
Inari Listenmaa
f52f7966ea (Som) Improvements in noun and verb paradigms 2018-11-29 13:19:19 +01:00
John J. Camilleri
dfee47ca81 Include FontAwesome icons in template 2018-11-29 13:06:02 +01:00
Thomas Hallgren
b240cc541f Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-11-28 23:48:14 +01:00
Thomas Hallgren
25ecbcb079 Fix make doc, again 2018-11-28 23:46:45 +01:00
John J. Camilleri
f44210bcb8 Make anchors in synopsis work again 2018-11-28 23:22:14 +01:00
John J. Camilleri
2ace715d09 Update footer in template 2018-11-28 23:04:28 +01:00
John J. Camilleri
294fe21d6c Merge branch 'master' into new-website
# Conflicts:
#	doc/Makefile
2018-11-28 22:44:08 +01:00
Aarne Ranta
0b9974e8f9 corrected LangEng.labels 2018-11-28 20:01:05 +01:00
benson kituku
342ddf6f4b new gender 2018-11-28 18:54:17 +03:00
John J. Camilleri
726d5972d6 Update LICENSE 2018-11-28 14:40:47 +01:00
Inari Listenmaa
f18f5e3c3f Merge pull request #87 from inariksit/arabic
(Ara) Fixes in negations
2018-11-28 14:07:35 +01:00
Krasimir Angelov
325ffb79a9 update the travis configuration as well 2018-11-28 14:03:15 +01:00
Krasimir Angelov
0d0462e5a7 remove the old WordNet experiment 2018-11-28 14:00:34 +01:00
Krasimir Angelov
a9c2872059 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-11-28 13:57:39 +01:00
Inari Listenmaa
a7c471214b (Ara) Fixes in negations 2018-11-28 13:55:34 +01:00
Krasimir Angelov
23f3fd244a rename Make.* to Setup.* to follow the Cabal convention 2018-11-28 13:54:56 +01:00
Krasimir Angelov
fc37e26bca remove the obsolete Parse grammar 2018-11-28 13:53:07 +01:00
Krasimir Angelov
fe483f3639 fix in the paradigm 2018-11-28 13:52:44 +01:00
Inari Listenmaa
01c83a8437 Merge pull request #86 from inariksit/arabic
Arabic
2018-11-27 18:44:25 +02:00
Inari Listenmaa
19129aa420 (Ara) misc. small fixes and additions 2018-11-27 17:36:23 +01:00
Inari Listenmaa
f2e9993425 (Ara) Fix bug in SlashV2VNP + refactor some related opers 2018-11-27 17:35:59 +01:00
Inari Listenmaa
29b5ac47fb (Ara) include N2's c2 in ComplN2 2018-11-27 17:34:16 +01:00
Inari Listenmaa
576e730897 Merge pull request #85 from inariksit/arabic
Arabic
2018-11-26 17:16:52 +01:00
Inari Listenmaa
cea3e2e4c8 Merge pull request #84 from odanoburu/construction
(Construction) add timeunitRange
2018-11-26 17:04:12 +01:00
Inari Listenmaa
a29a4132cf (Ara) misc. small fixes/additions 2018-11-26 17:03:31 +01:00
Inari Listenmaa
9da4ea3f5c (Ara) Add word order as a parameter to Subj 2018-11-26 17:03:09 +01:00
John J. Camilleri
92f7dbc80e Batch build script also looks in ../gf-core/DATA_DIR 2018-11-26 15:35:44 +01:00
John J. Camilleri
4a85289597 Batch build script handles multiple paths in GF_LIB_PATH (picks first) 2018-11-26 15:19:05 +01:00
odanoburu
b2a0f252b0 (Construction) add timeunitRange
- fix documentation comments
2018-11-26 11:14:48 -02:00
John J. Camilleri
28bc19f09c Haskell/Shell build scripts handle multiple paths in GF_LIB_PATH (pick first)
Not implemented for Batch
2018-11-26 11:02:40 +01:00
Inari Listenmaa
ea56a524a1 Merge pull request #83 from inariksit/arabic
(Ara) Add more VPS funs to Extend + refactor predVP to work with VPS
2018-11-23 14:56:29 +01:00
Inari Listenmaa
03380c79fb (Ara) Add more VPS funs to Extend + refactor predVP to work with VPS 2018-11-23 14:49:33 +01:00
Inari Listenmaa
c8e2201964 (Swe) Add ProDrop to ExtendSwe 2018-11-23 11:25:08 +01:00
Inari Listenmaa
44f10e9daa Merge pull request #82 from inariksit/arabic
(Ara) Various fixes with nouns, compounding, attributes etc.
2018-11-22 16:28:25 +01:00
Inari Listenmaa
570d347efe (Ara) Various fixes with nouns, compounding, attributes etc. 2018-11-22 16:09:11 +01:00
Inari Listenmaa
193e3af83b Merge pull request #81 from inariksit/arabic
Arabic
2018-11-21 16:35:32 +01:00
Inari Listenmaa
6b91d8409a (Ara) Force inherently dual nouns to dual only with a plural determiner 2018-11-21 16:31:36 +01:00
Inari Listenmaa
e911ad7cb3 (Ara) replace NP with just its string and isPron:Bool for ClSlash 2018-11-21 16:20:44 +01:00
Inari Listenmaa
473f6ae05b (Ara) Small fixes + comments 2018-11-21 16:04:55 +01:00
Inari Listenmaa
45df74b36b (Ara) Renaming and consistency with prepositions 2018-11-21 16:02:10 +01:00
Inari Listenmaa
6b84b55db0 Merge pull request #80 from inariksit/arabic
Arabic
2018-11-20 16:04:32 +01:00
Inari Listenmaa
d6310e2a8b (Ara) Add AdjOrd + AdvS 2018-11-20 15:47:47 +01:00
Inari Listenmaa
b63da6573e (Ara) Formatting + small typofixes 2018-11-20 14:11:15 +01:00
Inari Listenmaa
b174bba3a9 (Ara) V2V and related functions 2018-11-20 14:10:49 +01:00
Inari Listenmaa
47bcbe73f6 (Ara) Add two new verb paradigms 2018-11-20 14:09:15 +01:00
Inari Listenmaa
00f9a1be49 (Ara) Fix formatting in documentation 2018-11-20 09:34:30 +01:00
John J. Camilleri
c3775fa360 Merge pull request #79 from odanoburu/travis-fix
(Travis) let build fail
2018-11-19 19:25:40 +01:00
odanoburu
c12afea3d4 Merge remote-tracking branch 'upstream/master' 2018-11-19 14:59:56 -02:00
odanoburu
97c9152acb (travis) fix build script so that it can actually fail 2018-11-19 14:32:47 -02:00
Inari Listenmaa
a4c1389966 Merge pull request #78 from inariksit/arabic
Arabic
2018-11-19 17:22:39 +01:00
Inari Listenmaa
9e5cbb35fd (Ara) Add AdVVPSlash 2018-11-19 17:00:06 +01:00
Inari Listenmaa
f1a88574b8 (Ara) Fix orthographical rules for indefinite accusative 2018-11-19 15:41:11 +01:00
Inari Listenmaa
7b520280d7 (Ara) adverbs 2018-11-19 15:23:54 +01:00
Inari Listenmaa
fe4bec4e58 (Ara) Improve documentation for verb constructors + add reflV 2018-11-19 15:23:37 +01:00
Inari Listenmaa
0514fc1e18 Merge pull request #72 from odanoburu/porextend
(Por) add lins to Extend + mkV2A paradigm change
2018-11-19 13:14:33 +01:00
Inari Listenmaa
3f2b5ac034 Merge pull request #77 from inariksit/arabic
Arabic
2018-11-19 13:08:23 +01:00
Inari Listenmaa
7b51bb6638 (Ara) Added support for preposition contraction: added a "Dat" case 2018-11-19 12:07:29 +01:00
Inari Listenmaa
7a4f43aea2 (Ara) Add want_VV 2018-11-19 12:06:13 +01:00
Inari Listenmaa
efebc082fa (Ara) Add SubjS 2018-11-19 12:05:50 +01:00
Inari Listenmaa
75ab225161 Merge pull request #76 from inariksit/arabic
Arabic
2018-11-16 17:35:17 +01:00
Inari Listenmaa
5a6fe1e336 (Ara) Add subordinate clauses 2018-11-16 17:21:29 +01:00
Inari Listenmaa
c4f207a541 (Ara) Fix existential constructions 2018-11-16 16:05:55 +01:00
Inari Listenmaa
a2907a91a5 (Ara) Add a paradigm for relative adjectives 2018-11-16 15:03:19 +01:00
Inari Listenmaa
9d59e59387 (Ara) Add inherent state field in IDet 2018-11-16 15:02:59 +01:00
Inari Listenmaa
9171a1b612 (Ara) Add DetNP + fix state of num in DetQuantOrd 2018-11-16 15:02:18 +01:00
Inari Listenmaa
046735c02a Merge pull request #75 from inariksit/arabic
Arabic
2018-11-15 16:57:13 +01:00
Inari Listenmaa
b69608bd21 (Ara) New verb paradigm (geminate 7) + clean up CN 2018-11-15 16:46:35 +01:00
Inari Listenmaa
be42e20158 (Ara) Add subject case field to VP 2018-11-15 16:45:51 +01:00
Inari Listenmaa
bb0c93968b Merge pull request #74 from inariksit/arabic
Arabic
2018-11-14 20:53:18 +01:00
Inari Listenmaa
51e1c771c1 (Ara) small bugfixes 2018-11-14 18:11:26 +01:00
Inari Listenmaa
06efa09f93 (Ara) Add UttInterj and an API command mkInterj 2018-11-14 18:11:10 +01:00
Inari Listenmaa
2b16118063 (Ara) Add new verb paradigm for hollow 8 2018-11-14 18:10:28 +01:00
Thomas Hallgren
6c71da78f7 arabic: add api to -path flags in AllAra.gf and LangAra.gf
This fixes a build problem (either a type error, if doing an incremental
rebuild, or a failure to find SyntaxAra.gf if building from scratch.)
I wonder why the Travis build didn't catch this?
2018-11-14 17:55:47 +01:00
Inari Listenmaa
ba3a8355aa Merge pull request #73 from inariksit/arabic
(Ara) Conjunctions, ComplV*, additions in Idiom&Construction, etc.
2018-11-14 15:52:32 +01:00
Inari Listenmaa
b89aa34bfd (Ara) Conjunctions, ComplV*, additions in Idiom&Construction, etc. 2018-11-14 15:48:20 +01:00
John J. Camilleri
942dd3ace8 Add column numbers in README 2018-11-14 10:04:54 +01:00
Thomas Hallgren
f665c697bd doc/Makefile: use the correct column from languages.csv
The synopsis flag is now in column 11
2018-11-13 23:28:48 +01:00
John J. Camilleri
eae5f7b723 Language list in synopsis is dynamically generated from languages.csv 2018-11-13 23:00:43 +01:00
John J. Camilleri
7abc12bbd5 Merge branch 'master' into new-website 2018-11-13 22:44:30 +01:00
John J. Camilleri
f0065986a6 Add column for language name in languages.csv
This will be used for listing languages in Synopsis
2018-11-13 22:44:13 +01:00
John J. Camilleri
cd4b482f0f Tweaks to synopsis 2018-11-13 22:30:29 +01:00
John J. Camilleri
67cb6bae12 Add some type signatures 2018-11-13 22:29:56 +01:00
John J. Camilleri
c10de77e9b Remove extra duplicate LParadigms anchors 2018-11-13 22:10:38 +01:00
John J. Camilleri
6e52b85b92 Remove refs to synopsis-3.9 2018-11-13 21:49:56 +01:00
John J. Camilleri
7acbd54f2d Make HTML template a bit more generic 2018-11-13 21:46:28 +01:00
odanoburu
08c5914466 (Por)
- add AdjAsCN AdjAsNP
- copied VPS functions from ExtraRomance
- fixes to Lexicon
2018-11-13 15:46:50 -02:00
Inari Listenmaa
0373d2cd18 Merge pull request #71 from inariksit/arabic
Arabic
2018-11-13 17:18:19 +01:00
Inari Listenmaa
c14e879224 (Ara) Misc fixes to tenses, NPs, VPs 2018-11-13 17:03:32 +01:00
Inari Listenmaa
eb43758d37 (Ara) Add variable gender to IP 2018-11-13 17:02:57 +01:00
Inari Listenmaa
c19c727f40 (Ara) yet another hamza fix 2018-11-13 17:01:35 +01:00
Inari Listenmaa
faf6c83b74 (Ara) Add stuff to ExtendAra and ConstructionAra 2018-11-13 17:01:19 +01:00
Inari Listenmaa
fdeaa9ea70 (Ara) Changes to nouns and NPs 2018-11-13 17:01:02 +01:00
odanoburu
50188b6827 Merge remote-tracking branch 'origin/mk2A' 2018-11-13 11:23:51 -02:00
John J. Camilleri
20efc48e21 Fix making of "sources.html"
Uses same template as synopsis, maybe this shoudl be generalised a bit
2018-11-13 09:50:10 +01:00
John J. Camilleri
b2545333ba Fix category imagemap in synopsis by splicing in final html 2018-11-13 09:38:39 +01:00
Inari Listenmaa
3508f42520 Merge pull request #70 from inariksit/arabic
Arabic
2018-11-12 17:11:05 +01:00
Inari Listenmaa
de33c46b45 (Ara) AdjCN retains old adjective 2018-11-12 16:58:21 +01:00
Inari Listenmaa
4d35a0206c (Ara) Add paradigm for doubly weak v1 2018-11-12 16:31:09 +01:00
John J. Camilleri
2875730224 Fix tables, clean popups.
Imagemap on categories is now broken, need to see how to fix
2018-11-12 15:07:00 +01:00
Inari Listenmaa
87613d464c (Ara) New category for ClSlash; update related functions 2018-11-12 14:30:44 +01:00
Inari Listenmaa
2159d4b0be (Ara) Add proDrop function to the API 2018-11-12 14:25:16 +01:00
John J. Camilleri
74384044c9 Move everything related to synopsis into subfolder
Clean up some unused and generated files
2018-11-12 10:05:42 +01:00
John J. Camilleri
3ac2bcc8af Quicklinks in synopsis as fixed side menu 2018-11-10 20:14:25 +01:00
Inari Listenmaa
64b07cd352 Merge pull request #69 from inariksit/arabic
(Ara) Passive constructions
2018-11-09 16:56:21 +01:00
Inari Listenmaa
df65c52cde (Ara) Passive constructions 2018-11-09 16:38:51 +01:00
John J. Camilleri
ec9753e7b5 Use Pandoc and introduce HTML template for synopsis
- Remove isLatex flag
- Plan to convert to Markdown and simply format
2018-11-09 09:08:30 +01:00
Inari Listenmaa
f70234b1da Merge pull request #68 from inariksit/arabic
Arabic
2018-11-08 15:57:24 +01:00
Inari Listenmaa
7713518ad5 (Ara) More relative clauses + fix questions + update MissingAra 2018-11-08 15:52:06 +01:00
Inari Listenmaa
e6d57f3b03 (Ara) More fixes to hamza rules 2018-11-08 15:17:09 +01:00
Inari Listenmaa
ec0d36bd1d Merge pull request #67 from inariksit/somali
(Som) Add strings from Temp and Pol to linearisations of Use*Cl
2018-11-07 17:48:25 +01:00
Inari Listenmaa
520d1a44a2 (Som) Add strings from Temp and Pol to linearisations of Use*Cl 2018-11-07 17:47:26 +01:00
Inari Listenmaa
5118b8d4eb Merge pull request #66 from inariksit/arabic
Arabic
2018-11-07 16:39:03 +01:00
Inari Listenmaa
38982d73fe (Ara) Remove parameters that are already in CommonX 2018-11-07 16:27:42 +01:00
Inari Listenmaa
f4cec11f72 (Ara) Add relative clauses 2018-11-07 16:26:52 +01:00
Inari Listenmaa
bf28bf1e56 (Ara) Prepositions + improve Paradigms API functions 2018-11-07 14:30:38 +01:00
John J. Camilleri
36b827bcc2 Clarify default values of columns in languages.csv 2018-11-07 13:19:54 +01:00
Inari Listenmaa
5c5cd125c9 (Ara) Add paradigm for doubly weak FormIV + remove hamza from imperative prefix 2018-11-07 11:31:07 +01:00
Inari Listenmaa
2888073c44 (Ara) Minor fixes 2018-11-07 11:30:00 +01:00
John J. Camilleri
5214543d3f Merge pull request #65 from odanoburu/travis-new
(travis) refactor travis CI
2018-11-07 10:11:20 +01:00
odanoburu
41ec90c3fe (travis) refactor travis CI
- add ubuntu, mac, and windows builds

add travis build with mac and ubuntu
- fix signature in Make.hs for compatibility with ghc<8

add windows build to travis

using haskell and bash scripts

(travis) use  env variable

Make.bat works

(Make.bar) [temporary] comment some Langs

merge upstream and uncomment langs
2018-11-06 20:41:04 -02:00
John J. Camilleri
6e8f92a9c5 Remove generated categories-imagemap.html from version control
There are many other things which should not be under version control...
2018-11-06 10:37:54 +01:00
John J. Camilleri
ec9f74d56e Add "Synopsis" column to languages.csv; use config everywhere
I tried to remove all language lists from Haskell and Makefiles
2018-11-06 10:32:25 +01:00
Inari Listenmaa
ff9a164884 Merge pull request #62 from odanoburu/besch
(BeschPor) correct paradigms começar and peneirar
2018-11-06 08:57:00 +01:00
John J. Camilleri
ef2c348d3a Make.bat: Collect modules in two stages
For some reason second inner loop was never reached,
this is a simple solution.

Also remove stderr redirection as it didn't seem to work.

--verbose now names each module individually
2018-11-05 21:09:07 +01:00
John J. Camilleri
17bc505382 Make.bat: fix copy command, create dest folders if not present 2018-11-05 19:29:35 +01:00
Inari Listenmaa
6cf7059ddb Merge pull request #64 from inariksit/arabic
(Ara) Question words and structures
2018-11-05 17:18:08 +01:00
Inari Listenmaa
68c5cd74dd (Ara) Question words and structures 2018-11-05 17:13:06 +01:00
Inari Listenmaa
916548a361 Merge pull request #63 from inariksit/arabic
Arabic
2018-11-02 18:03:08 +01:00
Inari Listenmaa
e3f2469abe (Ara) Add gender, species etc. into the API 2018-11-02 18:01:33 +01:00
Inari Listenmaa
2d112e3a55 (Ara) diacritics 2018-11-02 18:01:14 +01:00
John J. Camilleri
a170539991 More improvements to Make.bat
- Fix syntax error in args loop
- Building of modules list

Maybe it actually works now? 😱
2018-11-02 08:50:31 +01:00
John J. Camilleri
4b4a7ba9a4 Improvements to Make.bat
- Parsing of command line args
- Redirecting output
- mkdir only if not exists
- revert back to copy
2018-11-01 22:51:55 +01:00
odanoburu
a74460a0e1 (BeschPor) correct começar and peneirar
also add documentation on verb paradigms
2018-11-01 20:58:12 +00:00
Inari Listenmaa
04a07177da Merge pull request #61 from odanoburu/patch-3
(Common) not all cats are linearized to SS
2018-11-01 15:47:55 +01:00
bruno cuconato
da129e40ef (Common) not all cats are linearized to SS
see `CAdv`, for instance.
2018-11-01 14:24:20 +00:00
odanoburu
13fa01dd06 Merge remote-tracking branch 'upstream/master' 2018-11-01 13:22:45 +00:00
Inari Listenmaa
204d26a919 Merge pull request #56 from odanoburu/time
(Construction{Eng,Por}) add timeHour and timeHourMinute
2018-11-01 11:44:52 +01:00
Inari Listenmaa
6e6d783bd5 Merge pull request #58 from odanoburu/extendlins
(Por) add lins
2018-11-01 11:44:41 +01:00
Inari Listenmaa
b717c1e91d Merge pull request #60 from inariksit/somali
First sketch for Somali RG
2018-11-01 11:43:25 +01:00
Inari Listenmaa
8ce728f393 (Som) Add UseCl, UseComp, CompAP, UttS 2018-11-01 11:35:03 +01:00
Inari Listenmaa
592a93005a (Som) Add the structure and placeholders for Somali RG 2018-11-01 10:00:05 +01:00
odanoburu
4e8b5d6c6f Merge remote-tracking branch 'upstream/master' 2018-10-31 13:50:23 +00:00
John J. Camilleri
5172586aa8 Check GHC version instead of directory version
Explanation by Thomas Hallgren:

These MIN_VERSION macros are traditionally provided by Cabal, in dist/build/autogen/cabal_macros.h. It is only with ghc>=8.0 that ghc itself provides them, so with ghc<8, runghc Make.hs fails, as can be seen in the included message.

Incidentally, ghc-8.0.1 also comes with directory-1.3, so I suggest using

    #if __GLASGOW_HASKELL__>=800

instead. Then Make.hs will work with older versions of ghc, and set the modification times if you are using ghc>=8.0.
2018-10-31 11:10:05 +01:00
John J. Camilleri
62ea7c82a9 If directory < 1.2.3.0 then don't set modification times on copy 2018-10-31 09:13:52 +01:00
John J. Camilleri
e30fa8933f Own definition of die for base < 4.8.0.0 2018-10-31 08:43:48 +01:00
odanoburu
1427b1bbb8 (Por) change mk2A paradigm
(such that the second argument is the adverb string, not the feminine
form, which is easier to predict)
- fix bug in adjVo paradigm
- add two cases to mkAdjReg smart paradigm
- update lexicon

tbh, it is much more common to need to correct the adverbial form
because it doesn't have the accents that the adjectival forms may
have, so if there's a way of removing accents easily, that might be
better.
2018-10-30 13:48:26 +00:00
odanoburu
3581176f6c Merge remote-tracking branch 'upstream/master' into extendlins 2018-10-29 17:47:18 +00:00
odanoburu
ebe411c654 (Por) add lins
- UttAdV, UttVPShort, PositAdVAdj, AdAdV, ComplSlashPartLast, CompVP
  to Extend
- small fixes to Lexicon
2018-10-29 17:47:13 +00:00
odanoburu
7aa2837dd7 (Por) add lins
- UttAdV, UttVPShort, PositAdVAdj, AdAdV, ComplSlashPartLast, CompVP
  to Extend
- small fixes to Lexicon
2018-10-29 17:45:15 +00:00
odanoburu
fa34877ea3 (Por) fix Portuguese time 2018-10-26 18:28:22 +00:00
John J. Camilleri
999cdb8e36 Copy files with only modification time rather than all metadata 2018-10-26 09:10:32 +02:00
John J. Camilleri
4ee5914c1c Merge branch 'patch-2' of https://github.com/odanoburu/gf-rgl into odanoburu-patch-2 2018-10-26 09:02:42 +02:00
odanoburu
7e60a931c8 WIP: incorporate @aarneranta's comments 2018-10-25 18:59:01 +00:00
Thomas Hallgren
75e1c10250 synopis: add header styles that match the GF home page 2018-10-25 17:04:36 +02:00
Thomas Hallgren
8b64ad4a9e doc/synopsis-intro.txt: fix language list and broken links 2018-10-25 16:49:38 +02:00
Thomas Hallgren
d446af8479 doc/Makefile: add a missing dependency 2018-10-25 16:34:44 +02:00
John J. Camilleri
894c09d1b9 Only copy newer files (Make.bat)
Addresses #43 but not tested.
Reference: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb491035(v%3dtechnet.10)
2018-10-25 08:34:33 +02:00
John J. Camilleri
1862cb0559 Preserve metadata in copy (Make.sh)
Addresses #43 but I'm not 100% convinced it makes any difference.
2018-10-25 08:28:29 +02:00
odanoburu
425f3c71e9 (Construction{Eng,Por}) add timeHour and timeHourMinute 2018-10-24 21:57:11 -03:00
Thomas H
55528604b7 Merge pull request #54 from odanoburu/synopsis-langs
add Por and Ara to synopsis
2018-10-24 19:19:34 +02:00
Thomas H
2fb4e8b8d5 Merge pull request #53 from odanoburu/nightly-synopsis
mv synopsis.html to synopsis-v3.9.html
2018-10-24 19:18:03 +02:00
bruno cuconato
77a7b7e51c use copyFileWithMetadata instead of copyFile
to preserve timestamps #43 ([but also preserves other stuff](http://hackage.haskell.org/package/directory-1.3.3.1/docs/System-Directory.html#v:copyFileWithMetadata))
2018-10-24 14:06:45 +00:00
odanoburu
f55cc00457 add Por and Ara to synopsis 2018-10-23 22:32:03 -03:00
odanoburu
95bc1637af - mv GF 3.9 synopsis
- add link to GF 3.9 synopsis in nightly version
2018-10-23 21:27:03 -03:00
Thomas Hallgren
4e646d5c7b Add verbosity option in doc/MkExxTable.hs
Don't need a lot of output on stdout when it is used from MkSynposis.hs
2018-10-23 16:22:04 +02:00
Thomas Hallgren
369d457096 doc/Makefile: add missing dependencies
Dependencies on txt2tags includes and Haskell source files were missing.
2018-10-23 16:20:00 +02:00
Inari Listenmaa
702b513453 Merge pull request #52 from odanoburu/extendlins
(ExtendPor) add lins
2018-10-23 14:07:09 +02:00
Inari Listenmaa
c28539e201 Merge pull request #51 from odanoburu/v2a
(Eng) change lincat of V2A
2018-10-23 14:06:50 +02:00
Thomas Hallgren
881753ce3e doc/Makefile: incremental and parallel rebuild of the synopsis
Enough dependencies have been added so that

* If nothing has changed, MkSynopsis.hs will not be run, so synopisis.html
  will not be needlessly regenerated.
* You can use 'make -j' to build examples for different languages in parallel.

Hopefully 'make synopsis' produces the exact same result as before, but if
it turns out that some dependencies are missing and something is not
rebuilt despite of changes, 'make clean' can be used to force a full rebuild.
2018-10-22 23:38:56 +02:00
odanoburu
05cd9c53ce (ExtendPor) add lins
- add ApposNP, ByVP, CompBareCN, ComplBareVS, GerundAdv, GerundNP, InOrderTo, PresPartAP, PurposeVP, WithoutVP
- added EmptyRelSlash but fails linking phase, so not exported
2018-10-22 20:59:26 +00:00
Thomas Hallgren
d951fec14d Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-10-22 21:49:14 +02:00
Thomas Hallgren
aa4257efef Add a 'make doc' target in the main Makefile
It first build the RGL, then calls doc/Makefile,
with the corrent GF_LIB_PATH, to build the documentation.
2018-10-22 21:43:41 +02:00
odanoburu
e4d34bff32 (Eng) update SlashV2A with new V2A lincat 2018-10-22 18:27:20 +00:00
Inari Listenmaa
f5304afa56 Merge pull request #50 from inariksit/arabic
Arabic
2018-10-22 17:15:10 +02:00
Inari Listenmaa
6b0094b22a (Ara) Fixing possessive suffixes 2018-10-22 17:09:51 +02:00
Inari Listenmaa
eb074e6bcd (Ara) Small cleanup and adding comments 2018-10-22 17:09:33 +02:00
odanoburu
8990ee80a8 (Eng) change lincat of V2A
- update V2A linref
- add overloaded mkV2A with backwards-compatible signature
- update lexicon V2A example
- remove old comment with Verb lincat
thanks to @inariksit for guidance!
2018-10-22 14:18:53 +00:00
odanoburu
52b9a98db6 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2018-10-22 13:33:00 +00:00
bruno cuconato
2d5655aa50 (Por) Extend: add lins (#49)
- add PastPartAP, PastPartAgentAP
- add PassVPSlash, PassAgentVPSlash lins from ExtraRomance
- correct CompoundN
2018-10-21 19:42:05 +02:00
odanoburu
83a22ab31b (Por) Extend: add lins
- add PastPartAP, PastPartAgentAP
- add PassVPSlash, PassAgentVPSlash lins from ExtraRomance
- correct CompoundN
2018-10-19 22:23:21 +00:00
Inari Listenmaa
0315a3e52e Merge pull request #47 from inariksit/arabic
(Ara) Add linref for CN + choose bare form for UttCN, no case
2018-10-19 17:25:50 +02:00
Inari Listenmaa
4b2c706bcd (Ara) Add linref for CN + choose bare form for UttCN, no case 2018-10-19 17:25:25 +02:00
Inari Listenmaa
85e4a8061f (Ara) Fix agreement in imperatives 2018-10-18 15:08:54 +02:00
Inari Listenmaa
a48227b8c5 Merge pull request #46 from inariksit/arabic
Arabic
2018-10-18 14:49:49 +02:00
Inari Listenmaa
08ff8ee3e5 (Ara) Small orthography fixes 2018-10-18 14:45:50 +02:00
Inari Listenmaa
2142146577 (Ara) Add CN's new np field in more functions 2018-10-18 14:45:27 +02:00
Inari Listenmaa
98a29421a8 Merge pull request #45 from inariksit/arabic
Arabic
2018-10-17 17:23:36 +02:00
Inari Listenmaa
6cd6ddd020 (Ara) Fixes in pattern matching root and pattern 2018-10-17 17:18:26 +02:00
Inari Listenmaa
e051829637 (Ara) Add paradigm for broken plural adjectives 2018-10-17 17:17:52 +02:00
Inari Listenmaa
069a02c441 (Ara) WIP: noun compounds 2018-10-17 17:17:24 +02:00
Inari Listenmaa
5489e1cd51 (Ara) Small fixes: hamza, order of diacritics and remove ّ from root 2018-10-17 17:17:09 +02:00
Inari Listenmaa
096beae214 (Ara) More cases in normalisation functions for diacritics 2018-10-17 17:15:39 +02:00
Inari Listenmaa
0b901669fd (Ara) change someSg_Det into singular 2018-10-17 17:15:00 +02:00
Inari Listenmaa
c8b4270983 Merge pull request #44 from inariksit/arabic
Arabic: nouns and stuff
2018-10-16 17:52:03 +02:00
Inari Listenmaa
f5525dfbf0 (Ara) Supporting possessive suffixes, WIP 2018-10-16 17:47:35 +02:00
Inari Listenmaa
5f39c41988 (Ara) Fixes to a few fords 2018-10-16 17:47:14 +02:00
Inari Listenmaa
b33d260377 (Ara) Add NP field to CN for apposition, to attach poss.suff. correctly 2018-10-16 17:46:28 +02:00
Inari Listenmaa
3acaaed474 Merge pull request #42 from inariksit/arabic
Arabic
2018-10-15 16:51:53 +02:00
Inari Listenmaa
82aa6549cc (Ara) Fix MassNP: now with adjective included 2018-10-15 16:47:26 +02:00
Inari Listenmaa
7b13eb0ade (Ara) Better checks if a Num or Ord is a numeral 2018-10-15 16:08:11 +02:00
Inari Listenmaa
8db210fd97 (Ara) fix bad_A 2018-10-15 16:07:29 +02:00
Inari Listenmaa
eadaa3335f Merge pull request #41 from inariksit/master
Arabic orthography
2018-10-12 16:33:43 +02:00
Inari Listenmaa
145fc773cb (Ara) Normalise the order of combining characters ّ + vowel 2018-10-12 15:42:33 +02:00
Inari Listenmaa
0bce38800c (Ara) Remove some LTR (U+200E) chars that had been copypasted in error 2018-10-12 15:40:48 +02:00
Inari Listenmaa
8d9a0fe998 Merge pull request #40 from inariksit/master
Arabic
2018-10-11 17:08:38 +02:00
Inari Listenmaa
a36c3278a5 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-10-11 17:02:07 +02:00
Inari Listenmaa
43227578c5 (Ara) fix eat_V2 2018-10-11 17:00:04 +02:00
Inari Listenmaa
664d2e0b70 (Ara) Fix some orthography issues related to ء‎ 2018-10-11 16:54:18 +02:00
Aarne Ranta
56fd159e34 fixed three paradigms in Finnish Kotus: lapsi, veitsi, harkita 2018-10-11 06:58:57 +02:00
Aarne Ranta
05ed75c131 using the ext field more properly in Scand VP 2018-10-09 19:27:21 +02:00
Inari Listenmaa
0fa4dd7ab0 Merge pull request #39 from inariksit/master
Finnish
2018-10-09 14:17:38 +02:00
Inari Listenmaa
0cf74c04df (Fin) Add more infinite forms to VVType 2018-10-09 14:12:28 +02:00
Inari Listenmaa
ab88fd8018 (Fin) More patterns for consonant gradation ("pyyhkiä", "aueta") 2018-10-09 13:42:25 +02:00
Aarne Ranta
8334a3fab3 fixed the place of AP in Scand.CompAP so that it is before the particle but after negation: 'det ser inte bra ut' 2018-10-09 10:44:46 +02:00
Inari Listenmaa
1b0359f217 Merge pull request #38 from inariksit/master
Various improvements to Finnish
2018-10-08 17:59:36 +02:00
Inari Listenmaa
5223a3d9c9 (Fin) Add some cases for weakGrade + add exceptions to Kotus.gf 2018-10-08 17:55:58 +02:00
Inari Listenmaa
583f77e450 (Fin) Remove redundant sense distinctions 2018-10-08 17:55:18 +02:00
Inari Listenmaa
bd6d88c784 (Fin) Add some more N and A paradigms 2018-10-08 16:12:50 +02:00
Inari Listenmaa
0441cf1586 (Fin) Add infAdess ("tekemällä") to the API 2018-10-08 16:12:33 +02:00
Inari Listenmaa
5a18c857b8 (Fin) Fix inflection of some adjectives in NewDictFin 2018-10-08 16:12:03 +02:00
Inari Listenmaa
b7d2ff99c0 (Fin) Remove redundant distinctions from NewDictFin 2018-10-08 16:11:44 +02:00
Inari Listenmaa
9aa31fdcdd (Fin) Add prefix field to A 2018-10-08 16:10:41 +02:00
bruno cuconato
d4f2df8aa4 (Por) add lins (#35)
* (Por) correct paradigm and use overloaded paradigms in Lexicon

* (Por) add Str -> V3 paradigm

* (Por) small fixes

* adjust import list and add Mood to VPS

* (Por) add compoundN to ExtendPor

* (Por) add CompoundAP GerundCN ICompAP IAdvAdv CompIQuant PrepCN
2018-10-06 06:14:24 +02:00
bruno cuconato
63587ac745 (Romance) add subjVS oper to Cat,Ita,Por,Spa (#37)
* (Por) correct paradigm and use overloaded paradigms in Lexicon

* (Romance) add subjVS oper to Cat,Ita,Por,Spa

already present in French
2018-10-06 06:12:54 +02:00
Inari Listenmaa
dbf232b73e Merge pull request #36 from inariksit/master
Finnish
2018-10-05 16:20:44 +02:00
Inari Listenmaa
d13c34e641 (Fin) Add new constructor for V -> A: present participle into adjective. 2018-10-05 15:50:24 +02:00
Inari Listenmaa
84f53ba086 (Fin) Fix vowel harmony bug in a verb constructor 2018-10-05 15:47:30 +02:00
Inari Listenmaa
c52f16e534 (Fin) Add CompoundN 2018-10-05 10:48:48 +02:00
Inari Listenmaa
c0ce537104 (Fin) Add CompoundN 2018-10-05 10:39:06 +02:00
Aarne Ranta
479a44b6a0 added ParadigmsSwe.auxV2V 2018-10-03 12:54:00 +02:00
kitukb
bd556c7789 Adding a bantu Functor (#32)
* added Bantu functor

*  added egekusii language based on Bantu functor

*  added kikamba language based on Bantu functor

*  added kiswahili language based on Bantu functor
2018-10-03 12:52:48 +02:00
bruno cuconato
c410abfa6b (ExtendPor) add CompoundN (#31)
* (Por) add Str -> V3 paradigm

* (Por) small fixes

* adjust import list and add Mood to VPS

* (Por) add compoundN to ExtendPor
2018-10-03 12:51:16 +02:00
benson kituku
4859ff2be8 added kiswahili language based on Bantu functor 2018-10-03 11:42:40 +03:00
benson kituku
3c76051d8b added kikamba language based on Bantu functor 2018-10-03 11:40:26 +03:00
benson kituku
b1b8f90f4e added egekusii language based on Bantu functor 2018-10-03 11:37:52 +03:00
benson kituku
c82b09df1a added Bantu functor 2018-10-03 11:17:11 +03:00
Inari Listenmaa
e2365f60d7 Merge pull request #30 from inariksit/arabic
Arabic
2018-10-02 15:35:16 +02:00
Inari Listenmaa
ecda59d188 (Ara) Irregular plural for year_N 2018-10-02 15:31:12 +02:00
Inari Listenmaa
0e6f0d8520 (Ara) Bugfix in the dual feminine suffix. 2018-10-02 15:25:36 +02:00
Inari Listenmaa
9624952703 (Ara) Fix dual for nouns ending in ة 2018-10-02 14:59:49 +02:00
Inari Listenmaa
a324377661 (Ara) Update documentation for new verb paradigms 2018-10-02 10:57:43 +02:00
Inari Listenmaa
fb9ebf782f (Ara) ComplSlash: retain old object. Slash3V3: insert c3 into new c2. 2018-10-01 12:06:14 +02:00
Inari Listenmaa
fcf13dc89f (Ara) Fix ComplVV: now uses subjunctive and agrees with subject. 2018-10-01 12:04:17 +02:00
Inari Listenmaa
3edc34ed56 (Ara) Add can_VV; make أَنْ a default c2 for VVs 2018-10-01 11:52:46 +02:00
Aarne Ranta
cf93875bfa added MakeStructuralSwe.mkIDet 2018-09-29 10:30:07 +02:00
Inari Listenmaa
de279ac576 Merge pull request #29 from inariksit/arabic
Arabic: verb paradigms + article assimilation
2018-09-28 18:47:59 +02:00
Inari Listenmaa
a2431ccfbd (Ara) Add two new paradigms: v10sound and v10hollow 2018-09-28 18:43:13 +02:00
Inari Listenmaa
9c1102adcb (Ara) variable names + whitespace 2018-09-28 18:42:28 +02:00
Inari Listenmaa
78ea838725 (Ara) Fix a verb pattern for assimilated VIII 2018-09-28 15:57:39 +02:00
bruno cuconato
3a429730bc (Por) small fixes and add missing paradigm (#28)
* (Por) add Str -> V3 paradigm

* (Por) small fixes
2018-09-28 07:11:01 +02:00
Inari Listenmaa
9831512d34 (Ara) Assimilate definite article with alveolar consonants 2018-09-27 14:55:01 +02:00
Inari Listenmaa
1889f4ce0f Merge pull request #27 from inariksit/arabic
Arabic: VV, N2/3, update MissingAra
2018-09-26 15:06:06 +02:00
Inari Listenmaa
f486149267 (Ara) N2 and N3 2018-09-26 15:01:14 +02:00
Inari Listenmaa
942ef0b0ff (Ara) Remove completed functions from MissingAra 2018-09-26 15:00:24 +02:00
Inari Listenmaa
6e433fdb48 (Ara) Remove unnecessary field from VV 2018-09-26 14:59:47 +02:00
Inari Listenmaa
8174fd55a8 (Ara) tabs to spaces 2018-09-26 14:58:59 +02:00
Inari Listenmaa
dc9b27e74c Merge pull request #26 from inariksit/arabic
Arabic: compound nouns, verb paradigms, assimilations, whitespace
2018-09-26 11:50:04 +02:00
Inari Listenmaa
b945128a5b (Ara) remove extra whitespace 2018-09-26 11:27:05 +02:00
Inari Listenmaa
83793edc30 (Ara) WIP assimilate def. article 2018-09-26 11:12:45 +02:00
Inari Listenmaa
31b8ef9c3f (Ara) Add all tenses to UseCl and UseQCl 2018-09-25 14:58:54 +02:00
Inari Listenmaa
431b53048f (Ara) Add paradigm for assimilated measure 8 verbs 2018-09-25 14:09:14 +02:00
Inari Listenmaa
53fde8d963 (Ara) Add verb paradigm for defective v1 with perf. vowel i 2018-09-24 16:42:16 +02:00
Inari Listenmaa
a2551f783b (Ara) Add constructor for compound nouns 2018-09-24 16:37:21 +02:00
Inari Listenmaa
3fa7509412 Merge pull request #25 from inariksit/arabic
Arabic: PredVP, ComplVV, ...
2018-09-21 15:53:55 +02:00
Inari Listenmaa
1d159f155c (Ara) VV and related functions 2018-09-21 15:46:39 +02:00
Inari Listenmaa
e6107dcbfb (Ara) Remove prodrop from PredVP; better to have it optional 2018-09-21 15:44:31 +02:00
Inari Listenmaa
fbf8ff0044 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-21 15:29:58 +02:00
bruno cuconato
0fa80d0f85 (Por) correct paradigm and use overloaded paradigms in Lexicon (#24) 2018-09-21 14:28:18 +02:00
Inari Listenmaa
381cf35cde Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-21 09:47:35 +02:00
Inari Listenmaa
a895f63644 Merge pull request #23 from inariksit/arabic
Arabic: bugfixes + GenNP
2018-09-21 09:47:08 +02:00
Inari Listenmaa
e281cb6f5c (Ara) Bugfix in DetCN: retain adjective every time 2018-09-21 09:35:44 +02:00
Inari Listenmaa
c837f1cdf7 (Ara) keep the old s2 field in insertStr 2018-09-21 09:12:10 +02:00
Inari Listenmaa
eb7e4335b5 (Ara) Add GenNP 2018-09-21 09:12:10 +02:00
Inari Listenmaa
341b96da9c (Ara) Add هَل in QuestCl, not in UseQCl 2018-09-21 09:12:10 +02:00
Inari Listenmaa
d53a8720fe Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-20 10:11:32 +02:00
Inari Listenmaa
9f0858fccf Merge branch 'master' of https://github.com/inariksit/gf-rgl 2018-09-20 10:11:21 +02:00
Inari Listenmaa
13ccd9d621 Merge pull request #22 from inariksit/arabic
Arabic: questions, passive, ComplA2
2018-09-20 10:11:02 +02:00
Inari Listenmaa
f5f3587697 (Ara) remove new constructs from MissingAra 2018-09-20 09:58:34 +02:00
Inari Listenmaa
18f66b3e23 (Ara) add which_IQuant 2018-09-20 09:58:17 +02:00
Inari Listenmaa
6502f0df4f (Ara) Update some categories, add questions 2018-09-20 09:58:05 +02:00
Inari Listenmaa
d4deb3561e (Ara) guess PassV2 2018-09-20 09:55:05 +02:00
Inari Listenmaa
77bda93032 add ComplA2 2018-09-20 09:39:37 +02:00
Inari Listenmaa
283620f15b Arabic has Symbolic now, updated languages.csv 2018-09-19 14:27:11 +02:00
Inari Listenmaa
933174e911 Arabic has Symbolic now, updated languages.csv. 2018-09-19 14:20:34 +02:00
Inari Listenmaa
47081bb637 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl into arabic 2018-09-19 10:02:08 +02:00
Inari Listenmaa
7159daf38f Merge pull request #20 from inariksit/master
(Ara) overload mkV2 + some Utt*, CompCN, question_N
2018-09-18 18:21:15 +02:00
Inari Listenmaa
0ca66a2e4d (Ara) some Utt*, CompCN, question_N 2018-09-18 17:54:58 +02:00
Inari Listenmaa
8596fd277f (Ara) overload mkV2 2018-09-18 17:54:58 +02:00
Inari Listenmaa
981a6eed2e (Ara) some Utt*, CompCN, question_N 2018-09-18 17:52:59 +02:00
Inari Listenmaa
79878469e3 (Ara) overload mkV2 2018-09-18 17:51:57 +02:00
Inari Listenmaa
1fda8277dd Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-18 13:53:54 +02:00
Inari Listenmaa
50e9e594e6 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-18 13:53:44 +02:00
Inari Listenmaa
78e7c47604 Merge pull request #19 from inariksit/master
(Ara) Add various functions to make SymbolicAra work.
2018-09-18 13:53:22 +02:00
Inari Listenmaa
db0bbfd1fb (Ara) Add various functions to make SymbolicAra work. 2018-09-18 11:30:58 +02:00
Inari Listenmaa
278cc8aed3 Merge pull request #18 from inariksit/master
(Ara) couple of additions
2018-09-17 16:05:04 +02:00
Inari Listenmaa
c660dd6aa5 (Ara) couple of additions 2018-09-17 15:57:09 +02:00
Inari Listenmaa
5e5840722d Merge pull request #16 from odanoburu/por-num
add small treebank for numerals and improve NumeralPor
2018-09-17 09:19:18 +02:00
odanoburu
625bf5485f (Por) Numeral: add spacing and handle case of millions (not in RGL, only in ParseExtend) 2018-09-12 18:02:49 +00:00
odanoburu
6fc46c2176 (Por) Numeral: create new oper and use it 2018-09-12 17:07:07 +00:00
Prasanth Kolachina
98c41fabc8 Merge pull request #17 from pkolachi/master
Fix to AbsFunDoc.hs
2018-09-12 17:03:21 +02:00
Prasanth Kolachina
c417d255d5 change config filename in AbsFunDoc.hs to generate UDlabels in documentation 2018-09-12 17:01:06 +02:00
odanoburu
37169098ef (treebanks) add treebank with some numeral trees
biased towards Portuguese edge cases, naturally
2018-09-11 23:23:33 -03:00
odanoburu
37d4d3672c (Por) corrects edge cases in NumeralPor 2018-09-11 21:11:09 +00:00
Krasimir Angelov
285bca2ef5 refactoring to make it easier to add new conjuncts 2018-09-09 14:10:16 +02:00
Krasimir Angelov
790d4bc04a Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-09-07 11:53:03 +02:00
Krasimir Angelov
5465f85834 Merge pull request #14 from odanoburu/extend-por
(Por) Extend: begin to add VPS
2018-09-07 01:42:00 +02:00
odanoburu
15f99fb258 Merge remote-tracking branch 'upstream/master' 2018-09-06 22:33:17 +00:00
odanoburu
26afd1c267 (Por) Extend : begin to add VPS 2018-09-06 22:32:57 +00:00
Aarne Ranta
cbbf530b71 force compilation of ExtraEng via a dummy open in AllEng 2018-09-06 18:08:31 +02:00
Inari Listenmaa
e4386a1aeb Merge pull request #13 from inariksit/master
(Ara) Guessing default implementations in various categories
2018-09-06 16:37:06 +02:00
Inari Listenmaa
bdef0d0f12 (Ara) Guessing default implementations in various categories 2018-09-06 16:25:50 +02:00
Krasimir Angelov
a317429a79 fix paradigm 2018-08-24 10:54:25 +02:00
Krasimir Angelov
1e3e42e308 allow compound nouns with dash 2018-08-24 10:53:38 +02:00
Aarne Ranta
07b99f455f NewDictFin with standard RGL categories. DictFin is a union of this and OldDictFin. 2018-08-23 16:40:48 +02:00
Inari Listenmaa
e124f69170 Merge pull request #12 from ayberkt/structural
Complete most of the linearizations in StructuralTur
2018-08-22 11:37:43 +03:00
Ayberk Tosun
e2fbf96815 Add linearization for as_CAdv 2018-08-22 10:54:38 +03:00
Ayberk Tosun
84fff1e096 Add linearization for at_least_AdN 2018-08-22 10:54:25 +03:00
Ayberk Tosun
7c6690a431 Add linearization for at_most_AdN 2018-08-22 10:54:07 +03:00
Ayberk Tosun
ff515b3508 Add implementation stub for part_Prep 2018-08-21 18:23:32 +03:00
Ayberk Tosun
47f57afa17 Implement the linearization for otherwise_PConj 2018-08-21 18:23:18 +03:00
Ayberk Tosun
191fab7472 Transfer updates to CatTur.gf and ResTur.gf 2018-08-21 18:05:49 +03:00
Ayberk Tosun
966716cc7d Transfer all updates from ayberkt/GF/structural 2018-08-21 14:49:53 +03:00
Inari Listenmaa
42c5a3fa55 Merge pull request #11 from ayberkt/noun
Complete some missing linearizations in NounTur
2018-08-21 14:34:39 +03:00
Ayberk Tosun
776c5d8a06 Update the lin type for DAP 2018-08-21 14:09:32 +03:00
Ayberk Tosun
0d75c394b5 Transfer all additions from ayberkt/GF/noun 2018-08-21 12:41:13 +03:00
John J. Camilleri
61699e847f Merge pull request #10 from MUSTE-Project/master
Updates because the lincat of Num has changed
2018-08-20 08:50:14 +02:00
Peter Ljunglöf
15940bd4fe Updates because the lincat of Num has changed 2018-08-18 00:13:06 +02:00
Krasimir Angelov
b32f7aa148 added paradigm mkN001a 2018-08-10 21:48:03 +02:00
Krasimir Angelov
ac51b0b042 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-08-10 21:45:58 +02:00
Krasimir Angelov
d7642250ea they_Pron was marked as first person in Structural 2018-08-10 21:44:14 +02:00
John J. Camilleri
702760c911 Merge pull request #7 from odanoburu/docker-ci
use docker for ci
2018-08-10 19:38:32 +02:00
odanoburu
6d49437e2a Merge remote-tracking branch 'upstream/master' into docker-ci 2018-08-10 16:30:44 +00:00
John J. Camilleri
989c6f5893 Add dist to --gf-lib-path in Make.sh
Otherwise an externally set GF_LIB_PATH will mess it up
Might also need to make same change in Make.hs
2018-08-10 18:27:19 +02:00
odanoburu
fe10e94c6c (#4) Make.hs build prelude all
use bash to call Make.sh
2018-08-10 15:08:06 +00:00
John J. Camilleri
0fe46a6d17 Change shebang to /bin/bash 2018-08-10 08:33:01 +02:00
John J. Camilleri
9d581b1d5e Fix note in README about default command 2018-08-10 08:31:02 +02:00
odanoburu
c4f4df256b try using bash 2018-08-09 18:19:49 +00:00
odanoburu
e76e22f35c Merge branch 'master' into docker-ci 2018-08-09 18:05:56 +00:00
odanoburu
5ce0ad5639 (#4) use --verbose in travis build
build mongolian too

rm --dest flag from haskell build
2018-08-09 17:54:58 +00:00
John J. Camilleri
f0566a48dd Re-specify --gf-lib-path in Make.hs, seems to be needed sometimes 2018-08-09 10:19:48 +02:00
John J. Camilleri
73948e54a6 Make.sh: halt on error, skip non-existant files
Was trying to compile src/*/SymbolHeb.gf which doesn't exist
2018-08-09 10:05:10 +02:00
John J. Camilleri
60f19691eb --verbose flag shows file names, not passed on to GF 2018-08-09 09:52:41 +02:00
John J. Camilleri
e73d42379c Make.hs: specifying --langs doesn't ignore module restrictions
As a result the `--langs=+...` function is no longer meaningful
2018-08-09 09:09:17 +02:00
odanoburu
5dff7e914a (#4) reverse order, use GF_LIB_PATH 2018-08-09 00:10:25 -03:00
odanoburu
d377a0045b change order 2018-08-08 23:59:00 -03:00
odanoburu
2c13810b84 (#4) travis build with docker image
using dockerfile in https://github.com/odanoburu/docker-gf/blob/master/haskell-gf/Dockerfile
2018-08-08 23:51:34 -03:00
John J. Camilleri
869721d0a5 Add Travis build status to README 2018-08-08 22:25:41 +02:00
John J. Camilleri
39c51ac777 Merge pull request #5 from odanoburu/master
(#4) add .travis.yml using mac os
2018-08-08 22:23:40 +02:00
odanoburu
750ab83d12 (#4) add .travis.yml using mac os 2018-08-08 13:58:01 -03:00
Krasimir Angelov
fb4f992d98 fix in the verb paradigms 2018-08-08 09:33:37 +02:00
Krasimir Angelov
5bb454454a add one more conjunction 2018-08-07 11:49:22 +02:00
Krasimir Angelov
e6f924d597 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-08-07 11:48:34 +02:00
Krasimir Angelov
c41015523f fix the location of agent in PassAgentVPSlash 2018-08-07 11:47:59 +02:00
John J. Camilleri
faf66b4a88 Update Clone.hs to add copy api files and add language to config 2018-08-07 11:21:58 +02:00
John J. Camilleri
0130a0012d Better output when no files specified in Make.hs 2018-08-07 11:01:02 +02:00
John J. Camilleri
32647437ad Remove unneccessary --gf-lib-path, which could give misleading errors 2018-08-07 10:11:23 +02:00
John J. Camilleri
b76d8512e4 Updade Make.sh to read languages.csv, more specific about what to compile 2018-08-07 10:06:12 +02:00
John J. Camilleri
1208cdf9bc Remove english/CompatibilityCat.gf
There's no reason why that should be there
2018-08-07 09:44:03 +02:00
John J. Camilleri
d994208499 Cleanup Make.hs, remove 'parse' build command. 2018-08-07 08:41:45 +02:00
John J. Camilleri
cfb6bf0301 Update language config with "All" column; fix those marked for notpresent
Also fix bug in boolBit
2018-08-06 21:55:58 +02:00
John J. Camilleri
bad78999dc Make summary more explicit as it was a bit misleading 2018-08-06 21:28:29 +02:00
John J. Camilleri
bd636d805a Simplify specifying languages in Make.hs 2018-08-06 21:08:46 +02:00
John J. Camilleri
557ae6da44 Factor out language config to CSV file
Compiles, not tested
2018-08-06 16:53:23 +02:00
John J. Camilleri
70297f6ac2 Add --verbose/-v switch to Make.hs 2018-08-06 10:29:42 +02:00
John J. Camilleri
e44ab11609 copy copies everything from dist, not just specified modules
This was problematic when copying only a module and not its dependents.
2018-08-05 17:22:46 +02:00
John J. Camilleri
59672ef8ac Re-add argument checking in Make.hs 2018-08-04 18:44:16 +02:00
John J. Camilleri
8600112264 Search for module by name and do not require language folder 2018-08-04 18:40:40 +02:00
John J. Camilleri
7f5fae2031 Add support for building/copying individual modules in Make.hs
Particularly useful for ExtraEng, large monolingual dicts, etc.
2018-08-04 18:10:37 +02:00
John J. Camilleri
cc8bb02489 Remove pgf build command 2018-08-04 16:27:20 +02:00
John J. Camilleri
1496a05060 Merge pull request #1 from kristiank/patch-1
corrected flag name (was 'to', now 'dest')
2018-08-02 12:00:59 +02:00
Kristian Kankainen
0df5b29602 corrected flag name (was 'to', now 'dest') 2018-08-02 10:11:46 +03:00
John J. Camilleri
19020167f7 First version of Make.bat, untested but basically complete 2018-07-30 15:58:36 +02:00
John J. Camilleri
56f530abab Clean up Make.sh and add verbosity flag 2018-07-30 11:52:55 +02:00
Krasimir Angelov
4ca4fb1d6d Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl 2018-07-29 17:30:43 +02:00
Krasimir Angelov
475231449a fix in PassVPSlash/PassAgentVPSlash 2018-07-29 17:29:56 +02:00
John J. Camilleri
be66369ccf Build modules separately otherwise a single fail makes whole thing fail 2018-07-28 16:02:06 +02:00
Krasimir Angelov
1b4762c436 make it possible to extend numberals beyound 1000000 2018-07-27 19:17:53 +02:00
Krasimir Angelov
e7b1c47300 added category ACard 2018-07-27 11:57:46 +02:00
Krasimir Angelov
e56ba66232 fix a paradigm 2018-07-27 11:56:18 +02:00
Krasimir Angelov
0d7df4d576 respect the verb type in GerundAdv 2018-07-27 11:55:06 +02:00
Krasimir Angelov
7bf3409b05 general prepositions in A2 2018-07-27 11:54:21 +02:00
John J. Camilleri
411da9cbd8 Update README 2018-07-26 21:43:45 +02:00
John J. Camilleri
ade493515a [GF Split] Post-split updates 2018-07-25 20:18:48 +02:00
John J. Camilleri
5d058bcfc0 Remove RGL Source Browser
This has moved to:
https://github.com/GrammaticalFramework/rgl-source-browser
2018-07-22 14:55:27 +02:00
John J. Camilleri
e94f94fcf1 Merge pull request #46 from odanoburu/construct
(Eng) use Extend instead of Extra in Construction
2018-07-17 16:32:36 +02:00
Krasimir Angelov
0e126a24e0 field adv in AP is not used. Removing it simplifies the code. 2018-07-15 11:18:56 +02:00
Krasimir Angelov
ed60efd385 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-07-15 10:55:54 +02:00
Krasimir Angelov
19e8bab1a4 allow for negated CAdv 2018-07-15 10:55:03 +02:00
Krasimir Angelov
4c203cfd81 formatting 2018-07-15 10:52:03 +02:00
John J. Camilleri
dd9e9cb51b Remove obsolete lib/src/Make.hs and related lib/src/Makefile entries 2018-07-11 15:47:27 +02:00
Krasimir Angelov
43950360a6 make use of CommonX.CAdv 2018-07-10 13:59:01 +02:00
Krasimir Angelov
5d734f9a6c linref/lindef for CAdv were actually wrong 2018-07-10 12:25:12 +02:00
Krasimir Angelov
5fbb56d4f8 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-07-10 11:28:46 +02:00
Krasimir Angelov
8c2a6f6118 allow post-position adjectives. added as_CAdv 2018-07-10 11:25:06 +02:00
Krasimir Angelov
e5c523e480 double negation in ComplVV 2018-07-10 11:22:54 +02:00
Krasimir Angelov
112aea1efc double negation in EmbedVP, ImpVP and UttVP 2018-07-10 11:21:45 +02:00
John J. Camilleri
685d044d48 Update Clone.hs script for copying RGs (and other projects) to new langs 2018-07-07 13:47:18 +02:00
Krasimir Angelov
326d9edb22 make it possible to add more cardinals 2018-07-06 19:03:31 +02:00
John J. Camilleri
41c9cc80a6 Remove mkLogo.gfs 2018-07-06 13:55:57 +02:00
Krasimir Angelov
dcd0490180 generalize the Card category 2018-07-05 13:01:17 +02:00
Krasimir Angelov
c456ea3b11 bugfix for phrasal verbs 2018-07-05 09:12:28 +02:00
Krasimir Angelov
fa966ab212 use CPrep instead of Acc in several places 2018-07-04 14:06:41 +02:00
Krasimir Angelov
237a68f05e Merge branch 'master' of https://github.com/GrammaticalFramework/GF
Conflicts:
	examples/phrasebook/SentencesBul.gf
	examples/phrasebook/WordsBul.gf
2018-07-04 13:09:39 +02:00
Krasimir Angelov
21961e39ba a majour refactoring to support clitic pronouns 2018-07-04 13:01:06 +02:00
John J. Camilleri
d094cafa07 coding flag in NewDictSweAbs.gf 2018-07-04 10:28:16 +02:00
Inari Listenmaa
aff3db9238 Merge pull request #67 from inariksit/dutch
(Dut) Fix ordinals and superlatives

ik wil roodst worden --> ik wil het roodst worden ('I want to become reddest')
ik wil tiend worden --> ik wil tiende worden ('I want to become tenth')
ik wil linker worden --> ik wil de linker worden ('I want to become left')
2018-07-03 18:59:44 +02:00
Krasimir Angelov
6fe595104c support postposition adjectives 2018-07-03 18:48:46 +02:00
Krasimir Angelov
7d01f6720f improve the API for prepositions 2018-07-03 18:47:25 +02:00
Krasimir Angelov
052740f3e5 fix know_V2 2018-07-03 18:46:32 +02:00
Krasimir Angelov
19741440a0 default implementations of ComplSlashPartLast 2018-07-03 18:44:28 +02:00
Inari Listenmaa
730fd6501c (Dut) Fix ordinals and superlatives 2018-07-03 18:25:14 +02:00
Krasimir Angelov
6eaee8e4c1 remove the ResBul.comma and use Prelude.bindComma 2018-07-02 11:55:13 +02:00
Krasimir Angelov
d7f9d9e828 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-07-02 11:20:38 +02:00
Krasimir Angelov
c47776854f make it easier to control the location of premodifiers for infinitives 2018-07-02 11:19:59 +02:00
Prasanth Kolachina
c89540b919 modify and add targets to compile Dict*.gf; fix typo in DictSweAbs 2018-07-01 12:51:48 +02:00
Krasimir Angelov
1435277693 fix the compound form of heart_N 2018-07-01 11:01:47 +02:00
Krasimir Angelov
ebbd512ee1 added compoundV operation 2018-06-28 15:32:58 +02:00
Krasimir Angelov
07697dd8d1 fix paradigm mkN003 2018-06-28 15:32:37 +02:00
Krasimir Angelov
2c0caaf687 remove ResScand and use either Prelude.bindComma or Coordination.comma 2018-06-28 11:32:52 +02:00
Krasimir Angelov
ddffa1928f fixes 2018-06-27 20:50:46 +02:00
Krasimir Angelov
b7ccdb5ad7 fix paradigm N38a 2018-06-27 20:49:46 +02:00
Inari Listenmaa
eca816c8fa Merge pull request #65 from odanoburu/romance
(Romance) add lins
2018-06-27 08:43:40 +03:00
odanoburu
29c044a315 (Romance) add lins
- add AdVVPSlash, AdvVPSlash, CountNP, PartNP
- simplify opers using record extension
- rm CountNP from NounPor
2018-06-26 17:35:37 -03:00
Krasimir Angelov
1ae489741e Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-06-26 18:09:33 +02:00
Krasimir Angelov
0df8c34e1d generalize DAP 2018-06-26 18:09:11 +02:00
Aarne Ranta
2252a44bb9 a new version of SALDO-based DictSwe separate from the old one 2018-06-26 11:58:16 +00:00
Krasimir Angelov
a730a3194b added ByVP, InOrderToVP and CompoundAP 2018-06-26 12:26:41 +02:00
Krasimir Angelov
39bca7b395 in ExtAdvS use the binding comma 2018-06-26 12:25:06 +02:00
Krasimir Angelov
393f228127 version of dualN which takes a string directly 2018-06-26 12:23:41 +02:00
Krasimir Angelov
cdc2f36bdf added DetNPMasc 2018-06-24 11:28:21 +02:00
Krasimir Angelov
a2ba6a7d64 fix polarity in DetNP and DetNPFem 2018-06-24 10:59:09 +02:00
Krasimir Angelov
423d2148c3 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-06-23 22:47:32 +02:00
Krasimir Angelov
5f2d520e30 added more functions in Extend 2018-06-23 22:47:02 +02:00
Krasimir Angelov
8cfc229164 fix mkN002 2018-06-23 22:46:22 +02:00
Krasimir Angelov
66f1ff9b05 fix for with_Pron 2018-06-23 22:45:51 +02:00
Krasimir Angelov
e90aa08934 fix typo 2018-06-23 22:44:14 +02:00
odanoburu
87ed89878e Merge remote-tracking branch 'upstream/master' into por 2018-06-20 12:33:05 -03:00
odanoburu
49a405cdb2 (Por) change mkPrep paradigm
- add Por to Make.hs
- rm elisDe (PhonoPor)
- change mkPrep paradigm, and make necessary changes
- rm ParsePor
2018-06-20 12:31:36 -03:00
John J. Camilleri
4e25a9c2c9 Update AbsFunDoc to remove refs to translator and app 2018-06-20 10:19:03 +02:00
John J. Camilleri
a3ad324dc2 Remove wide coverage translator
It had now been migrated to a new repository:
https://github.com/GrammaticalFramework/wide-coverage
2018-06-20 10:06:22 +02:00
Krasimir Angelov
77d8ff1ba8 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-06-19 18:02:46 +02:00
Krasimir Angelov
16fd4116fc fix the linref for A2, N2 and N3 2018-06-19 18:01:57 +02:00
Aarne Ranta
8ff47abd59 added ExtraFin.CompNomAP 2018-06-19 17:51:38 +02:00
Krasimir Angelov
3156959205 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-06-19 11:26:03 +02:00
Krasimir Angelov
b206e5f88b upgrade after the change in SC 2018-06-19 11:25:37 +02:00
Aarne Ranta
58b7492a70 fixed word order in AdjectiveChi.CompA2 2018-06-17 09:57:08 +02:00
Krasimir Angelov
867bee126d Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-06-16 07:09:17 +02:00
Inari Listenmaa
8ebf00005f (Dut) Extend vs. Extra 2018-06-15 13:14:53 +02:00
Inari Listenmaa
58eda09255 (Dut) Fixes in DetQuant*
* Fix the classic "a 1 house" bug (was handled in DetQuant but still present in DetQuantOrd)
* In DetQuantOrd, choose quant.s for both s and sp, to prevent "*yours 5 youngest"
2018-06-15 11:05:22 +02:00
Inari Listenmaa
41253228e7 (Dut) consistency with wilt/wil, zult/zal, kunt/kan 2018-06-15 11:00:16 +02:00
Inari Listenmaa
7dd9e62de5 (Dut) Remove . after date (op 17 mei, not 17. mei) 2018-06-15 10:38:04 +02:00
Aarne Ranta
6c3125c3e2 VPSlash in ExtensionsEng updated 2018-06-14 10:11:43 +02:00
Krasimir Angelov
c4ada6112f implement DetDAP and AdjDAP 2018-06-14 09:52:24 +02:00
Krasimir Angelov
b993704225 support but as a conjunction 2018-06-14 08:13:02 +02:00
Krasimir Angelov
cb53630c60 fix the lexical aspect for negative imperatives. also temporary remove the comma from EmbedS 2018-06-14 08:11:52 +02:00
Krasimir Angelov
27ca98ddad fix mkV2V to actually use both prepositions 2018-06-14 08:09:58 +02:00
Aarne Ranta
350adb704a mkA and mkV in arabic 2018-06-13 07:55:33 +02:00
Aarne Ranta
6c70ccf0a1 smart Arabic mkN 2018-06-12 22:34:45 +02:00
Aarne Ranta
75d2f66b59 started to add overloaded opers to ParadigmsAra 2018-06-12 21:06:30 +02:00
Inari Listenmaa
f1889644d4 (Dut) Fix bug in regAdjective: now matching a pattern #dupCons, not just any suffix 2018-06-12 14:18:49 +02:00
Krasimir Angelov
d24c9986b9 allow adjectivial forms for N2 and N3 as well 2018-06-10 22:23:54 +02:00
Krasimir Angelov
1e9876c5b4 implement subject control for V2V and V2A verbs 2018-06-10 20:28:11 +02:00
Krasimir Angelov
4f80ae9ee8 fix MassNP for with_Pron 2018-06-10 20:27:14 +02:00
Krasimir Angelov
317fdfbeaa allow VV verbs to control the aspect of the governed verb 2018-06-10 08:21:00 +02:00
Krasimir Angelov
561bf721d1 fix the aorist for the copula 2018-06-10 07:15:25 +02:00
Krasimir Angelov
aa6ac1f8d3 fix the compound forms for the days of the week 2018-06-10 07:14:29 +02:00
John J. Camilleri
1d06f09813 Merge branch 'master' of github.com:GrammaticalFramework/GF 2018-06-09 20:44:24 +02:00
John J. Camilleri
97af158927 Minor fix in RGL browser 2018-06-09 20:44:00 +02:00
Krasimir Angelov
a598eae98b fix the paradigm for gaz_N 2018-06-08 19:54:33 +02:00
Inari Listenmaa
f98385f226 Merge pull request #57 from inariksit/dutch
(Dut) Change order of cases in smart paradigm for nouns
2018-06-08 15:14:19 +02:00
Inari Listenmaa
2bc8b35e57 (Dut) Change order of cases in smart paradigm for nouns 2018-06-08 15:01:41 +02:00
Krasimir Angelov
546af233fc fix the linrefs for prepositions 2018-06-07 15:17:21 +02:00
Krasimir Angelov
2869eaf6e9 automatic negation of with_Prep 2018-06-07 14:58:03 +02:00
Krasimir Angelov
fe72ccdec1 premodifiers like never can change the polarity of VP 2018-06-07 14:27:45 +02:00
Krasimir Angelov
bf37eb06a9 added PassVPSlash and PassVPSlashAgent in Swe, Bul 2018-06-07 14:26:06 +02:00
Krasimir Angelov
4cb024fdb8 added Extend.ComplBareVS 2018-06-07 12:02:26 +02:00
Krasimir Angelov
ca6fbbbfca fixes in the adjectivial forms for two paradigms 2018-06-07 12:01:50 +02:00
Krasimir Angelov
6408484fd0 added ExistNPAdv and ExistIPAdv 2018-06-07 12:00:56 +02:00
odanoburu
acd218d39b Merge remote-tracking branch 'upstream/master' into por 2018-06-06 09:51:42 -03:00
Aarne Ranta
3949424a78 fixed Ger SentCN and AdvCN, which erased their earlier modifiers 2018-06-05 18:19:09 +02:00
Inari Listenmaa
5e4d2e654d (Dut) Update ExtensionsDut and TranslateDut 2018-06-05 14:20:09 +02:00
Inari Listenmaa
0eea611a8b Merge pull request #55 from inariksit/dutch
Dutch smart paradigms + remove commented out code
2018-06-05 11:50:24 +02:00
Inari Listenmaa
b9c81ed83f (Dut) Improve smart paradigms 2018-06-05 11:35:32 +02:00
Inari Listenmaa
fad7cf0c6f (Dut) Remove MorphoDut + update change in other files 2018-06-05 11:24:12 +02:00
odanoburu
67b526b4e7 - add gennumforms to common romance
- try to make preposition contraction
- try to add detcn
2018-06-04 08:47:17 -03:00
Krasimir Angelov
870479051d RNP in Bulgarian doesn't really need agreement 2018-06-02 22:26:37 +02:00
Krasimir Angelov
cd74a0bc34 SC in English needs an agreement 2018-06-02 22:24:43 +02:00
Krasimir Angelov
ed08ae83d0 more functions in ExtendBul & ExtendSwe 2018-06-02 20:48:00 +02:00
Krasimir Angelov
9cbdaeeb4b fix a paradigm number 2018-06-02 20:47:26 +02:00
Krasimir Angelov
92f5374003 overload mkDeterminerPl to allow variation for gender 2018-06-01 12:23:21 +02:00
Krasimir Angelov
d1b34946aa added ExtendBul.VPS 2018-06-01 12:22:51 +02:00
Krasimir Angelov
1a00c54dcd fix the imports 2018-06-01 09:48:59 +02:00
Krasimir Angelov
dc98730e46 GerundNP and GerundAdv in Swe,Bul 2018-06-01 09:22:34 +02:00
Krasimir Angelov
a9e2e33270 added feminine pronouns 2018-05-31 12:08:16 +02:00
Krasimir Angelov
2668e58ab6 added iSimple to Swedish as well 2018-05-31 09:34:50 +02:00
Krasimir Angelov
9558094911 implemented compound nounds which work like adverbs 2018-05-30 23:04:40 +02:00
Krasimir Angelov
3946144833 added Extend.AdAdV in Eng,Swe,Bul 2018-05-30 22:29:18 +02:00
Krasimir Angelov
8ad7c58989 like English, Bulgarian also needs a isSimple flag in VP to correctly place the adjectivial participles 2018-05-30 22:27:36 +02:00
Krasimir Angelov
2a8cbbde74 fix ExtendSwe.EmptyRelSlash. It should add the n3 field 2018-05-30 18:04:01 +02:00
Krasimir Angelov
cac0ffb19b added second preposition in V2A 2018-05-30 15:06:34 +02:00
Krasimir Angelov
4bf1c6832e added ExtendBul.EmptyRelSlash 2018-05-30 14:38:49 +02:00
Krasimir Angelov
3815e753ae the AP now inflects by Person since it may contain an embedded VP 2018-05-30 14:08:14 +02:00
Krasimir Angelov
36f0220db3 Extend.PresPartAP for Swe and Bul 2018-05-30 13:30:49 +02:00
Krasimir Angelov
ae3c627198 Extend.PastPartAP in Swe and Bul 2018-05-30 11:19:35 +02:00
Krasimir Angelov
c75b8c1cdf fix short_A in Swedish 2018-05-30 10:56:42 +02:00
Krasimir Angelov
bce753db8b linrefs for A and N 2018-05-30 10:56:03 +02:00
Krasimir Angelov
d7793ad7b7 Extent.PositAdVAdj in Eng,Swe,Bul 2018-05-29 12:09:13 +02:00
odanoburu
b78bcd16ed Merge remote-tracking branch 'upstream/master' into por 2018-05-28 16:22:54 -03:00
Aarne Ranta
b3eeee54ce fixed the use of de in Chi Adv 2018-05-27 10:11:46 +02:00
Inari Listenmaa
8ae61cc1a8 minor Estonian additions from last summer (#51)
* add two new nominal modifiers of type NP -> CN -> CN

* change married_A2 to invariant adjective

* rename CommonNoun to Noun

* change type of relPron

* merge CompAP and ICompAP using the same oper ; fix reflPron (ise, enda, ...) and add a helper function fixPlNom

* minor cleanup

* change in who_RP, reflecting the change of relative pronouns in ResEst

* Add new functions to ExtendEst ; update comments in ResEst
2018-05-24 14:17:11 +01:00
bruno cuconato
9bd63b9d8d (Por) several minor updates (#49)
* fix linearization of either/or

* (Por) minor updates
- correction in Lexicon
- documentation in Morpho
- rm variants from Structural

* (Por) correct references to extinct opers

* (Por) rm Spa remnants

* (Abs) rm reference to Extra in Structural -- use Extend instead

* (Por) ExtendPor
- use Extend instead of Extra in All
- use Extend funs in Extra whenever possible

* trigger CI

* (Por) Diff
- sort opers
- rm old commented code
- tidy things up
- no semantic changes

* (Por) add IrregBesch module with verbs using Besch paradigms
- Besch :
  - use hack to prevent runtime failure with glue in in vars output
  - rm paradigm numbers
- add IrregBeschPor, verbs that use only bescherelle paradigms
  - use them in Construction, Structural, Idiom, Extra
- Diff and Paradigms had (almost) the same oper (verboV/verbBeschH),
  so combine them into one and use it

* (Por) update functions to use new Irreg suffix and resolve name conflicts
2018-05-24 12:24:39 +01:00
odanoburu
a29c622695 (Por) update functions to use new Irreg suffix and resolve name conflicts 2018-05-23 19:15:35 -03:00
odanoburu
41eb197da4 (Por) merge PRs #45 and #48 and solve conflicts 2018-05-23 19:07:32 -03:00
odanoburu
9e78c26433 Merge branch 'por-extra' into por-merge 2018-05-23 19:03:58 -03:00
odanoburu
90ccd0e828 Merge remote-tracking branch 'upstream/master' into por 2018-05-23 11:22:46 -03:00
bruno cuconato
fe0b7c13fe (Por) minor updates (#43)
* fix linearization of either/or

* (Por) minor updates
- correction in Lexicon
- documentation in Morpho
- rm variants from Structural

* (Por) correct references to extinct opers
2018-05-18 13:36:56 +03:00
odanoburu
71220ebaf4 (Por) add IrregBesch module with verbs using Besch paradigms
- Besch :
  - use hack to prevent runtime failure with glue in in vars output
  - rm paradigm numbers
- add IrregBeschPor, verbs that use only bescherelle paradigms
  - use them in Construction, Structural, Idiom, Extra
- Diff and Paradigms had (almost) the same oper (verboV/verbBeschH),
  so combine them into one and use it
2018-05-17 12:46:10 -03:00
odanoburu
23c5ce2381 (Por) Diff
- sort opers
- rm old commented code
- tidy things up
- no semantic changes
2018-05-16 19:51:41 -03:00
odanoburu
3a97392fbd Merge remote-tracking branch 'upstream/master' into por 2018-05-16 15:51:03 -03:00
odanoburu
cf36ef0449 (Eng) rm reference to Extra 2018-05-16 13:11:31 -03:00
odanoburu
c49048203d (Eng) use Extend instead of Extra in Construction 2018-05-16 11:20:22 -03:00
odanoburu
8ba3bbe82f (Por) ExtendPor
- use Extend instead of Extra in All
- use Extend funs in Extra whenever possible
2018-05-16 10:38:54 -03:00
odanoburu
d0410a1b0f Merge remote-tracking branch 'origin/por' into por-extra 2018-05-16 09:58:10 -03:00
odanoburu
cbc2fc8758 (Abs) rm reference to Extra in Structural -- use Extend instead 2018-05-16 09:56:13 -03:00
odanoburu
e926d54523 (Por) rm Spa remnants 2018-05-16 09:55:36 -03:00
odanoburu
528b15f41a (Por) correct references to extinct opers 2018-05-16 09:03:42 -03:00
Aarne Ranta
c50360078f fixed duplication of de in RelativeChi 2018-05-16 10:24:02 +02:00
odanoburu
dc9aa488a3 (Por) minor updates
- correction in Lexicon
- documentation in Morpho
- rm variants from Structural
2018-05-15 15:38:54 -03:00
odanoburu
7c33881e98 Merge remote-tracking branch 'upstream/master' into por 2018-05-15 15:37:10 -03:00
Krasimir Angelov
9544bd8e6b CompoundN in ExtendSwe and ExtendBul 2018-05-12 17:41:12 +02:00
odanoburu
210e27e509 fix linearization of either/or 2018-05-11 23:41:47 -03:00
odanoburu
38852ee672 (Por) improve mkV
- regV with more cases
- separate one instance of mkA into an oper
2018-05-11 15:57:35 -03:00
Inari Listenmaa
2299c0b50f Merge branch 'master' into por-besch 2018-05-11 11:07:18 +03:00
odanoburu
66b69cd093 Merge remote-tracking branch 'upstream/master' into por-besch 2018-05-10 17:36:39 +00:00
odanoburu
b44995f660 Merge remote-tracking branch 'upstream/master' into por-passive 2018-05-10 17:29:51 +00:00
odanoburu
fa10c19c05 (Por) corrections and additions to Besch 2018-05-09 20:13:28 -03:00
odanoburu
8aabe95516 (Por) build passive from participle 2018-05-09 17:02:00 -03:00
odanoburu
5bf1e1d10a (Romance, #38) rm numForms from Morpho{Cat,Ita} 2018-05-09 15:59:20 -03:00
odanoburu
ba094d3af1 (Romance) mv numForms to CommonRomance; rm from Morpho* 2018-05-09 15:23:10 -03:00
Inari Listenmaa
0fcf1d1f66 (Dut) Fix verb form + reflexive in plural and polite imperative 2018-05-07 16:59:29 +02:00
Inari Listenmaa
7639654883 Coordination.gf: comma with SOFT_BIND 2018-05-07 16:58:34 +02:00
Inari Listenmaa
34c87d0de0 (Dut) misc. small fixes 2018-05-07 16:32:12 +02:00
Inari Listenmaa
d5ba0733ec (Dut) Inflection of willen_V 2018-05-07 16:31:38 +02:00
Inari Listenmaa
1a338ea034 (Dut) Replace "," with bindComma in several places 2018-05-07 16:30:20 +02:00
Aarne Ranta
b8b67e8585 added an mkA case to Por 2018-05-05 10:28:15 +02:00
Inari Listenmaa
6a49144f00 (Spa) Add a constructor for adjectives with noninflecting component 2018-05-02 19:24:14 +02:00
lizazim
012a6f8818 Add files via upload 2018-05-02 12:44:37 +03:00
lizazim
f480563721 Add files via upload 2018-05-02 12:41:25 +03:00
lizazim
cc5c1a9590 Add files via upload 2018-05-02 12:24:58 +03:00
lizazim
d7d1e37045 Add files via upload 2018-05-02 11:13:05 +03:00
lizazim
3c31102873 Add files via upload 2018-05-02 11:01:55 +03:00
Inari Listenmaa
3089155590 (Ger) Agreement with ReflVP + ComplSlash
ComplSlash ( … ReflVP … ) X:    reflexive should agree with X
ReflVP ... ( … ComplSlash … X): reflexive should agree with subject
2018-05-01 16:38:17 +02:00
Inari Listenmaa
76885d3185 (Eng) Agreement with ReflVP + ComplSlash
ComplSlash ( … ReflVP … ) X:    reflexive should agree with X
ReflVP ... ( … ComplSlash … X): reflexive should agree with subject
2018-05-01 16:35:02 +02:00
Aarne Ranta
0a1460ee85 added comma to Fin.RelCN 2018-04-26 16:03:34 +02:00
Aarne Ranta
db1ecda1f6 made AllDut import ExtendDut 2018-04-25 10:46:40 +02:00
Aarne Ranta
2de326e8a3 more cases to Chi.mkA2 2018-04-25 08:42:20 +02:00
Inari Listenmaa
9e95b1df99 (Eus) Fix agreement in complement clauses 2018-04-23 16:18:43 +02:00
Inari Listenmaa
6ca9fbe55b (Dut) If VPSlash has a preposition, insert object into Adv slot 2018-04-23 15:00:50 +02:00
Inari Listenmaa
c8c6077cf7 (Dut) Better approximation of conjAgr 2018-04-19 17:09:56 +02:00
Inari Listenmaa
6a9145cc93 (Dut) Choose stressed form of pronoun 2018-04-19 15:46:57 +02:00
Inari Listenmaa
6e9f81a4a3 (Dut) Make postmodifier AP take the predicative form; ComplA2 makes AP into postmodifier 2018-04-19 15:46:36 +02:00
Inari Listenmaa
34d27a6876 (Dut) Add all AForms into VForm for past participle; update rest of the modules accordingly. Fix agreement in PastPartAP. 2018-04-19 12:01:05 +02:00
Aarne Ranta
b5ca8710cf fixed notpresent in ResDut 2018-04-18 16:49:17 +02:00
Inari Listenmaa
de5ce221b6 (Dut) Add inflected form of past participle + WIP on PastPartAP in ExtendDut 2018-04-18 16:30:41 +02:00
Inari Listenmaa
f2a02c438d (Dut) Fixes in ComplSlash, mkClause, ProgrVP + general cleanup 2018-04-18 10:13:55 +02:00
Inari Listenmaa
100bb34dcd (Dut) lexical fixes 2018-04-18 10:12:30 +02:00
John J. Camilleri
d2ecf37427 (Swe) new release of DictSwe
- Based on Malin Ahlberg's SALDO to GF import script
- Latest version of SALDO, with roughly 10,000 new words
- Updated identifier syntax: `aangkoek_nn_1_1_N` -> `ångkök_1_N`
- Original `DictSwe` moved to `OldDictSwe`
- New `DictSwe` inherits `OldDictSwe` for backwards compatibility
2018-04-17 21:27:06 +02:00
Inari Listenmaa
4e3867b3ad (Dut) fix agreement in youPol_Pron 2018-04-17 10:13:23 +02:00
Inari Listenmaa
afd2976439 (Dut) useInfVP depend on agreement; ProgrVP adds a complement, not adverb 2018-04-17 10:13:04 +02:00
Inari Listenmaa
7e03f0f5a2 (Dut) fix bug in infVP; add comments & clean up 2018-04-16 16:42:44 +02:00
odanoburu
714429e95f (Por) correct destruir paradigm 2018-04-14 20:45:26 -03:00
odanoburu
b17fa27414 merge and rm conflict 2018-04-14 19:22:50 -03:00
odanoburu
61e0a12b76 Merge remote-tracking branch 'upstream/master' into por 2018-04-14 19:22:01 -03:00
odanoburu
2106566e85 - add missing lins tired_VP, scared_VP, ill_VP, ready_VP
- add time linearizations
- rm Spa from RNeg lin and Refl and pronouns
- use constructors (mkV, mkA, etc) when possible
- update Lexicon
- update Numeral
2018-04-14 19:21:47 -03:00
Inari Listenmaa
97b1c50ae0 (Por) remove variants from verbs 2018-04-13 14:51:02 +02:00
odanoburu
4671346529 - rm duplicate lines 2018-04-09 12:14:32 -03:00
odanoburu
8f658948a3 - rm trailing spaces 2018-04-09 12:14:02 -03:00
odanoburu
a36a820462 Merge remote-tracking branch 'origin/por' into por 2018-04-09 12:10:33 -03:00
odanoburu
5185034a69 rm duplicate lines 2018-04-09 12:09:45 -03:00
odanoburu
51a4cca65f add some missing linearizations in ConstructionPor 2018-04-07 07:36:17 -05:00
odanoburu
30dd37e135 - add Por to complete languages (although it's not quite there yet)
- update headers
- add Por modules to lib/src/api/
2018-03-29 20:17:39 -03:00
odanoburu
cc12f0da4a Merge remote-tracking branch 'upstream/master' into por 2018-03-29 11:49:19 -03:00
odanoburu
22a7a183c3 Merge remote-tracking branch 'upstream/master' into missing-romance 2018-03-28 16:00:25 -03:00
odanoburu
ccefcc7f16 - add missing linearizations for DetDAP and AdjDAP
- indentation
2018-03-28 16:00:02 -03:00
odanoburu
03ae67d84c rm spanish paths 2018-03-23 19:30:05 -03:00
odanoburu
2939809f45 add some more changes 2018-03-23 19:02:52 -03:00
odanoburu
2aaa698f69 Merge remote-tracking branch 'origin/por' into por 2018-03-23 19:01:21 -03:00
Aarne Ranta
cf4156f29b accessing Pes.Root1 from Cl level 2018-03-22 20:36:04 +01:00
Aarne Ranta
8c09103819 made Vvform applicable in Pes.VP 2018-03-21 15:46:50 +01:00
Aarne Ranta
07f538cd4e isPost in Pol AP, used in CompA2 2018-03-20 16:01:34 +01:00
Inari Listenmaa
fb6e994dc7 (Basque) overload mkV2 2018-03-15 14:55:25 +01:00
Inari Listenmaa
e78e1deef0 (Basque) Add ExistNP, GenNP and ICompAP; remove from Missing 2018-03-15 14:54:57 +01:00
odanoburu
22187afd1f add first changes 2018-03-14 18:59:42 -03:00
Inari Listenmaa
23f27a9dab (Dut) fix a bug with various NP-modifying functions; the NP now loses its old mergeForm and becomes a heavy NP 2018-02-22 14:36:29 +01:00
Inari Listenmaa
0b5b14d053 (Dut) Fix agreement of we_Pron 2018-02-22 13:52:25 +01:00
Aarne Ranta
4a17d46d8b added est-ce que IAdv questions to Fre 2018-02-22 09:08:49 +01:00
Aarne Ranta
ba62b9c82a Merge pull request #27 from ppski/master
added noun table 1007a
2018-02-20 08:39:56 +01:00
Inari Listenmaa
6fa7524c32 (Dut) make APs depend on agreement -- needed for reflexives 2018-02-15 14:38:24 +01:00
Paula Pawlowski
454210858f added noun table 1007a 2018-02-12 10:52:46 +01:00
Aarne Ranta
38dac3de60 restored c field in Ger.UttAP - yet another suppression previously undetected 2018-02-08 21:16:43 +01:00
Aarne Ranta
c86a273be9 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-02-08 17:38:06 +01:00
Aarne Ranta
346f089946 fixed definiteness of Dan Def+Num (de tre konger) 2018-02-08 17:37:53 +01:00
Inari Listenmaa
1b59757a89 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-02-08 16:26:55 +01:00
Inari Listenmaa
fac435afc3 (Dut) small fixes in lexicon, prepositions etc. 2018-02-08 16:26:46 +01:00
Aarne Ranta
3bda85cae1 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-02-08 15:32:34 +01:00
Aarne Ranta
632ec84356 fixed Danish mkA for -ig adjectives 2018-02-08 15:32:11 +01:00
Aarne Ranta
7e1d71d4ee additions to Dan structural words and paradigms 2018-02-08 10:55:31 +01:00
Aarne Ranta
a87a16b19f new Pol noun table from Paula Pawlowski 2018-02-06 17:12:24 +01:00
Aarne Ranta
54d60b60da found the problem in Pol adjectives: due to incomplete string matching, which the compiler doesn't detect 2018-02-06 12:48:21 +01:00
Aarne Ranta
944566b3f4 a variant of Polish mkRegAdj, mkRegAdj_s, using BIND instead of +, to work around what seems to be a compiler bug 2018-02-06 11:28:17 +01:00
Aarne Ranta
9de70d7f4d added Inessive as possible subject case in Fin 2018-02-04 19:01:05 +01:00
John J. Camilleri
b9d7335125 3 more irregular Italian verbs 2018-02-01 09:56:23 +01:00
Inari Listenmaa
8848725fa9 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-01-27 09:23:52 +01:00
Inari Listenmaa
4d042b4fae (Dut) fix a bug with empty prepositions 2018-01-27 09:23:48 +01:00
John J. Camilleri
ce0dc26ff3 Ita: add variant spelling of fare verb conjugation
e.g. soddisfacciano/soddisfino
See http://www.wordreference.com/conj/ItVerbs.aspx?v=soddisfare
2018-01-26 15:35:44 +01:00
John J. Camilleri
ff2b388001 VPPart of "prove" is "proven", not "proved" 2018-01-26 13:38:36 +01:00
John J. Camilleri
2f75ef042c Ita: add incidere 2018-01-26 08:56:03 +01:00
Inari Listenmaa
d2c145a7d8 (Dut) everybody_NP is singular 2018-01-25 14:08:13 +01:00
Inari Listenmaa
e36abfeba1 (Dut) add independent NP form for somePl_Det, few_Det and many_Det + fix everybody_NP 2018-01-24 10:57:18 +01:00
Inari Listenmaa
2326225974 (Dut) use zijn as a copula for komen_V 2018-01-24 10:56:08 +01:00
Thomas Hallgren
41dd3cead2 IrregAfrAbs.gf: change character encoding from Latin-1 to UTF-8 2018-01-23 14:49:36 +01:00
John J. Camilleri
bb2e740872 fix when inflecting multi-token strings ending in y
See mail on gf-dev 2018-01-15
2018-01-22 22:34:57 +01:00
John J. Camilleri
9744939e45 add rendere_V in IrregIta 2018-01-22 20:39:36 +01:00
Aarne Ranta
6fa7fd6706 Fre mkA improved 2018-01-21 19:01:24 +01:00
Aarne Ranta
95ca88bf02 some paradigm extensions 2018-01-21 12:18:15 +01:00
Inari Listenmaa
5d9393b5ce fix bug in regV: there was a past tense form created as present participle 2018-01-18 10:55:29 +01:00
Inari Listenmaa
3fc418c0e9 fix komen_V + make the number of arguments clear in mkVerb 2018-01-16 13:47:28 +01:00
Inari Listenmaa
84f2c2d7e1 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-01-16 10:57:01 +01:00
Inari Listenmaa
221ffa3790 add therefore_PConj 2018-01-16 10:56:22 +01:00
Aarne Ranta
b2d55c064e more mkN cases for Dan and Nor 2018-01-16 10:27:36 +01:00
Aarne Ranta
a5652e7f1e new mkN cases for Dan and Nor 2018-01-16 09:53:49 +01:00
Inari Listenmaa
e5754cc2e2 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-01-16 09:40:40 +01:00
Inari Listenmaa
80c9f1f7ea fix an example in a comment 2018-01-15 15:29:47 +01:00
Aarne Ranta
3703b76856 new cases to Ger.mkN 2018-01-14 22:19:19 +01:00
Inari Listenmaa
1d29569008 add somebody_NP and something_NP to StructuralEus 2018-01-11 19:45:13 +01:00
Inari Listenmaa
793a31805b add mkN3 to ParadigmsEus, and a couple of new words in LexiconEus 2018-01-11 19:44:39 +01:00
Inari Listenmaa
8c8adb014a remove unnecessary noMerge 2018-01-11 18:36:46 +01:00
Inari Listenmaa
0bce34d243 fix a few morphological paradigms for Dutch 2018-01-11 18:36:33 +01:00
Inari Listenmaa
4907a74b44 fix a few lexical entries in IrregDut and LexiconDut 2018-01-11 18:36:00 +01:00
Inari Listenmaa
6744320ae5 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-01-11 16:15:41 +01:00
Inari Listenmaa
233f7feb78 fix bugs in regAdjective and mkStem: now inflects correctly adjectives like blauw, and verbs with ≥2 syllables in the stem (ademen, rekenen, schakelen, ...) 2018-01-11 16:13:26 +01:00
John J. Camilleri
4ac49cf207 A few more irregular verbs in Italian 2018-01-11 13:58:27 +01:00
Inari Listenmaa
20c5bcfc33 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2018-01-10 18:24:28 +01:00
Inari Listenmaa
0729499323 fix some Icelandic noun and adjective paradigms 2018-01-10 18:24:18 +01:00
John J. Camilleri
43a28f6237 Add some irregular verbs in Italian 2018-01-09 15:42:13 +01:00
Inari Listenmaa
fb7e7050b9 implement contractions with prepositions also for interrogative pronouns and quants and dets 2018-01-05 00:13:48 +02:00
Inari Listenmaa
b7ee620c8a Implement contraction of certain noun phrases and prepositions, e.g. met + dat -> daarmee 2018-01-04 23:46:29 +02:00
Inari Listenmaa
6831710c31 Merge remote-tracking branch 'origin/master' into basque 2017-12-28 13:20:44 +02:00
Inari Listenmaa
4c7d04444a fix bug with numeral 1 in DetQuant 2017-12-28 13:18:03 +02:00
Inari Listenmaa
9cdc92c552 change ta to eta 2017-12-28 13:08:27 +02:00
John J. Camilleri
d534f3e13b Fix "considerred" etc. in English verbs 2017-12-22 12:36:12 +01:00
Inari Listenmaa
b8714eada0 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-12-20 10:27:23 +01:00
Inari Listenmaa
0e2cf3e9a3 fix someSg_Det from sommige to enig(e) 2017-12-20 10:27:17 +01:00
Aarne Ranta
3338c891bc removed superfluous preposition from SymbolPes 2017-12-19 16:28:42 +01:00
Aarne Ranta
485b095462 fixed a bug in German infinitives where some fields were left out 2017-12-19 14:16:14 +01:00
Aarne Ranta
d981fefad4 cual_IComp in ExtraSpa 2017-12-14 21:52:45 +01:00
Aarne Ranta
f59d6d42f7 added ExtraFre.quel_IComp 2017-12-13 09:36:21 +02:00
Aarne Ranta
d0a65b19fd added ExtraFre.InvQuestIAdvCl 2017-12-13 09:09:39 +02:00
Aarne Ranta
ced4be3a07 fixes in Spa: binding infinitive+clitic; mkQuant and mkDet in MakeStructuralSpa 2017-12-11 19:58:30 +01:00
Ayberk Tosun
f0fbd41c91 Complete LexiconTur (#20)
* remove unnecessary flags from GrammarTur.gf

* Add linearization for `alas_Interj`

* Add linearization for `already_Adv`

* Implement linearization for `easy_A2V`

* Implement linearization for `far_Adv`

* Implement a rudimentary linearization for `easy_A2V`

* Implement linearization for `now_Adv`

* Add implementation stubs for the linearizations of `left_Ord` and `right_Ord`

* Add linearization for `today_Adv`

* Define type aliases AS = AV = A

* Define `mkAS` and `mkAV` trivially

* Add linearization for `probable_AS`

* Rudimentary linearization for `fun_AV`

* Add linearization for `know_VQ`

* Bit of alignment

* Define the `mkAdv` function in `ParadigmsTur`

* Improve the comment regarding `easy_A2V`

* Make use of `mkAdv`
2017-12-11 09:05:08 +01:00
John J. Camilleri
13330bd983 Add LibraryBrowserIta. Add mkQuant, mkDet to MakeStructuralIta. 2017-12-08 14:09:47 +01:00
John J. Camilleri
2aaecd8927 Italian nouns: special case for -ccia/-cce 2017-11-29 15:30:55 +01:00
John J. Camilleri
fae112f5f5 Italian nouns: smart paradigm aslo does -ico -> -ici, as with adjectives
Added for symmetry, although the rule seems less clear-cut for nouns
2017-11-27 14:16:32 +01:00
John J. Camilleri
980a4c9246 Italian adjectives: special case for -ico -> -ici
e.g. "unico" should be "unici" in m.pl., not "unichi"
Probably applies to nouns too
2017-11-27 09:53:02 +01:00
Aarne Ranta
9c762efcb4 pos-neg and ExistCN in Finnish 2017-11-08 14:47:33 +01:00
Aarne Ranta
72b257b9b7 ExtendFre with some definitions 2017-11-08 10:36:49 +01:00
Aarne Ranta
161e981a29 ExistCN with a/no variation in Extend 2017-11-08 08:42:54 +01:00
Prasanth Kolachina
4a016f9bed fixed type error in translate. DictEng 2017-10-31 11:24:34 +01:00
Aarne Ranta
0e39e31ffd fixed type error in DictEng 2017-10-29 11:05:00 +01:00
Aarne Ranta
9e7bdb6703 overloading Eng mkV2V 2017-10-29 10:46:24 +01:00
Aarne Ranta
a3b2362b53 MarkupSpa added 2017-10-26 19:34:39 +02:00
Aarne Ranta
25433a6751 MarkupFre added 2017-10-25 20:27:47 +02:00
Aarne Ranta
63ea92ad04 MarkupRomance and Ita 2017-10-25 19:03:14 +02:00
Aarne Ranta
4da5677697 some fixes in German 2017-10-25 11:09:13 +02:00
Aarne Ranta
9ec92096c6 added MarkupGer 2017-10-25 11:08:49 +02:00
Aarne Ranta
e913404f3a Ger.ConjCN 2017-10-24 19:38:22 +02:00
Inari Listenmaa
9597118c85 add Ibili to copulaVP 2017-10-20 13:57:50 +02:00
Inari Listenmaa
c718d66b18 Add some extensions needed by UDTranslateFin 2017-10-13 16:13:43 +02:00
Inari Listenmaa
e5afae33e0 Change the type of synthetic verbs: instead of Tense as a param, make a new param AuxType. 2017-10-13 11:15:12 +02:00
Inari Listenmaa
47bab9e77f update the changed params to ResEus 2017-10-13 11:11:29 +02:00
Inari Listenmaa
a6966175b0 add animacy to lexicon 2017-10-11 15:10:56 +02:00
Inari Listenmaa
ff80b21618 Merge remote-tracking branch 'origin/master' into basque 2017-10-05 10:05:52 +02:00
Aarne Ranta
69226d4dfd Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-10-04 15:04:10 +02:00
Aarne Ranta
77ecb64756 adjusting Fre question forms 2017-10-04 15:03:56 +02:00
Inari Listenmaa
2d1c2d719c Merge remote-tracking branch 'origin/master' into basque 2017-10-04 15:01:36 +02:00
Inari Listenmaa
aece969d33 Basque (#15)
A few additions and fixes in the Basque grammar, specifically

*    Verb morphology (missing forms & bug fixes)
*    Reflexives: VP and A2 "sees herself", "married to myself" work now properly.
*    Add Agr to AP
*    A few lexical changes + other small fixes

* Make adjectives depend on agreement; Fix reflexives

* fix typo and remove commented out line

* small fixes and additions

* fix linVP: use the same functions as mkClause

* Add new forms to zaio and dio

* Fix bug in chooseAuxPol

* fix some bugs in synthetic verbs

* Add some simple tests for the Basque grammar

* Update README.md

* formatting

* Fix the RE in the grep

* fixes/additions to tests

* small fixes

* change beautiful_A

* use linCN in UttCN
2017-10-04 14:50:41 +02:00
Inari Listenmaa
a4fce19eb7 use linCN in UttCN 2017-10-04 14:47:30 +02:00
Inari Listenmaa
e056836472 change beautiful_A 2017-10-04 14:46:44 +02:00
Inari Listenmaa
4bc0270ec4 small fixes 2017-10-03 16:31:25 +02:00
Inari Listenmaa
24c576f036 fixes/additions to tests 2017-10-03 16:31:11 +02:00
Inari Listenmaa
ea57e1ac6a Fix the RE in the grep 2017-10-03 16:25:23 +02:00
Inari Listenmaa
81bc4c1b6b formatting 2017-10-03 15:24:52 +02:00
Inari Listenmaa
57b81f5a7c Update README.md 2017-10-03 15:23:54 +02:00
Inari Listenmaa
103669d667 Add some simple tests for the Basque grammar 2017-10-03 15:20:52 +02:00
Inari Listenmaa
b46fcb757c fix some bugs in synthetic verbs 2017-10-03 15:19:27 +02:00
Inari Listenmaa
83dd57bd63 Fix bug in chooseAuxPol 2017-10-03 14:01:23 +02:00
Inari Listenmaa
9a3115815d Add new forms to zaio and dio 2017-10-03 14:00:51 +02:00
Inari Listenmaa
1426c07f97 fix linVP: use the same functions as mkClause 2017-10-02 16:16:28 +02:00
Inari Listenmaa
1c9e90f74d small fixes and additions 2017-10-02 16:05:25 +02:00
Inari Listenmaa
4cdbb0ec89 fix typo and remove commented out line 2017-10-02 15:25:05 +02:00
Inari Listenmaa
5b91023e0e Make adjectives depend on agreement; Fix reflexives 2017-10-02 15:22:11 +02:00
Inari Listenmaa
9c77f9d990 changes suggested by Manex 2017-10-02 11:02:07 +02:00
Ayberk Tosun
76d6749797 Complete AdjectiveTur (#12)
* remove unnecessary flags from GrammarTur.gf

* Implement the linearization for UseA2

* Minor formatting fixes

* Manually specify the preposition "ile" for married_A2

* Implement the linearization for ComplA2

* Implement the linearization for ReflA2 ("kendi ile evli")

* Fix ReflA2 adjective case to Nom

* Add a TODO comment

* Add a linearization for AdAP

* Implement the linearization for UseA2

* Minor formatting fixes

* Manually specify the preposition "ile" for married_A2

* Implement the linearization for ComplA2

* Implement the linearization for ReflA2 ("kendi ile evli")

* Fix ReflA2 adjective case to Nom

* Add a TODO comment

* Add a linearization for AdAP

* Fix AdAP

* Add linearization for at_most_AdN

* Add linearization for at_least_AdN

* added dummies for the missing modules in Turkish

* Add the linearization for as_CAdv

* Add rudimentary linearization for UsePN

* Add the linearization for CAdvAP

* Add preliminary linearization for EmbedVP

* Add linearization stub for SentAP

* Fix code-formatting and indentation in HarmonyTur

* Patterns for front and back vowels

* Add an oper for attaching the -mA suffix

* Formatting fixes in ParadigmsTur

* Attempt to implement attachMe

* Almost-working linearization for SentAP

* Update TODO for SentAP

* Move the addition of suffix si to the linearization of EmbedVP

* Import PhraseTur in GrammarTur

* Fix the duplication of PhraseTur in GrammarTur

* Start working on PhraseTur

* Fix formatting of makeH4Table

* Formatting

* Begin implementing the gerund inflection `makeVerb`

* Attach Number and Case data to the Gerund constructor of param VForm

* Get rid of hacky appending of "si" in EmbedVP
2017-09-30 13:29:03 +02:00
Aarne Ranta
432a6295cc Pes: fixed have_V2 inflection and ra ; fixed SOV in ClSlash 2017-09-18 10:31:28 +02:00
Aarne Ranta
1569344857 Pes.have_V2 from Nasrin 2017-09-15 14:51:02 +02:00
Aarne Ranta
ca83d4be7d invariable verb must_VV in persian 2017-09-14 18:03:32 +02:00
Aarne Ranta
29380f0df0 experimenting with Persian auxiliary verbs 2017-09-14 11:55:30 +02:00
Inari Listenmaa
9c8cb395f5 fix crap_V in DictionaryEst 2017-09-04 14:29:45 +02:00
Aarne Ranta
21bf7aa5a9 added a case for compN in ParadigmsSpa.mkN 2017-09-04 11:08:40 +02:00
Inari Listenmaa
c2ed0cee49 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-29 15:44:54 +02:00
Inari Listenmaa
67e57115ac Add some more extensions 2017-08-29 15:44:44 +02:00
Inari Listenmaa
c2afe95878 Add ExtendEst 2017-08-29 15:43:31 +02:00
Inari Listenmaa
5644350c0f change relPron from kes to mis; small cleanup 2017-08-29 15:43:06 +02:00
Inari Listenmaa
6d9c1c6c90 minor cleanup 2017-08-29 14:31:37 +02:00
Inari Listenmaa
653b8b08d6 Add PresPart into VIForm 2017-08-29 14:31:07 +02:00
Aarne Ranta
945732f695 some edits of Extend 2017-08-29 11:54:41 +02:00
Inari Listenmaa
336cbf90ab add a few functions from VP -> Adv 2017-08-28 17:18:58 +02:00
Inari Listenmaa
e7a2920508 fix a few words 2017-08-28 17:18:29 +02:00
Inari Listenmaa
8342634d75 change a suspiciouslooking hardcoded 'olla' into verbOlema.s ! Inf i in predV; remove some redundant code in insertXxx opers. 2017-08-28 17:18:14 +02:00
Inari Listenmaa
c0f3f43350 Add comitative and elative modifiers of type NP -> CN -> CN; use shortPronoun in ma_Pron,sa_Pron etc 2017-08-28 17:17:04 +02:00
Kaarel Kaljurand
919d8c74cf Est RG: Improve noun smart paradigms + fix 2 words
- small improvements to noun smart paradigms (originally done 3 years ago, something to do with syllable/stress detection)
- two words corrected
- some typos fixed in source code comments
2017-08-27 12:36:11 +03:00
Inari Listenmaa
c11ff12602 Add Basque Translate grammar into the Makefile 2017-08-25 15:53:33 +03:00
Inari Listenmaa
a813403c48 update a comment about locative genitive 2017-08-25 15:53:14 +03:00
Inari Listenmaa
0004a3ff3c Add Translate grammar for Eus (lot of functions still commented out) and Dictionary, converted by Francis Tyers from Apertium resources 2017-08-25 15:43:10 +03:00
Inari Listenmaa
b01f2ebd90 Add ChunkEus 2017-08-25 15:40:52 +03:00
Inari Listenmaa
1d2bd65019 Small fixes in order to make Extensions and Translate grammar and Chunk to work 2017-08-25 14:43:55 +03:00
Thomas Hallgren
0d07bd9289 Merge https://github.com/GrammaticalFramework/GF 2017-08-24 18:20:03 +02:00
Krasimir Angelov
2d8af8a11b Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-24 18:11:19 +02:00
Inari Listenmaa
94235f96fa add Basque to the library synopsis makefiles 2017-08-24 19:02:09 +03:00
Inari Listenmaa
8524facfd2 Fix UttVP to not include 3rd person singular auxiliary 2017-08-24 19:01:27 +03:00
Inari Listenmaa
8ffd8cd979 Remove Basque from the list of incomplete languages. 2017-08-24 18:35:13 +03:00
Inari Listenmaa
6ae3c0fb08 Add Basque to the RGL 2017-08-24 18:30:24 +03:00
Inari Listenmaa
792b58abe3 Add a variant of mkAdv : Adv -> AdvType -> Adv that fixes the existing Adv with the given AdvType. 2017-08-24 16:16:31 +03:00
Aarne Ranta
2313f6ee40 updated Spa and Swe Extend 2017-08-23 22:08:24 +03:00
Krasimir Angelov
ec432a4655 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-23 18:54:18 +02:00
Aarne Ranta
6c6141befd VPSlash conjunctions in Extend; AllEng now inherits ExtendEng rather than ExtraEng 2017-08-23 17:49:30 +03:00
Krasimir Angelov
972dd47a8e Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-23 15:42:15 +02:00
Ayberk Tosun
293c9ae76a Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-23 16:37:28 +03:00
Ayberk Tosun
99cdc28faf Formatting fixes 2017-08-23 16:32:49 +03:00
Inari Listenmaa
2dabed6583 fix it_Pron according to Alberto's suggestion 2017-08-23 16:25:33 +03:00
Ayberk Tosun
e621fbbdcd Indentational fixes 2017-08-23 15:51:06 +03:00
Ayberk Tosun
7bb404638a Linearization for AdjOrd as just the id function 2017-08-23 15:40:33 +03:00
Ayberk Tosun
be6a44e573 Implement DetQuantOrd 2017-08-23 15:38:24 +03:00
Ayberk Tosun
b2a155b309 Add the linearization for but_PConj 2017-08-23 15:24:15 +03:00
Ayberk Tosun
08c089c5a4 Implement AdvNP 2017-08-23 15:18:35 +03:00
Ayberk Tosun
80ad54000c Implement AdvCN 2017-08-23 15:15:59 +03:00
Ayberk Tosun
9d4a8009c8 Add linearization for always_AdV 2017-08-23 14:56:29 +03:00
Ayberk Tosun
0d836f7152 Add always_AdV [WIP] 2017-08-23 14:51:09 +03:00
Ayberk Tosun
c2b97c9098 Indentation 2017-08-23 14:28:59 +03:00
Ayberk Tosun
458b894596 Alternative linearization for in_Prep 2017-08-23 14:21:53 +03:00
Ayberk Tosun
0a2f8fc184 Space before semicolon 2017-08-23 14:21:05 +03:00
Ayberk Tosun
ce2c441352 Add yes_Utt and no_Utt 2017-08-23 12:27:57 +03:00
Ayberk Tosun
f004826f0a Implement during_Prep 2017-08-23 12:16:04 +03:00
Ayberk Tosun
f0519551c4 Add linearization for in_Prep 2017-08-23 12:12:55 +03:00
Ayberk Tosun
cc50be36b0 Import AdverbTur only from GrammarTur 2017-08-23 12:09:08 +03:00
Ayberk Tosun
9aeefb540e Implement on_Prep 2017-08-22 18:57:57 +03:00
Ayberk Tosun
46c5af65d0 Implement and_Conj and or_Conj 2017-08-22 18:53:58 +03:00
Ayberk Tosun
359be0d077 Add some comments for the prepositions 2017-08-22 18:48:34 +03:00
Ayberk Tosun
d4a345e830 Fix with_Prep 2017-08-22 18:38:01 +03:00
Ayberk Tosun
45c2394353 Implement between_Prep though ConjNP is needed for it 2017-08-22 18:34:10 +03:00
Ayberk Tosun
4d8a5e9a05 Implement behind_Prep 2017-08-22 18:32:19 +03:00
Ayberk Tosun
9b255d39aa Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-22 17:49:59 +03:00
Ayberk Tosun
d06a76bab9 Various cleanups 2017-08-22 17:49:40 +03:00
Ayberk Tosun
4b0e198742 Implement PrepNP 2017-08-22 17:49:25 +03:00
Ayberk Tosun
5734469aa2 Add some prepositions 2017-08-22 17:49:00 +03:00
Inari Listenmaa
b2681a8f0c make kiss_V2 transitive 2017-08-22 17:36:47 +03:00
Ayberk Tosun
baaa8ca2e5 Create AdverbTur.gf 2017-08-22 17:14:34 +03:00
Ayberk Tosun
98e6a250b4 Fix indentation 2017-08-22 16:59:27 +03:00
Ayberk Tosun
c53dd7e2ea Clean StructuralTur up 2017-08-22 16:57:27 +03:00
Ayberk Tosun
2c32566d3a Minimum viable implementation for MassNP 2017-08-22 16:42:56 +03:00
Aarne Ranta
a73a067d7a instructions for LibraryBrowser usage 2017-08-22 16:30:50 +03:00
Ayberk Tosun
3cb82fb035 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-22 16:16:43 +03:00
Ayberk Tosun
d24bf91330 UseIndef in IndefArt 2017-08-22 16:16:34 +03:00
Aarne Ranta
c982c1fc83 large version of LibraryBrowser using the translator Dictionary 2017-08-22 16:15:26 +03:00
Ayberk Tosun
a9a3d48c7f Get rid of some trailing spaces 2017-08-22 14:18:22 +03:00
Aarne Ranta
55f914f444 started automated documentation of Extend module 2017-08-22 12:39:17 +03:00
Ayberk Tosun
7f98c3198e Implement ComplSlash 2017-08-22 12:36:27 +03:00
Ayberk Tosun
7bc30b77f4 Give the lincat for VPSlash 2017-08-22 12:24:14 +03:00
Ayberk Tosun
90032d0438 Make mkClause take an Agr 2017-08-22 12:18:18 +03:00
Ayberk Tosun
af62b770b0 Do the necessary imports in VerbTur 2017-08-22 12:17:46 +03:00
Ayberk Tosun
27da43c37d Some progress on the implementation of mkClause 2017-08-22 12:03:59 +03:00
Ayberk Tosun
27357ad684 Create the VerbTur module 2017-08-22 11:59:19 +03:00
Ayberk Tosun
3bcbf6d25d Use mkClause in the linearization of PredVP 2017-08-22 11:56:23 +03:00
Ayberk Tosun
a112b13d9f Start working on mkClause for Turkish 2017-08-22 11:56:11 +03:00
Ayberk Tosun
6e9d4ac20e Declare VP = Verb 2017-08-22 11:55:54 +03:00
Ayberk Tosun
caad211a9f Create the SentenceTur module 2017-08-22 11:50:57 +03:00
Ayberk Tosun
f4b092fb47 Remove trailing space 2017-08-22 11:48:43 +03:00
Ayberk Tosun
e649df1012 Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-22 11:39:13 +03:00
Ayberk Tosun
2665910dc2 Define the param UseGen and make use of that 2017-08-22 11:38:38 +03:00
Aarne Ranta
db4c7a4d9f added the old testsuite to lib/treebanks 2017-08-22 08:56:45 +03:00
Aarne Ranta
808e85ef05 started a directory with RGL treebanks 2017-08-21 22:28:12 +03:00
Krasimir Angelov
45a117a66c Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-21 20:42:52 +02:00
Krasimir Angelov
7a3ebdc5ea added linref AP in German 2017-08-21 20:42:18 +02:00
Aarne Ranta
41ab809c88 added full Lexicon and some new languages to the LibraryBrowser grammar 2017-08-21 21:36:03 +03:00
Ayberk Tosun
1362bbdd03 Add a useGen field 2017-08-21 18:16:44 +03:00
Aarne Ranta
d8e24c19da generated TopDictionaryUrd for checking the most common words 2017-08-21 17:15:52 +03:00
Ayberk Tosun
99c70256ca Work on the Dat and Gen cases of ComplN2 2017-08-21 17:11:59 +03:00
Ayberk Tosun
f19459929c Merge remote-tracking branch 'remotes/upstream/master' 2017-08-21 16:28:10 +03:00
Aarne Ranta
5f9c97528b Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-21 16:20:27 +03:00
Aarne Ranta
62225a2fd8 ChunkJpn import list updated 2017-08-21 16:20:13 +03:00
Krasimir Angelov
97bc980f79 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-21 15:08:55 +02:00
Krasimir Angelov
72a69c587c fixed typo 2017-08-21 15:03:38 +02:00
Ayberk Tosun
3b6663bb6d Start working on ComplN2 2017-08-21 15:59:44 +03:00
Aarne Ranta
639f544fa4 old DictUrd contents copied to DictionaryUrd 2017-08-21 15:18:02 +03:00
Aarne Ranta
15cbf9970c added ConstructionUrd and DocumentationUrd copied from Hin 2017-08-21 14:51:10 +03:00
Inari Listenmaa
73a056a061 Merge pull request #6 from Kaljurand/est-lexicon-fixes
Fixes to the Estonian lexicon
2017-08-21 14:43:36 +03:00
Kaarel Kaljurand
098e5da1cc Change "luu" to "kont" 2017-08-21 13:42:50 +02:00
Kaarel Kaljurand
619d1a2529 Fix typo 2017-08-21 13:35:23 +02:00
Kaarel Kaljurand
efdd763493 Add a TODO item 2017-08-21 13:22:45 +02:00
Aarne Ranta
7ef39967c1 removing commented-out must_VV from DictionaryUrd to avoid confusing line directions 2017-08-21 14:22:06 +03:00
Thomas Hallgren
80ea046102 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 13:15:46 +02:00
Aarne Ranta
6e1e5ba945 compilable TranslateUrd adapted from Hindi 2017-08-21 14:10:00 +03:00
Krasimir Angelov
9f7ae28879 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-21 13:06:50 +02:00
Krasimir Angelov
f671b709a9 fix in AdjCN for Turkish 2017-08-21 13:06:11 +02:00
Thomas Hallgren
9ffce1f505 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 09:40:03 +02:00
Inari Listenmaa
cf99782b5a Merge branch 'master' of https://github.com/GrammaticalFramework/GF 2017-08-21 10:26:57 +03:00
Inari Listenmaa
57242a05ba Add short forms of personal pronouns ; add võib-olla for maybe_Adv ; fix some nationality adjectives to use invA instead of mkA 2017-08-21 10:26:50 +03:00
Inari Listenmaa
ac4797f854 Add oper 'shortPronoun' for creating the short forms of the personal pronouns 2017-08-21 10:26:00 +03:00
Thomas Hallgren
9470699b9a Merge https://github.com/GrammaticalFramework/GF 2017-08-20 22:20:03 +02:00
Aarne Ranta
d365aedb35 additions to Extend from Romance and Ger extras 2017-08-20 23:05:33 +03:00
Krasimir Angelov
57591c01ec merge
Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF
2017-08-20 19:43:22 +02:00
Thomas Hallgren
364e0af345 Merge https://github.com/GrammaticalFramework/GF 2017-08-20 18:40:03 +02:00
Aarne Ranta
c14b35d714 as a template for future Extend modules, added Dut and Spa 2017-08-20 19:25:24 +03:00
Thomas Hallgren
6241d48b03 Merge https://github.com/GrammaticalFramework/GF 2017-08-20 18:00:03 +02:00
Aarne Ranta
6afcf80c04 most of ExtendEng in place 2017-08-20 18:56:05 +03:00
Krasimir Angelov
24cb6acd53 fixed more warnings in Turkish 2017-08-20 15:52:26 +02:00
Thomas Hallgren
3bf18eb2b9 Merge https://github.com/GrammaticalFramework/GF 2017-08-20 14:00:04 +02:00
Aarne Ranta
ae8e7d798a started Extend module to combine the functions of Extra and Extensions in a more disciplined way; design far from final yet 2017-08-20 14:48:48 +03:00
Krasimir Angelov
d0c7531dfa fix some warnings in the compilation of Turkish 2017-08-19 23:34:59 +02:00
Krasimir Angelov
128cae61d5 this/that_Quant in Turkish 2017-08-19 22:19:14 +02:00
Krasimir Angelov
a90662218f UseComparA in Turkish 2017-08-19 22:11:35 +02:00
Krasimir Angelov
3201407474 some fragments in the Turkish grammar 2017-08-19 22:04:46 +02:00
Inari Listenmaa
ca9bc14d02 Fix word order error in IdiomEst.ExistNP and IdiomEst.ExistIP 2017-08-17 16:05:44 +03:00
708 changed files with 699523 additions and 1545794 deletions

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
dist/
*.gfo
*.hi
*.o
*.pgf
*.tmp

27
.travis.yml Normal file
View 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
View 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
View 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
View 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
View File

@@ -0,0 +1,131 @@
![GF Logo](http://www.grammaticalframework.org/doc/Logos/gf1.svg)
# GF Resource Grammar Library (RGL)
[![Build Status](https://travis-ci.org/GrammaticalFramework/gf-rgl.svg?branch=master)](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
View 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
View 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
View 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
View 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

View File

@@ -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

File diff suppressed because it is too large Load Diff

65
doc/DocExtend.hs Normal file
View 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>"]

View File

@@ -21,7 +21,7 @@ interlingua = "Meaning"
languages = [
"afrikaans",
-- "አማርኛ",
-- "العربية",
"العربية",
"Български",
"català",
"中文",
@@ -45,6 +45,7 @@ languages = [
"پeرسن",
"polski",
"پنجابی",
"português",
"Русский",
"ٻولي",
"español",

View File

@@ -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

View File

@@ -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

View File

@@ -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 (/= '-')

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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"]);

View File

@@ -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

View File

@@ -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"]);

View File

@@ -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;
}

View File

@@ -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}

View File

@@ -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.

View File

@@ -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" />
&nbsp;<span id="count">0</span> items&nbsp;
<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" />
&nbsp;<span id="count">0</span> items&nbsp;
<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

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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();
});
};

View File

@@ -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;
}

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

19
doc/gfdoc/Makefile Normal file
View 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"

View File

@@ -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>

View File

@@ -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]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

View File

@@ -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.

View File

@@ -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

View File

@@ -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").

View File

@@ -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 */

View File

@@ -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"

View File

@@ -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 ;
```

View File

@@ -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())

View File

@@ -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>

View File

@@ -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>

File diff suppressed because it is too large Load Diff

76
doc/synopsis/Makefile Normal file
View 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
View 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]

View File

@@ -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

View File

@@ -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

View File

@@ -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//

View File

@@ -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.

View File

@@ -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]

View File

@@ -0,0 +1 @@
<script src="quicklinks.js"></script>

124
doc/synopsis/quicklinks.js Normal file
View 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
View 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
View 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>

View File

@@ -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
View 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
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis
2 Afr Afrikaans afrikaans n y
3 Amh Amharic amharic n n n
4 Ara Arabic arabic y y
5 Bul Bulgarian bulgarian y y
6 Cat Catalan catalan Romance y y y
7 Chi Chinese (simplified) chinese y
8 Dan Danish danish Scand y y
9 Dut Dutch dutch y y
10 Eng English english y y y
11 Est Estonian estonian y
12 Eus Basque basque y
13 Fin Finnish finnish y y y
14 Fre French french Romance y y y
15 Ger German german y
16 Grc Ancient Greek ancient_greek y n n n
17 Gre Greek greek y
18 Heb Hebrew hebrew n n n
19 Hin Hindi hindi Hindustani to_devanagari y y
20 Hun Hungarian hungarian y n n n n
21 Ice Icelandic icelandic n y
22 Ina Interlingua interlingua y n n n
23 Ita Italian italian Romance y y y
24 Jpn Japanese japanese y
25 Lat Latin latin y n n n
26 Lav Latvian latvian y y
27 Mlt Maltese maltese y
28 Mon Mongolian mongolian n y
29 Nep Nepali nepali n y
30 Nno Norwegian (nynorsk) nynorsk y y
31 Nor Norwegian (bokmål) norwegian Scand y y
32 Pes Persian persian y
33 Pnb Punjabi punjabi y y
34 Pol Polish polish y
35 Por Portuguese portuguese Romance y y y
36 Ron Pomanian romanian y y
37 Rus Russian russian y y
38 Snd Sindhi sindhi y
39 Spa Spanish spanish Romance y y y
40 Swa Swahili swahili n n n y n
41 Swe Swedish swedish Scand y y y
42 Tel Telugu telugu y n n n n
43 Tha Thai thai to_thai y
44 Tur Turkish turkish n n n
45 Urd Urdu urdu Hindustani y

View File

@@ -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

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View 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"

View File

@@ -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 = {

View File

@@ -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
View 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)
}

View File

@@ -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.

View File

@@ -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 ;

View File

@@ -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

View 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