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

rule (line) numbers on -T parse tree #84

Open
unhammer opened this issue Apr 29, 2022 · 0 comments
Open

rule (line) numbers on -T parse tree #84

unhammer opened this issue Apr 29, 2022 · 0 comments

Comments

@unhammer
Copy link
Member

unhammer commented Apr 29, 2022

The parse tree is very handy and succinct, but would be even nicer if we could see the rule line number there. The -r output quickly gets noisy when lots of rules are rejected, just a few words can give pages of output. Something like

^lærebog<DP><ut><sg><ind>{         // rule 27 "main dp rule" line 204
        ^en<det><qnt><m><sg>/en<det><ind><ut><sg>$
        ^lærebog<NP><ut><sg><ind>{         // rule 19 "adj noun phrase" line 139
                ^relativ<A><sint><pst><nt><sg><ind>{         // rule 11 "adjmain" line 115
                        ^relativ<adj><pst><nt><sg><ind>/relativ<adj><sint><pst><nt><sg><ind>$
                }$
                ^lærebog<NP><ut><sg><ind>{         // rule 19 "adj noun phrase" line 139
                        ^fin<A><sint><pst><ut><sg><ind>{         // rule 11 "adjmain" line 115
                                ^fin<adj><sint><pst><mf><sg><ind>/fin<adj><sint><pst><ut><sg><ind>$
                        }$
                        ^lærebog<NP><ut><sg><ind>{         // rule 3 "basic noun phrase" line 107
                                ^lærebog<N><ut><sg><ind>{         // rule 1 "nouns" line 101
                                        ^lærebok<n><m><sg><ind>/lærebog<n><ut><sg><ind>$
                                }$
                        }$
                }$
        }$
}$
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

1 participant