Skip to content

Releases: rawlins/svgling

Documentation and node rendering

20 Aug 14:18
Compare
Choose a tag to compare

[0.5.0] - Documentation and node rendering - 2024-08-20

This version is intended to be the last release that is marked as
a beta / pre-1.0 version.

New features:

  • Support for arbitrary SVG node contents, via the node_builder
    decorator
  • Support for handling of custom tree node classes, via the TreeOptions
    option tree_split, as well as a pre-provided handler for nltk's
    ProbabilisticTree class
  • Built-in node builder (svgling.core.subscript_node) for nodes that
    have a subscript
  • A figure class HTMLSideBySide that allows mixing hybrid HTML diagrams
    with SVG diagrams

Documentation:

  • Major documentation improvements, convert docs to quarto

Fixes, improvements, changes:

  • Support a repeated call notation for most TreeLayout public functions
  • Improvements to the draw_tree and tree2svg APIs
  • Fix for constituent underlines at the exact lower edge of a figure
  • Compatibility mode for rendering (some) svgling.html diagrams in quarto
  • Refactor of the node construction API that goes along with the node_builder
    change
  • Build/install improvements

Node styling and compatibility

14 Oct 14:40
Compare
Choose a tag to compare

0.4.0 - Node styling and compatibility

As of 0.3.1, svgling is the default tree-drawing package for nltk Trees
in Jupyter; this update provides better compatibility for that. It also
improves some styling options, and direct support for format conversion.

New features:

  • Limited per-node styling in trees: supports changing font style, size, and
    color/fill
  • convenience wrappers to make conversion to PNG/PDF via the cairosvg
    package easier (cairosvg is now an optional package dependency)
  • Support nltk.Tree objects directly in svgling.figure classes

Fixes, improvements, changes:

  • Simplify import code for nltk, remove monkeypatching
  • The option global_font_style is renamed to just font_style
  • Refactor TreeOptions to make it easier to pass around options bundles
  • Default change: relative_units=False. This provides better compatibility
    with inkscape, among other things. This option is now deprecated.
  • Documentation improvements

(Note: this version actually released 25-09-2023, just forgot to mark the tag as a release on github at the time.)

Inkscape compatibility mode

11 Oct 15:56
Compare
Choose a tag to compare

This is an incremental release that adds a compatibility mode aimed at Inkscape, that doesn't use relative units.

[0.3.1] - Inkscape compatibility - 2021-10-11

New feature:

  • Compatibility mode aimed at Inkscape: allow using px instead of relative
    em units. This allows current versions of Inkscape to load the output
    SVGs. This mode is not on by default.

Fixes, improvements, changes:

  • Update documentation to reflect some issues in MathJax math mode delimeter
    choice for hybrid mode.

Now with hybrid HTML/SVG tree drawing

10 Dec 17:38
Compare
Choose a tag to compare

This release introduces a form of tree-drawing that uses a mix of HTML (for positioning) and SVG (for line-drawing). It currently has a number of limitations compared to svgling.core, the biggest of which is that branching can be at most binary. The advantage is that it allows arbitrary HTML/MathJax in nodes. (My most immediate target for this mode of tree drawing, rather than just rendering syntax trees per se, is programmatic use for visualization of semantic composition in https://github.com/rawlins/lambda-notebook.)

Core features complete

26 Nov 22:18
Compare
Choose a tag to compare

New features:

  • Support for multi-line nodes.
  • Edge styles, multi-segment descents for level skipping.
  • Wrote a manual.
  • Tree annotations: movement arrows, constituent highlighting / underlining.
  • Complex figures: grids of trees, captioning.

Fixes, improvements, changes:

  • Massively improve responsivity of svgling diagrams.
  • TreeLayout objects manage font size directly.
  • distance_to_daughter is now a distance between levels, i.e. excluding node
    height.

Bugfix release

08 Nov 20:23
Compare
Choose a tag to compare
  • Fix for non-leaf nodes that are larger than the leaf nodes they dominate.
  • More flexible arguments to draw_tree (will accept the top node + children
    via variable arguments, rather than a list/tuple as the first argument.)
  • Documentation improvements.

First beta release

07 Nov 21:09
Compare
Choose a tag to compare

This version has enough functionality to serve as a drop-in replacement for nltk.tree.Tree._repr_png_ in svg form. There's lots more that I want to do, but it's already fairly helpful as-is.