Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.36 KB

File metadata and controls

60 lines (44 loc) · 2.36 KB

DyLan / Dynamic Syntax

Python port of DyLan, an incremental Dynamic Syntax (DS) parser with Type Theory with Records (TTR). The package parses utterances into decorated trees and a word-level derivation DAG, and can induce a DS-TTR lexicon from examples.

Structure

  • src/dylan/ — parser, tree, DAG, actions, TTR, induction, Flet GUI, Pyodide façade
  • src/dynamicsyntax/ — public package entry (icp, bundled grammars)
  • web/ — static Pyodide UI that calls dylan.pyodide_api (same ParseSession as the Flet app)
  • tests/ — pytest suite

Language

DS Tree: A decorated Dynamic Syntax tree: node addresses, type and formula labels, and a distinguished pointer. Avoid: parse tree, constituency tree

DAG tuple: One interpretation node in the word-level context DAG; the current tuple is the parser’s live derivation state. Avoid: parse, hypothesis (when you mean this DAG node)

Viewport: The Output pane that shows the DS Tree canvas, not the OS screen or device. Avoid: device, window (when you mean the tree pane)

Camera: The Output pane's scroll position over the DS Tree at the current Zoom. A tree that fits the pane is centred; Fit scrolls a larger drawing so its middle is in view. Avoid: scale-to-fit layout, stretch

Zoom: A uniform scale of the natural-size DS Tree. Boxes and lettering grow or shrink together. 100% is intrinsic size. Avoid: stretch-to-fill, reflow, fit

Fit-to-pane: Scrolling the DS Tree at the current Zoom so its middle sits in the Viewport. It does not change Zoom. Avoid: zoom, shrink-to-fit

Interpretation: One DAG tuple in the sequence reached by stepping the parser after a sentence, shown as an index in 1 / N. Avoid: step, hypothesis, reading

Info: The how-to opened from the ? button: how to load a grammar, parse, move between interpretations, zoom, fit, and when to Reset. Avoid: Status, Logs, loguru log

Status: The live session card: grammar path, repair, last event, load warnings, pointer, and current DAG tuple. Avoid: Info, Logs

Logs: The append-only event history (grammar-load warnings, parse/step lines, computational actions). Avoid: loguru log, Info, Status

Reset: Returning the derivation to the empty axiom while the grammar stays loaded. Avoid: Init

Continuation: A sentence whose words start with the words already in the derivation. Avoid: prefix