krasimir
b3680b6025
merge the states for reasoning and evaluation into a single structure
2015-07-03 11:53:52 +00:00
krasimir
22773909bf
add function 'functions' in the Haskell binding to the C runtime
2015-06-30 20:42:19 +00:00
krasimir
616a24cba4
the NERC in C is now fully up-to-date with the other NERCs. In addition the NERC in Haskell and Java now refuses to recognize names that match words in the lexicon. The latest is useful for German
2015-05-19 07:26:56 +00:00
krasimir
ce05465365
the callbacks in C now take the concrete syntax as a parameter
2015-05-18 14:41:33 +00:00
krasimir
3649412ce2
use a temporary pool for linearizeAll in Haskell too
2015-04-27 19:39:16 +00:00
krasimir
fc4b39d65f
make linearizeAll in the Haskell binding lazy
2015-04-27 16:28:45 +00:00
aarne
2804160f07
some translate.probs decreased ; fine-tuning in pgf-hsbind-trans
2015-04-21 14:13:13 +00:00
krasimir
aebc868c22
fix in the Haskell binding for Windows
2015-04-20 09:55:15 +00:00
aarne
0add1bdb20
pgf-hsbind-trans now with linearizeAll
2015-04-17 14:33:28 +00:00
hallgren
78a34bc52b
pgf-shell.hs: remove call to performGC and document the 'i' command
2015-04-17 13:34:41 +00:00
krasimir
86e16d9e3d
added linearizeAll in the Haskell bindings
2015-04-17 12:33:22 +00:00
aarne
a5305f1d9f
simplified the example translator and renamed it to pgf-hsbind-trans
2015-04-16 13:51:18 +00:00
aarne
b908b2ba3f
extended pgf-shell functionalities: batch translation with many trees, and intervening context-dependent tree manipulation
2015-04-15 15:53:44 +00:00
hallgren
99f87c30d0
haskell-bind: add bindings to graphviz rendering functions for abstract&parse trees
2015-03-19 14:14:30 +00:00
krasimir
39bbe68adf
fix the missmatch between Int and CInt in the Haskell binding to the word alignment API. This was causing problems on 64-bit machines
2015-02-18 17:05:35 +00:00
krasimir
f3797bb313
fix the callback for unknown words as well
2015-02-18 16:47:33 +00:00
krasimir
a97dee067a
fix in the callback for names in the Haskell binding
2015-02-18 16:41:13 +00:00
kr.angelov
68a2f09590
added hasLinearization in the Haskell binding
2015-01-30 13:05:57 +00:00
hallgren
6b55ad88d4
PGF2: fixes for named entity callback function
2015-01-21 13:54:48 +00:00
hallgren
ffe1f74584
PGF2 & PGFService: enable callbacks for named entities and chunks in the c-parse & c-translate web requests
2015-01-21 10:41:12 +00:00
kr.angelov
790738c82b
fix conflicts
2015-01-21 08:35:20 +00:00
kr.angelov
79f8ab695c
added functionType in the Haskell API to the C runtime
2015-01-20 14:45:02 +00:00
hallgren
3f3df9a719
PGF2 & PGFService: work in progress on callbacks for nerc & chunks
2015-01-20 14:57:52 +00:00
hallgren
1fa59f7554
PGF2: introduced some type synonyms to make type signature more readable
2015-01-20 12:57:33 +00:00
kr.angelov
3bd40dbab6
API for word alignment in the C runtime and in the Haskell binding
2014-12-29 10:59:20 +00:00
kr.angelov
13f4af4910
bugfix and tiny optimization for callbacks from Haskell
2014-12-19 10:14:41 +00:00
kr.angelov
856683f79f
haddock comments for parseWithHeuristics
2014-12-19 09:05:51 +00:00
kr.angelov
f44f9a1b00
added mkStr to the Haskell binding
2014-12-19 08:58:02 +00:00
kr.angelov
bb1c1dd27c
added mkApp to the Haskell binding
2014-12-19 08:47:00 +00:00
kr.angelov
6b2ef03af9
fix in the Haskell binding
2014-12-16 10:35:56 +00:00
kr.angelov
990dce35ae
forgot to export parseWithHeuristics from Haskell
2014-12-16 10:33:45 +00:00
kr.angelov
9bc5349e62
change in the API for literals
...
The API in the C runtime as well as in the Haskell, Python and Java binding
is changed. Now instead of adding the literal callbacks to the concrete syntax
you need to supply them every time when you need to parse. The main reason is:
- referentially transparent API for Haskell
- when we start using memory mapped files we will not be allowed to change
anything in the grammar data structures. At that point the old API would
be impossible to use.
2014-12-16 10:21:26 +00:00
kr.angelov
86e9acc7a7
throw away the long obsolete runtime type information in the C runtime
2014-10-09 13:44:26 +00:00
hallgren
db9aeb2fa2
haskell-bind/PGF2.hsc: unexport functions that break referential transparency
...
loadConcr, unloadConcr and addLiteral modify the Concr structure as a side
effect. This means that other functions with a Concr argument (e.g. parse
and linearize) are no longer pure.
Possible solutions:
1. Don't try to hide the imperative nature of the C run-time system: remove
all uses of unsafePerformIO and let all functions operate in the IO monad.
2. Don't export functions with side effects. Perhaps the desired functionality
of loadConcr, unloadConcr and addLiteral can be folded into readPGF.
The Concr structures can then treaded as immutable after after the
readPGF function returns...
2014-09-22 14:05:17 +00:00
kr.angelov
df0602723d
now release the FunPtr:s that are allocated for each literal callback
2014-09-10 15:41:53 +00:00
kr.angelov
80725e872b
added an API for custom literals in the Haskell binding
2014-09-10 14:56:18 +00:00
kr.angelov
b553729f37
added loadConcr/unloadConcr to the Haskell binding. This exposes an API for loading grammars compiled with -split-pgf
2014-09-10 14:35:54 +00:00
kr.angelov
b3f8b90f2b
fixed memory leak in the Haskell binding to the C runtime
2014-06-16 08:49:13 +00:00
hallgren
d6252d1c16
PGF library: expose only PGF and PGF.Internal instead of all modules
...
PGF exports the public, stable API.
PGF.Internal exports additional things needed in the GF compiler & shell,
including the nonstardard version of Data.Binary.
2014-06-12 14:43:18 +00:00
hallgren
26aecdb4d3
PGF2.hsc: use throwIO instead of throw
...
From the documentation: the throwIO variant should be used in preference to
throw to raise an exception within the IO monad because it guarantees ordering
with respect to other IO operations, whereas throw does not.
Also removed some unused imports.
2014-06-10 12:42:01 +00:00
hallgren
121afca05a
Haskell binding: free memory pool to avoid space leak when readPGF fails
2014-05-13 14:07:36 +00:00
kr.angelov
58d0cdc943
fix memory leak in the Haskell binding
2014-05-08 08:41:58 +00:00
hallgren
70b192594e
pgf-shell.hs: fix compilation problem with GHC 7.4
2014-05-07 17:06:34 +00:00
hallgren
04e7bdb6fe
Two improvements in the pgf-shell example
...
1. Like pgf-translate, it now shows one result at a time, press Enter to get
more results.
2. You can load a new grammar with the command 'i <path-to-pgf>'
2014-05-07 16:37:28 +00:00
kr.angelov
bd892b8a1d
fix the haskell binding to handle parse errors
2014-04-04 11:46:40 +00:00
hallgren
f092e7fe5b
haskell-bind: comment out superfluous imports
2014-03-12 13:21:47 +00:00
hallgren
c9af5d11c0
Restore compatibility with GHC 7.0
2014-02-10 21:44:34 +00:00
kr.angelov
44a764cd2f
proper error checking in the C runtime
2014-02-10 14:07:17 +00:00
hallgren
1bcb2d06e3
haskell-bind: fix broken pgf-shell
...
The type CId was replaced with String, so can't use show and read anymore.
2014-02-10 12:59:31 +00:00
kr.angelov
5818b0fe1b
bugfix in pgf2-bind.cabal
2014-02-10 10:28:19 +00:00