summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF
AgeCommit message (Collapse)Author
2016-06-08PGF.VisualizeTree: add SVG renderering of word dependency treeshallgren
This was done by introducing an intermediate representation for the LaTeX pictures produced by the LaTeX renderer and providing a new backend that outputs SVG instead of LaTeX.
2016-06-03vd latex: some adjustments in heights and lengthsaarne
2016-06-02vd: arc heights now depend on number of arcs below rather than word distanceaarne
2016-05-26Add haddock documentation to PGF.graphvizDependencyTree and PGF.getDepLabelshallgren
They seemed very difficult to use without the documentation, since their types are not particularly self documenting. Also documented what the (Bool,Bool) argument to PGF.graphvizAbstractTree is for.
2016-05-26Fix documentation typo on PGF.Haskellhallgren
2016-05-23made the word length proportionate in dependency visualization, instead of ↵aarne
using the max length for every word
2016-02-23add forgotten file src/runtime/haskell/PGF/LexingAGreek.hsleiss
2015-11-23vd -conll2latex now converts conll to latex. Without going through GF trees, ↵aarne
but as a service to the dependency parser community.
2015-11-18reduced label size and optimized arc length in vd -output=latexaarne
2015-11-17latex visualization of dep trees: explained the program better and ↵aarne
eliminated most magic numbers
2015-11-17added -output=latex to visialize_dependencies. This generates more ↵aarne
familiar-looking output than the default graphviz, which can moreover be pasted into LaTeX documents. Some more work is needed to make long sentences look nice and fit on a page; a constant word length is now used to simplify computing the coordinates.
2015-11-05vp -showdep: as default label for the first (incl. only) argument, don't use ↵aarne
dep#0 but assume it is the head
2015-11-05improved documentation of vp -showdepaarne
2015-11-04dependency labels in parse trees now with the -deps flag, -file=labels_file ↵aarne
for configuration. With -nocat option this shows reasonable dep trees, more familiar looking than the vd command. With -showfun flag, the tree gives a rather complete picture of the analysis of the sentence.
2015-11-04prepared visualize_parse for showing dependency labelsaarne
2015-08-31GF.Infra.SIO: The SIO monad now supports putStr in addition to putStrLnhallgren
Also included some unrelated minor changes.
2015-08-28Comment out some dead code found with -fwarn-unused-bindshallgren
Also fixed some warnings and tightened some imports
2015-07-16added a space after the tag in word alignment to work around a graphviz bug ↵aarne
shown with Chinese characters
2015-06-23Bump version of .gfo and .pgf files, improve error messages on version mismatchhallgren
Becacuse of the new special tokens added to the Symbol type, .gfo and .pgf files produced with the current version of GF can not always be used with older versions of GF and the PGF run-time system. The PGF version number was increased from (2,0) to (2,1). GF can still read version (2,0) and (1,0), so old PGF files continue to work. The GFO version was increased from "GF03" to "GF04".
2015-06-17forgot changes in the serialization in the Haskell runtimekrasimir
2015-06-11fixed typo in the Haskell runtimekrasimir
2015-05-11added all orthographic primitiveskrasimir
2015-04-20drop the dependency to FSTkrasimir
2015-02-16Restore compatibility with ghc-7.4hallgren
With ghc-7.4 'import M hiding (x)' causes an error if M does not export x...
2015-02-16Changes for compatibility with ghc-7.10-rc2hallgren
2 modules: Name clashes caused by Applicative-Monad change in Prelude 2 modules: Ambiguities caused by Foldable/Traversable in Prelude 2 modules: Backwards incompatible changes in time-1.5 for defaultTimeLocale 9 modules: {-# LANGUAGE FlexibleContexts #-} (because GHC checks inferred types now, in addition to explicitly given type signatures) Also silenced warnings about tab characters in source files.
2015-02-12PGF.Haskell: adding operators for selections from tableshallgren
2015-02-09Translating linearization functions to Haskell: support for variantshallgren
By adding the flag -haskell=variants to the command line, GF will now generate linearization functions in Haskell that support variants. Variants are represented as lists in Haskell. Variants inside pre { ... } expressions are still ignored. TODO: apply some monad laws to generate more compact code (using an intermediate representation of the generated Haskell code, instead of pretty printing directly from the GF code).
2015-01-19Translating linearization functions to Haskell: move a common record type to ↵hallgren
PGF.Haskell Move the Haskell representation of the common linearization type {s:T} to the shared module PGF.Haskell, so that the same overloaded projection function proj_s can be used for all concrete syntaxes.
2015-01-14Translating linearization functions to Haskell: better treatment of special ↵hallgren
tokens Common code has been lifted out from the generated Haskell modules to an auxiliary module PGF.Haskell, which is currently included in the regular PGF library, although it is independent of it and probably belongs in a separate library. The type Str used by linearization functions is now based on a token type Tok, which is defined in PGF.Haskell. PGF.Haskell.Tok is similar to the type GF.Data.Str.Tok, but it has constructors for the special tokens BIND, SOFT_BIND and CAPIT, and there is a function fromStr :: Str -> String that computes the effects of these special tokens.
2014-10-31now (+) in the abstract syntax works, i.e. it knows how to deal with partial ↵kr.angelov
sums
2014-10-30a more efficient tail call by using the new TUCK instructionkr.angelov
2014-10-26an explicit SAVE instructionkr.angelov
2014-10-22an explicit PUSH_FRAME instructionkr.angelov
2014-10-19(un)lexmixed: added the other math environments than $ used in latexaarne
2014-10-17one general case in dealing with backslash in latex lexing is enoughaarne
2014-10-17unlexing latex code: no space between closing $ and punctuationaarne
2014-10-17lexer for latex code: don't separate backslash from the macro name that it marksaarne
2014-10-16finally proper stack unwind in the evaluatorkr.angelov
2014-10-14the compiler now allows + to be used as a floating point addition in the ↵kr.angelov
abstract syntax
2014-10-09Prelude.CAPIT is now a built-in primitive. It still generates &| in the ↵kr.angelov
Haskell runtime but will be intepreted in the C runtime
2014-10-06using instruction RET was wrong; now use EVALkr.angelov
2014-09-29bugfix in the pattern matching compiler and a number of other fixes that I ↵kr.angelov
somehow did not push before
2014-09-11a major revision of the bytecode generator and JIT compiler. the effect is ↵kr.angelov
that now we can compute with lambda functions and with true tail recursion
2014-09-05the code for def rules now uses proper graph update to preserve lazynesskr.angelov
2014-09-05full support for recursive def rules in the C runtimekr.angelov
2014-09-01partial implementation for recursive def ruleskr.angelov
2014-08-13Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8hallgren
2014-08-11a partial support for def rules in the C runtimekr.angelov
The def rules are now compiled to byte code by the compiler and then to native code by the JIT compiler in the runtime. Not all constructions are implemented yet. The partial implementation is now in the repository but it is not activated by default since this requires changes in the PGF format. I will enable it only after it is complete.
2014-07-15PGF Web Service: include entire completion in full modejohn.j.camilleri
When using full=yes in the web service 'complete' command, you now get an additional field 'seq' with the longest possible completion. So, given: lin f1 = ss "the" ; f2 = ss ("the red house" | "the real deal") ; and trying to complete on input "th", you get: [ { "from": "TestCnc", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [] }, "text": "th", "completions": [ { "token": "the", "funs": [ { "fun": "f1", "hyps": [], "cat": "C", "seq": "the" }, { "fun": "f2", "hyps": [], "cat": "C", "seq": "the red house" }, { "fun": "f2", "hyps": [], "cat": "C", "seq": "the real deal" } ] } ] } ]
2014-07-11PGF web service: Return additional completion info with 'full' flagjohn
BETA! The 'complete' command now has a new flag 'full' which when set returns additional info about completions. Without 'full' flag (default): [ { "from": "PhrasebookEng", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [ { "token": "the" } ] }, "text": "su", "completions": [ "supermarket", "suspect" ] } ] With full=true or full=yes: [ { "from": "PhrasebookEng", "brackets": { "cat": "_", "fid": 0, "index": 0, "fun": "_", "children": [ { "token": "the" } ] }, "text": "su", "completions": [ { "token": "supermarket", "funs": [ { "fid": 421, "fun": "Supermarket", "hyps": [], "cat": "PlaceKind" } ] }, { "token": "suspect", "funs": [ { "fid": 445, "fun": "Suspect", "hyps": [], "cat": "Property" } ] } ] } ]