Closed nkalivoda closed 3 years ago
This is a good question. The short answer is that the function trimSilentTerminals() in treeTrimming.js removes nodes with the attribute "silent" set to true. The long answer is that as the code currently stands, I don't think those silent nodes are actually getting trimmed. Here's why:
However, when I tried to test this just now, I got a console error: "Cannot read children of undefined" -- so we actually have bigger problems here than just inadequate info text!
@maxTarlov can we discuss this next week when we meet?
In the branch "trimming_bug", I changed the call on trimRedundantNodes() to removeSpecifiedNodes() with the argument for attribute = "silent" I also made trimRedundantNodes() trim redundant nodes even if no particular attribute is passed through.
I suggest adding options to the "Trim syntactic tree" checkbox for silent terminals, functional terminals, and neither (just trims redundant nodes). I also suggest changing the info box for "Trim syntactic tree" to remove "terminals of a category other than "x0" or "clitic" are removed." Do I have the go-ahead?
Also regarding trimming non-terminals that have the attribute "silent" or "func," the current interface does not remove them, but I don't think this needs to be an option (bringing it back around to what Nick asked initially). Trimming terminals will cause nodes without leaves to be removed automatically. There is one case that I'm thinking about where the node is not removed and that is something with an embedded CP w/ a silent head.
{[ a { b.silent [ c ]}]} --> {[ a {[ c ]}]} instead of {[ a [ c ]]}
Should I come up with a solution to this as well?
Let's discuss at the meeting today.
On Tue, Feb 2, 2021 at 3:54 PM 3ddiehead notifications@github.com wrote:
In the branch "trimming_bug", I changed the call on trimRedundantNodes() to removeSpecifiedNodes() with the argument for attribute = "silent" I also made trimRedundantNodes() trim redundant nodes even if no particular attribute is passed through.
I suggest adding options to the "Trim syntactic tree" for silent terminals, functional terminals, and neither (just trims redundant nodes). I also suggest changing the info box for "Trim syntactic tree" to remove "terminals of a category other than "x0" or "clitic" are removed." Do I have the go-ahead?
Also regarding trimming non-terminals that have the attribute "silent" or "func," the current interface does not remove them, but I don't think this needs to be an option (bringing it back around to what Nick asked initially). Trimming terminals will cause nodes without leaves to be removed automatically. There is one case that I'm thinking about where the node is not removed and that is something with an embedded CP w/ a silent head.
{[ a { b.silent [ c ]}]} --> {[ a {[ c ]}]} instead of {[ a [ c ]]}
Should I come up with a solution to this as well?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/syntax-prosody-ot/main/issues/517#issuecomment-772096843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7ROKXCFDCHRVWDF5A4JGDS5CGDTANCNFSM4UOSIU2A .
--
-- Jennifer Bellik, PhD Post-doctoral researcher & lecturer UC Santa Cruz https://people.ucsc.edu/~jbellik/
What are the "silent nodes" mentioned in the "Trim Syntactic tree" info? I know a category can be suffixed with ",silentHead", but what makes a node silent? It would be good to spell everything out in more detail.