Terminal and nonterminal functions: Difference between revisions
Appearance
Content deleted Content added
Filled in 1 bare reference(s) with reFill 2 |
Merged content to Parse tree#Nomenclature, redirecting; unopposed 2019 proposal (easy-merge) Tag: New redirect |
||
Line 1: | Line 1: | ||
#REDIRECT [[Parse tree#Nomenclature]] |
|||
{{R from merge}} |
|||
In [[computer science]], a '''nonterminal function''' is a function (node) in a [[parse tree]] which is either a root or a branch in that tree whereas a '''terminal function''' is a function (node) in a parse tree which is a leaf. |
|||
{{R to section}} |
|||
==Background== |
|||
[[Image:parseTree.svg|right|150px|thumb|A simple [[parse tree]].]] |
|||
A [[parse tree]] is made up of nodes and branches.<ref>{{Cite web|url=https://www1.essex.ac.uk/linguistics/external/clmt/latex4ling/trees/parsetree/|title=The parsetree Package for Drawing Trees in LaTeX|website=www1.essex.ac.uk}}</ref> In the picture below the parse tree is the entire structure, starting from S and ending in each of the leaf nodes (John,ball,the,hit). |
|||
In a parse tree, each node is either a ''root'' node, a ''branch'' node, or a ''leaf'' node. In the above example, S is a root node, NP and VP are branch nodes, while John, ball, the, and hit are all leaf nodes. |
|||
Nodes can also be referred to as parent nodes and child nodes. A ''parent'' node is one which has at least one other node linked by a branch under it. In the example, S is a parent of both NP and VP. A ''child'' node is one which has at least one node directly above it to which it is linked by a branch of the tree. Again from our example, hit is a child node of V. |
|||
==See also== |
|||
*[[Parse tree]] |
|||
*[[Terminal and nonterminal symbols]] |
|||
==References== |
|||
{{reflist}} |
|||
{{DEFAULTSORT:Non-Terminal Function}} |
|||
[[Category:Parsing]] |
Latest revision as of 09:29, 20 September 2020
Redirect to:
- From a merge: This is a redirect from a page that was merged into another page. This redirect was kept in order to preserve the edit history of this page after its content was merged into the content of the target page. Please do not remove the tag that generates this text (unless the need to recreate content on this page has been demonstrated) or delete this page.
- For redirects with substantive page histories that did not result from page merges use {{R with history}} instead.
- To a section: This is a redirect from a topic that does not have its own page to a section of a page on the subject. For redirects to embedded anchors on a page, use {{R to anchor}} instead.