summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-01-17Adding -output-format canonical_gfThomas Hallgren
This output format converts a GF grammar to a "canonical" GF grammar. A canonical GF grammar consists of - one self-contained module for the abstract syntax - one self-contained module per concrete syntax The concrete syntax modules contain param, lincat and lin definitions, everything else has been eliminated by the partial evaluator, including references to resource library modules and functors. Record types and tables are retained. The -output-format canonical_gf option writes canonical GF grammars to a subdirectory "canonical/". The canonical GF grammars are written as normal GF ".gf" source files, which can be compiled with GF in the normal way. The translation to canonical form goes via an AST for canonical GF grammars, defined in GF.Grammar.Canonical. This is a simple, self-contained format that doesn't cover everyting in GF (e.g. omitting dependent types and HOAS), but it is complete enough to translate the Foods and Phrasebook grammars found in gf-contrib. The AST is based on the GF grammar "GFCanonical" presented here: https://github.com/GrammaticalFramework/gf-core/issues/30#issuecomment-453556553 The translation of concrete syntax to canonical form is based on the previously existing translation of concrete syntax to Haskell, implemented in module GF.Compile.ConcreteToHaskell. This module could now be reimplemented and simplified significantly by going via the canonical format. Perhaps exports to other output formats could benefit by going via the canonical format too. There is also the possibility of completing the GFCanonical grammar mentioned above and using GF itself to convert canonical GF grammars to other formats...
2019-01-07add CoNLLU as output format for gf2ud: merging issue (#24)Prasanth Kolachina
2019-01-07Merge pull request #24 from odanoburu/gf2ud-commentsPrasanth Kolachina
(gf2ud) add comments to CoNLL-U output
2018-12-20fix after the change in bracketed stringKrasimir Angelov
2018-12-20revert to printing the unique id in ppBracketedStringKrasimir Angelov
2018-12-20save the original concrete category in BracketedStringKrasimir Angelov
2018-12-19(gf2ud) add comments to CoNLL-U outputodanoburu
when debbuging labels, I find it useful to have comments saying what's the original sentence (lazy, I know) and the original tree (depending on the treebank, the trees can be similar). I know this is not the goal exactly, but UDv2 treebanks (http://universaldependencies.org/format.html) should always have a 'text =' comment, and a 'sent_id =' comment (which would be easy to implement too, but not that useful).
2018-12-18added the possibility to annotate features of syncat words, e.g. @"is" PresSg3Aarne Ranta
2018-12-18refactored cnc configfile parsing a bitAarne Ranta
2018-12-18Merge branch 'master' into masterAarne Ranta
2018-12-18morph. feat generation by ARPrasanth Kolachina
2018-12-18added morphological tags to UD tree output. Tags are give in ↵Aarne Ranta
CncConfiguration, e.g. @N Sg Pl. Default tag is Cat-offset, as defined for each Cat in pgf
2018-12-17allow comments in dependency configs and fix conll outputPrasanth Kolachina
2018-12-16a pool where the smallest chunks are memory pageskrangelov
2018-12-01GF.Main: leave the code page unchanged on WindowsThomas Hallgren
This should make it easier to use GF with UTF-8 in the Windows Console See https://groups.google.com/forum/#!topic/gf-dev/DCou6FDhCnU
2018-12-01dealing with ',' as syncategorematic tokenAarne Ranta
2018-11-30Fix deprecations from containers >= 0.4.0.0Peter Ljunglöf
E.g. `foldWithKey` has been deprecated since 0.4.0.0 (November 2010)[1] and has been removed in 0.6.0.1 (2018)[2] [1]: https://github.com/haskell/containers/blob/master/changelog.md#0400--nov-2010 [2]: https://github.com/haskell/containers/blob/master/changelog.md#death-of-deprecated-functions (commit originally by @fredefox)
2018-11-28fixed a bug in the cnclabel formatAarne Ranta
2018-11-28Revert "Completely remove uses of example-based"John J. Camilleri
This reverts commit 69cea20dac8ac73fa0a61ed4ff427d2524ee253b.
2018-11-28Revert "remove the example-based folder. The code is still in the archive"John J. Camilleri
This reverts commit 05c2cfb628147f7d6fa0a6c2f38eb9d67b2eb007.
2018-11-28Completely remove uses of example-basedJohn J. Camilleri
2018-11-28remove the example-based folder. The code is still in the archiveKrasimir Angelov
2018-11-28Merge branch 'master' of https://github.com/GrammaticalFramework/gf-coreKrasimir Angelov
2018-11-28remove two obsolete optionsKrasimir Angelov
2018-11-28Remove Htmls.hsJohn J. Camilleri
2018-11-28remove gf-server.cabalJohn J. Camilleri
2018-11-28remove custom-binary flag; update Cabal version restriction; bump version to ↵John J. Camilleri
3.10
2018-11-27expose PGF and Concr for FFIKrasimir Angelov
2018-11-15Remove `src/ui` folder, moved to:John J. Camilleri
https://github.com/GrammaticalFramework/gf-offline-translator
2018-11-07Move unused `pgf-binary` into its own repository, at:John J. Camilleri
https://github.com/GrammaticalFramework/pgf-binary
2018-10-19Add {-# LANGUAGE GADTs -#} to the generated Haskell fileInari Listenmaa
2018-10-16gf -cshell bug fixThomas Hallgren
The functions cExpr and hsExpr in GF.Command.Commands2 need to handle string literals.
2018-10-15Merge branch 'master' of https://github.com/GrammaticalFramework/gf-coreKrasimir Angelov
2018-10-15hide the compatibility APIKrasimir Angelov
2018-10-10Comment out links to some old demos that no longer workThomas Hallgren
2018-09-21option rf -paragraphsAarne Ranta
2018-08-06A version of `readPGF` where the user handles the IO.Frederik Hanghøj Iversen
2018-07-31gf-server.cabal: relax network version bounds and make building the library ↵Thomas Hallgren
and pgf-service executable optional This allows you to build the content-service without installing the problematic fastcgi library.
2018-07-26Minimal update with new repo URLs & build instructionsJohn J. Camilleri
2018-07-22GF_LIB_PATH can now be path1:path2:path3, not just path1meng wong
Traditionally, GF_LIB_PATH points to something like `.../share/ghc-8.0.2-x86_64/gf-3.9/lib` and if you want prelude and alltenses and present, you add a `--# -path=.:present` compiler pragma to the top of your .gf file But if you are developing some kind of application grammar library or contrib of your own, you might find yourself repeating your library path at the top of all your .gf files. After painstakingly maintaining the same library path at the top of all your .gf files, you might say, let's factor this out into GF_LIB_PATH. Then you might then find to your surprise that GF_LIB_PATH doesn't accept the usual colon:separated:path notation familiar from, say, unix PATH and MANPATH. This patch allows you to define `GF_LIB_PATH=gf-3.9.lib:$HOME/gf-contrib/whatever/lib` in a more natural way. If you are an RGL hacker and have your own version of the RGL tree sitting somewhere, you should be able to have both paths in the GF_LIB_PATH, for added convenience. This minor convenience will probably lead to obscure bugs and great frustration when you find that your changes are mysteriously not being picked up by GF; so keep this in mind and use it cautiously. This caution should probably sit in the documentation somewhere. A subsequent commit will do that. If you use zsh, you can do this to quickly build up a big GF_LIB_PATH: % gf_lib_path=( $HOME/src/GF/lib/src/{api,abstract,common,english,api/libraryBrowser,prelude,..} ) % typeset -xT GF_LIB_PATH gf_lib_path
2018-07-04Remove code which tries to get version information from darcs folderJohn J. Camilleri
2018-06-27GF.Server: add 'import Control.Applicative' for compatibilit with GHC<7.10Thomas Hallgren
One could also add stricter version constraints in gf.cabal, e.g. base>=4.8 (implies GHC>=7.10) if we want to only support building with GHC>=7.10.
2018-06-27undo the partial fix for word completion since it breaks normal parsingKrasimir Angelov
2018-06-20a simple fix for the linearizerKrasimir Angelov
2018-06-20Revert "when linearizing missing functions with brackets, the name of the ↵Krasimir Angelov
function should still be reported" This reverts commit 18204bdd25bd460904ac475f3ea340daa96589df.
2018-06-20Revert "forgot to switch off the debugger"Krasimir Angelov
This reverts commit 5919dfa3366dfd2f2af8c3ce7749d066a2033f0d.
2018-06-20forgot to switch off the debuggerKrasimir Angelov
2018-06-20when linearizing missing functions with brackets, the name of the function ↵Krasimir Angelov
should still be reported
2018-06-20added bracketedLinearizeAllKrasimir Angelov
2018-06-20bracketedLinearize in Haskell now emits the BIND constructor like in JavaKrasimir Angelov