Skip to content

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

@unhammer

Description

@unhammer

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>$
                                }$
                        }$
                }$
        }$
}$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions