UUDigitalHumanitieslab / parseport

Dutch sentence parser for Spindle + Æthel (and maybe others in the future).
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Show lambda term and word types in frontend #9

Closed XanderVertegaal closed 6 months ago

XanderVertegaal commented 7 months ago

The lambda term is accessible via analyses[0].proof.term. Basically, it is the part after the turnstile symbol ('⊢') of the line that you see at the bottom of the generated PDF (in red).

The words and their types can be extracted using [(p.string, p.type) for p in analyses[0].lexical_phrases ]. Æthel or Spindle should provide a method that turns the resulting objects into strings that can be sent to the frontend. There, they should be displayed in a simple table format.

These should be the main exports of a parse. Generating TeX and/or a PDF should only be available after an additional action/click.