Commit Graph

4950 Commits

Author SHA1 Message Date
aarne
4eef06e38e started GF FAQ; not yet publishable 2012-12-28 10:57:46 +00:00
hallgren
12dec2503d bug fix in the new partial evaluator
It can leave wildcard tables in their origial form, but it easy to handle
them in the unfactor function in GeneratePMCFG.
2012-12-20 16:41:43 +00:00
aarne
5ff33f47be added alltenses to the default search path (just like prelude) 2012-12-20 16:05:34 +00:00
hallgren
d968503d90 PGFService.hs: code duplication reduction 2012-12-20 00:15:18 +00:00
hallgren
ece3e33c52 partial evaluator bug fix
It failed to delay table selection when the selector contains a run-time
variable, causing "gf: Prelude.(!!): index too large" instead.

Also:
  + Show better source locations on unexpected errors, to aid bug hunting.
  + Removed unused SourceGrammar argument to value2term.
2012-12-19 23:12:37 +00:00
hallgren
b4207d1b00 GF.Grammar.Lookup: new function lookupResDefLoc
It's like lookupResDef but it includes a source location in the output.
2012-12-19 23:08:56 +00:00
kr.angelov
75696808a7 bugfix: the linearizer should not generate extra space at the end of the sentence 2012-12-19 11:18:34 +00:00
kr.angelov
87360ccc34 bugfix for linearization of metavariables at the root of a tree 2012-12-19 10:03:05 +00:00
kr.angelov
a28ccc965c rename linearize.{h/c} to linearizer.{h/c} which follows the convention used in parser.c and reasoner.c 2012-12-19 09:17:24 +00:00
kr.angelov
490a3f2286 a major reimplementation of the linearizer in the C runtime 2012-12-19 09:07:05 +00:00
kr.angelov
ff49d21d13 fixed accidental bug in pgf-parse.c 2012-12-18 15:42:04 +00:00
hallgren
c3beefba47 partial evaluator bug fix
Int was missing from the list of predefined canonical constants.
2012-12-18 13:03:20 +00:00
kr.angelov
403420be2b the C runtime now can read abstract expressions with literals and meta variables 2012-12-18 12:29:30 +00:00
normundsg
cf0d94c1b0 Some fixes to the Russian Phrasebook 2012-12-17 09:57:13 +00:00
kr.angelov
d12c604f9a debugging infrastructure in the reasoner 2012-12-14 21:25:00 +00:00
kr.angelov
16a2c38f38 bugfix for the reasoner in the C runtime 2012-12-14 21:24:17 +00:00
kr.angelov
8ec7ecacca a bit more flexible API for parsing in Python 2012-12-14 16:00:52 +00:00
kr.angelov
20aaa4a989 The first prototype for exhaustive generation in the C runtime. The trees are always listed in decreasing probability order. There is also an API for generation from Python 2012-12-14 15:32:49 +00:00
hallgren
9ab3a6034d Add language extension for ghc<7.4
FlexibleInstances does not imply TypeSynonymInstances, apparently.
2012-12-14 14:21:46 +00:00
hallgren
d7e3c869c2 More work on the new partial evaluator
The work done by the partial evaluator is now divied in two stages:
 - A static "term traversal" stage that happens only once per term and uses
   only statically known information. In particular, the values of lambda bound
   variables are unknown during this stage. Some tables are transformed to
   reduce the cost of pattern matching.
 - A dynamic "function application" stage, where function bodies can be
   evaluated repeatedly with different arguments, without the term traversal
   overhead and without recomputing statically known information.

Also the treatment of predefined functions has been reworked to take advantage
of the staging and better handle partial applications.
2012-12-14 14:00:21 +00:00
kr.angelov
f7a5eb0df1 bugfix in the lexer from the C runtime. the input sentence doesn't have to terminate with whitespace 2012-12-13 16:45:44 +00:00
kr.angelov
0f0b7158c9 added simple error handling in the Python test 2012-12-13 16:44:39 +00:00
kr.angelov
75c544027b added a simple test for the Python binding 2012-12-13 16:19:56 +00:00
kr.angelov
836b953b9d an initial API for parsing and linearization from Python 2012-12-13 15:39:07 +00:00
kr.angelov
14e721dda9 a top-level API for parsing in the C runtime 2012-12-13 14:44:33 +00:00
kr.angelov
68249a11d2 bugfix: the outside probability of a PgfItemConts must always be initialized to zero 2012-12-13 11:11:45 +00:00
kr.angelov
2dc8236170 bugfix: pgf_read_expr no longer requires a semicolon at the end of an abstract expression 2012-12-13 11:09:26 +00:00
kr.angelov
0891ef3f0f an initial Python binding to the C runtime 2012-12-12 11:29:39 +00:00
kr.angelov
aa13090b66 started an official API to the C runtime 2012-12-12 11:25:58 +00:00
hallgren
5e091d2e3d partial evaluator work
* Evaluate operators once, not every time they are looked up
* Remember the list of parameter values instead of recomputing it from the
  pattern type every time a table selection is made.
* Quick fix for partial application of some predefined functions.
2012-12-11 15:37:41 +00:00
john.j.camilleri
2623925e67 Syntax editor: unwrap feature 2012-12-11 15:09:16 +00:00
john.j.camilleri
6ef74e13d6 Syntax editor: link to about page 2012-12-11 09:48:44 +00:00
john.j.camilleri
ba3a497e41 Syntax editor: add about.html (and a Makefile for generating it) 2012-12-11 09:42:57 +00:00
kr.angelov
5779887f96 bugfix for robust parsing with multi-word units 2012-12-11 12:57:22 +00:00
hallgren
93da60fa04 GF home page: link to the Resource Grammar Library coverage map by Tommi Nieminen 2012-12-10 15:17:55 +00:00
hallgren
621291a575 Compute.ConcreteNew: add missing case for variant functions
Also adding a test case in the test suite for this.
2012-12-10 13:25:32 +00:00
aarne
45a2629ee5 added functions to Ron and Chi needed for YAQL 2012-12-09 19:01:19 +00:00
aarne
768bec4073 superlative agreement and position in PhrasebookFre 2012-12-07 15:37:37 +00:00
john.j.camilleri
953b6b573a Syntax editor: change startcat when wrapping top node 2012-12-07 15:32:31 +00:00
aarne
c4931fccaf fixed external case for countries in PhrasebookFin 2012-12-07 15:25:27 +00:00
hallgren
46b634f256 update debian/changelog 2012-12-07 14:22:14 +00:00
hallgren
db7063ebcc Make -new-comp the default and bump the version number to 3.3.11-darcs
* -new-comp (the new partial evaluator) is now chosen by default when you run
  cabal install (or cabal configure). To revert to using the old partial
  evaluator by default, use "cabal install -f-new-comp" (or
  "cabal configure -f-new-comp").

* Regardless of the configured default, you can choose which partial evaluator
  to use when you invoke gf by using the -new-comp or -old-comp command line
  option.

* The cc command in the GF shell uses the chosen partial evaluator by default,
  but you can override this by using "cc -new" or "cc -old".

The plan is that these flags will be romeved in a future version.
2012-12-07 14:01:42 +00:00
john.j.camilleri
904e8029fe Syntax editor: various small improvements...
- separate tree edit buttons from option buttons
- fix bug when wrapping on freshly imported ast
- add interface for import & export of ast
- cleaner internal implementation of Editor.add_refinement
- small style updates
2012-12-07 12:55:17 +00:00
hallgren
81f843ac06 Compute.ConcreteNew: bug fix for indirectly defined pattern macros
More changes are probably needed to make pattern macros first class values.
Also includes minor changes related to variants and error messages.
2012-12-06 16:44:03 +00:00
john.j.camilleri
32f085a4b5 Syntax editor: wrap now handles multiple possible positions for subtree 2012-12-04 15:45:41 +00:00
aarne
f5e4385fdd MiniresourceChi added as a cloud demo grammars 2012-11-27 13:27:07 +00:00
john.j.camilleri
314052f8d3 Syntax editor: add wrap feature 2012-12-03 14:02:47 +00:00
kr.angelov
e174f37940 added experimental script for chunking in the C runtime 2012-12-03 10:07:54 +00:00
kr.angelov
6e3321d712 added INSTALL file and updated README file for the C runtime 2012-12-03 09:09:08 +00:00
aarne
03c3c57290 produce error message instead of failure of irrefutable pattern Ok ty_C in GrammarToPGF, to help find compilation errors; the ones I've found are because an inherited abstract excludes something that the inherited concrete does not exclude. 2012-12-02 19:40:45 +00:00