1
0
forked from GitHub/gf-core
Commit Graph

103 Commits

Author SHA1 Message Date
kr.angelov
709f5dfcd8 small fixes in the C runtime 2014-03-25 13:57:57 +00:00
kr.angelov
bc81d163fb whitespace cleanup in the parser 2014-03-18 10:19:35 +00:00
kr.angelov
1a1e7cdb2e compute the right word probability 2014-03-12 15:36:40 +00:00
kr.angelov
a77dc568bb added pgf_lookup_word_prefix which makes it possible to do simple word prediction 2014-03-07 21:24:20 +00:00
kr.angelov
6028a63b42 loading and unloading of languages in the C runtime and in the Python bindings 2013-12-10 15:00:52 +00:00
kr.angelov
cddc19a5ad bugfix in the debug mode for the parser 2013-11-22 12:26:49 +00:00
kr.angelov
e77c19c783 bugfix in the C runtime 2013-11-21 14:31:28 +00:00
kr.angelov
33a76f1cd5 bugfix in the robust parser 2013-11-18 09:05:27 +00:00
kr.angelov
63a90f34af bugfix in the C runtime which had made the parser up to 200 times slower for some sentences 2013-11-13 15:15:28 +00:00
kr.angelov
1d7b6f44b6 added Predef.SOFT_BIND. This special token allows zero or more spaces between ordinary tokens. It is also used in the English RGL to attach the commas to the previous word. 2013-11-12 09:54:57 +00:00
kr.angelov
6729cca568 factor of 3 speedup for the translation without slowing down the grammar loading. The parser still seems to be 8 times slower than before I introduced the BIND. At least the Android UI now feels a lot more comfortable 2013-11-07 11:14:32 +00:00
kr.angelov
6c71830c10 fix in the parsing with pre 2013-11-06 16:25:25 +00:00
kr.angelov
475f213c99 the content of ParseEngAbs3.probs is now merged with ParseEngAbs.probs. The later is now retrained. Once the grammar is compiled with the .probs file now it doesn't need anything more to do robust parsing. The robustness itself is controlled by the flags 'heuristic_search_factor', 'meta_prob' and 'meta_token_prob' in ParseEngAbs.gf 2013-11-06 10:21:46 +00:00
kr.angelov
d7cd5ba195 fix the robust parser for unknown tokens 2013-11-01 13:05:17 +00:00
kr.angelov
8019d3a615 use linref in the C linearizer. The robust linearization is now fully supported 2013-10-30 21:43:52 +00:00
kr.angelov
43fb9b3b7a added the linref construction in GF. The PGF version number is now bumped 2013-10-30 12:53:36 +00:00
kr.angelov
56893dbf54 another fix for 'pre' 2013-10-28 13:54:06 +00:00
kr.angelov
841880144d fix the handling of 'pre' in the C runtime 2013-10-28 12:35:37 +00:00
kr.angelov
e3dc98dd0f bugfix for the custom literals in the C runtime 2013-10-21 12:34:57 +00:00
kr.angelov
82544f74c0 avoid warning in parser.c when debugging is OFF 2013-10-09 13:41:02 +00:00
kr.angelov
b058fdd17d a major redesign in the C runtime. The parser and the linearizer now fully support BIND. The following things are still broken: parseval, word completion, handling 'pre', the robust mode 2013-10-09 12:08:51 +00:00
kr.angelov
adc952a61d fix the robust parser after the change of GuString 2013-10-08 15:00:42 +00:00
kr.angelov
2f78333e28 GuString is now an ordinary C string - it makes live easier. In addition PgfSymbolKS, PgfExprFun and PgfLiteralStr now keep their strings as embedded flexible arrays. The latest change gives us the same compactness as the old representation but it is a lot easier to use. 2013-10-04 12:04:39 +00:00
kr.angelov
c4f68adca9 better handling for nonExist in the C runtime. BIND is also supported in the linearizer but not in the parser yet 2013-09-30 10:25:39 +00:00
kr.angelov
efa4bc4d62 a major refactoring in the C and the Haskell runtimes. Note incompatible change in the PGF format!!!
The following are the outcomes:

   - Predef.nonExist is fully supported by both the Haskell and the C runtimes

   - Predef.BIND is now an internal compiler defined token. For now
     it behaves just as usual for the Haskell runtime, i.e. it generates &+.
     However, the special treatment will let us to handle it properly in 
     the C runtime.

   - This required a major change in the PGF format since both 
     nonExist and BIND may appear inside 'pre' and this was not supported
     before.
2013-09-27 15:09:48 +00:00
kr.angelov
65ea8814aa fix the debug mode of the parser after the refactoring in libgu 2013-09-25 10:21:35 +00:00
kr.angelov
f984bfeb24 a major refactoring in the C runtime. GuList is now removed and replaced with GuSeq. The GuSeq/GuBuf API is simplified 2013-09-17 12:45:00 +00:00
kr.angelov
d5438439dc remove leftcorner_cat_idx which is now redundant 2013-09-13 13:49:17 +00:00
kr.angelov
605772fda1 minor optimization/refactoring in the grammar reader 2013-09-13 11:02:17 +00:00
kr.angelov
239eb22df5 the leftcorner indexing is now completely removed since it slowed down the loading without speeding up parsing a lot 2013-09-13 10:26:33 +00:00
kr.angelov
40baee9068 fix the debug mode of the parser after the changes in the libgu API 2013-09-13 09:58:20 +00:00
kr.angelov
d51b976d29 remove the logging from libgu 2013-09-12 09:30:02 +00:00
kr.angelov
83ca6c4f9f remove the read and write modules from libgu. this simplifies the i/o layer 2013-09-05 11:20:39 +00:00
kr.angelov
49c7a029b6 remove the dependency on the HAVE_STATEMENT_EXPRESSIONS flag. This reduces the dependency on the ./configure script 2013-09-04 10:06:07 +00:00
kr.angelov
288bcafb79 nonExist now does the expected thing 2013-08-23 13:17:45 +00:00
kr.angelov
68b6e97251 fix in the C parser 2013-08-21 13:09:21 +00:00
kr.angelov
2d4f17e30c word completion in the C runtime now returns multi-word expressions and the category for every expression 2013-08-19 15:34:19 +00:00
kr.angelov
37b9ed9236 fullFormLexicon in C and Python 2013-08-19 12:16:30 +00:00
kr.angelov
a8ded63c95 implemented lookupMorpho for C and Python 2013-08-16 15:02:24 +00:00
kr.angelov
4f7369f714 the parser in the C runtime now checks for duplicated results 2013-07-03 12:30:30 +00:00
kr.angelov
1b41792237 C runtime: fix the debug modes in the parser and in the reasoner after the changes in the printer 2013-06-27 11:00:26 +00:00
kr.angelov
dba75911b0 patch for adjustable heuristics from Python 2013-06-26 07:36:03 +00:00
kr.angelov
2eb37f6407 bug fix in the management of memory pools in the statistical parser 2013-05-07 08:30:32 +00:00
kr.angelov
561e478ed4 the statistical parser is now using two memory pools: one for parsing and one for the output trees. This means that the memory for parsing can be released as soon as the needed abstract trees are retrieved, while the trees themselves are retained in the separate output pool 2013-05-06 15:28:04 +00:00
kr.angelov
307e0854ed fix the leftcorner filtering after the addition of word completion 2013-05-05 10:30:06 +00:00
kr.angelov
9cdd96363a word completion in the C runtime. The runtime/python/test.py example is now using readline with word completion 2013-05-01 06:09:55 +00:00
kr.angelov
6cc44193b8 finally the statistical parser is able to return all possible abstract trees 2013-04-26 20:44:01 +00:00
kr.angelov
650e1cfa43 the calculation of lexical_prob in the statistical parser doesn't work properly. It should be fixed but for now I just disabled the optimization 2013-03-20 12:28:52 +00:00
kr.angelov
fec34e7622 replace #if with #ifdef when checking for the optional bottom up filtering in the C runtime 2013-03-20 10:47:47 +00:00
kr.angelov
1ddcfc219e the bottom up filtering in the C runtime is temporary disabled. It takes too much memory and even makes it impossible to load the Finnish and the German parsing grammars. 2013-03-19 10:59:44 +00:00