Commit Graph

39 Commits

Author SHA1 Message Date
hallgren
8dfdee1e9a PGF.VisualizeTree: add SVG renderering of word dependency trees
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-08 17:49:15 +00:00
aarne
4fea4ace7b vd latex: some adjustments in heights and lengths 2016-06-03 16:06:22 +00:00
aarne
f5e2c41dd0 vd: arc heights now depend on number of arcs below rather than word distance 2016-06-02 18:17:54 +00:00
hallgren
389e6b8816 Add haddock documentation to PGF.graphvizDependencyTree and PGF.getDepLabels
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-26 13:12:38 +00:00
aarne
74e17aef08 made the word length proportionate in dependency visualization, instead of using the max length for every word 2016-05-23 19:16:06 +00:00
aarne
0a38e137b6 vd -conll2latex now converts conll to latex. Without going through GF trees, but as a service to the dependency parser community. 2015-11-23 10:43:03 +00:00
aarne
9335a2997c reduced label size and optimized arc length in vd -output=latex 2015-11-18 08:12:26 +00:00
aarne
cda3feaf9f latex visualization of dep trees: explained the program better and eliminated most magic numbers 2015-11-17 18:08:32 +00:00
aarne
d6a505169a added -output=latex to visialize_dependencies. This generates more 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-17 09:11:10 +00:00
aarne
e97fa30c9d vp -showdep: as default label for the first (incl. only) argument, don't use dep#0 but assume it is the head 2015-11-05 08:30:13 +00:00
aarne
eb49b6ab56 improved documentation of vp -showdep 2015-11-05 08:23:33 +00:00
aarne
0786dc6f42 dependency labels in parse trees now with the -deps flag, -file=labels_file 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-04 20:36:47 +00:00
aarne
e39787ab88 prepared visualize_parse for showing dependency labels 2015-11-04 17:28:09 +00:00
aarne
3ad6e0c6bc added a space after the tag in word alignment to work around a graphviz bug shown with Chinese characters 2015-07-16 08:36:14 +00:00
hallgren
3814841d7d Eliminate mutual dependencies between the GF compiler and the PGF library
+ References to modules under src/compiler have been eliminated from the PGF
  library (under src/runtime/haskell). Only two functions had to be moved (from
  GF.Data.Utilities to PGF.Utilities) to make this possible, other apparent
  dependencies turned out to be vacuous.

+ In gf.cabal, the GF executable no longer directly depends on the PGF library
  source directory, but only on the exposed library modules. This means that
  there is less duplication in gf.cabal and that the 30 modules in the
  PGF library will no longer be compiled twice while building GF.

  To make this possible, additional PGF library modules have been exposed, even
  though they should probably be considered for internal use only. They could
  be collected in a PGF.Internal module, or marked as "unstable", to make
  this explicit.

+ Also, by using the -fwarn-unused-imports flag, ~220 redundant imports were
  found and removed, reducing the total number of imports by ~15%.
2013-11-05 13:11:10 +00:00
kr.angelov
a4194501fe linref is now used by the linearizer. The visible change is that the 'l' command in the shell now can linearize discontinuous phrases 2013-10-30 14:42:29 +00:00
gregoire.detrez
08a67b9f34 [haskell runtime] Remove trailing whitespaces in VisualizeTree.hs 2013-05-03 09:42:29 +00:00
kr.angelov
b1b68bf6b4 reverse the direction of the arcs in the dependency trees 2013-04-21 19:20:08 +00:00
kr.angelov
4e2044ab99 remove the dead code left behind by Peter Ljunglöf in VisualizeTree 2013-04-19 11:13:07 +00:00
kr.angelov
b49b9d459a added a malt_tab format to the vd command in the GF shell 2013-04-16 18:22:37 +00:00
kr.angelov
f6d675c34b the generation of dependency trees in the Haskell runtime is now finally working with bracketed strings. This also fixes some errors in the old implementation 2013-04-16 13:10:48 +00:00
hallgren
db544b1cc9 PGFService.hs: fix type error caused by change to PGF.graphvizParseTree
Note that some of the graphviz functions have backwards incompatible changes
that might also affect other clients of the PGF run-time library.

Also added graphvizDefaults and export it together with GraphvizOptions from 
the PGF run-time library.
2012-11-22 15:27:16 +00:00
peter.ljunglof
486a510611 better visualization of parse trees 2012-11-22 08:50:37 +00:00
hallgren
07af8988d3 PGF run-time library: function names in BracketedString (experimental)
+ Make room for function names in the BracketedString data structure.
+ Fill in function names when linearizing an abstract syntax tree to a
  BracketedString.
+ Fill in wildCId when it is not obvious what the function is.
+ Function bracketedLinearize: for compatibility with the other linearization
  functions, return Leaf "" instead of error "cannot linearize".
+ Export flattenBracketedString from module PGF.
+ PGFServce: make function names available in the JSON representation of
  BracketedString.
2012-03-18 20:12:26 +00:00
kr.angelov
7c9bbd844b Now graphvizAbstractTree suppress the visualization of implicit arguments. 2011-12-08 09:18:38 +00:00
krasimir
b6446ec36d simple refactoring in PGF.Macros and related 2010-12-06 14:19:51 +00:00
ramona.enache
1f8a0f0876 added giza Alignments with command ga and merged the rendering algorithm for graphviz and giza alignments 2010-10-31 13:39:01 +00:00
krasimir
7fc638e030 bugfix in PGF.VisualizeTree for handling trees with implicit arguments 2010-10-13 13:32:48 +00:00
krasimir
b0e110cf4f native representation for HOAS in PMCFG and incremental type checking of the parse forest 2010-08-09 10:10:08 +00:00
krasimir
992a7ffb38 Yay!! Direct generation of PMCFG from GF grammar 2010-06-18 12:55:58 +00:00
krasimir
d3effb1c7d I switched back to the old algorithm for generating dependency trees. This required an ugly hack but there is no easy and quick other way :-( 2010-05-29 12:49:54 +00:00
krasimir
49aa8d20fc some fixes for graphvizDependencyTree 2010-05-25 13:01:59 +00:00
krasimir
e0dc9c80a6 now every BracketedString also has reference to the source expression(s) 2010-05-19 13:32:39 +00:00
krasimir
4e85f8ada3 refactor BracketedString 2010-05-01 21:02:32 +00:00
krasimir
8460598801 first incarnation of the bracketed string API 2010-04-30 14:36:06 +00:00
aarne
dc971bd051 removed mention of 2.9 welcome, and some traces in visualization 2010-04-22 06:36:37 +00:00
krasimir
890d455793 cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification 2010-01-27 09:39:14 +00:00
krasimir
af13bae2df now the linearization is completely based on PMCFG 2010-01-17 17:05:21 +00:00
krasimir
f85232947e reorganize the directories under src, and rescue the JavaScript interpreter from deprecated 2009-12-13 18:50:29 +00:00