Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the output values in parse --tree #85

Open
unhammer opened this issue Sep 20, 2022 · 1 comment
Open

Show the output values in parse --tree #85

unhammer opened this issue Sep 20, 2022 · 1 comment

Comments

@unhammer
Copy link
Member

unhammer commented Sep 20, 2022

I'm not sure this makes sense, but afaict the tree from -T/-tree shows the matched input in a tree structure, but not the result of applying any tag changes and such. Would it be possible to show these in the parse tree? E.g. instead of just

                        ^armé<N><ut><sg><def>{
                                ^armé<n><m><sg><def>/armé<n><ut><sg><def>$
                        }$

one could have

                        ^armé<N><ut><sg><def>{
                                ^armé<n><m><sg><def>/armé<n><ut><sg><def>$ → ^armé<n><ut><sg><ind>$
                        }$

(This idea brought to you by half an hour of debugging why %2[defnes=ind] did not seem to apply because I thought parse trees showed the output values.)

@mr-martian
Copy link
Collaborator

This is related to #33

The main difficulty is that by the time the output values are known, the tree structure no longer exists, since those output values are produced precisely by disassembling the tree.

On the other hand, it wouldn't be that hard to store the string-ified versions of nodes around rule application and thus produce a tree fairly easily by piping debug output into a python script of some sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants