↑ Click to hide

Tree Drawing Program


This program is a webpage written in HTML and JavaScript.

Note: JavaScript must be enabled in your browser.

You can use this program online or save the webpage to your computer and use offline.

Save to your computer. Open in browser and use.

For bugs, please contact me: jginsbur@cc.osaka-kyoiku.ac.jp

See TreeDraw for Sandiway Fong's better tree drawing program.


[A [B] [C]] [A [B] [C] [D] [E]] [DP ^the|large|book]
Terminal node with multiple lines
[NP [N 本 hon 'book']]
Subscript: X_1
[A [B] [C X_1]]
Strikethrough: $X
[A [B] [C $Argument]]
<="" td=""> <="" td="">
The ugly old man from Brazil found books of poems in the puddle. (Carnie 2013: 198)

[TP [DP_1 [D' [D the] [NP [N' [AdjP [Adj' [Adj ugly]]] [N' [AdjP [Adj' [Adj old] ]][N' [N' [N man]] [PP [P' [P from] [DP [D'[D] [NP [N' [N Brazil]] ]] ]]]]] ]] ] ][T' [T Past] [vP [t_1] [v' [v] [VP [V'[V' [V found] [DP [D' [D the] [NP [N' [N book] [PP [P' [P of] [DP [D' [D ] [NP [N' [N poems] ] ] ]] ]]]] ]] ] [PP [P' [P in] [DP [D' [D the] [NP [N' [N puddle]]]]]]]]]]]]]

To save trees: Drag image from browser or click on image and save.



Show Tree Frontier (for binary branching trees; may not work properly for more than 2 nodes)


        
Stop previous command: //
(Example) Stop strikethough
[A [B] [C $Str//NoStr]]

Left bracket: \LBr
Right bracket: \RBr
[CP ^/LBrwhich|book/RBr_1//|did|you|read|//$/LBrwhich|book/RBr_1]
<="" td="">

Stop previous command: //
(Example) Stop subscript: C_Q//+Pres+have
(Example) Stop strikethrough: $have//+-en
[C [C_Q//+Pres+have] [T [N_1 [N_1] [Mary] ] [T [T $Pres+have] [v_Perf [v_Perf $have//+-en] [v* [t_1] [v* [v*] [buy [buy] [D [D the] [N [N] [book]]]]]]]]]]
        

Set Merge (Unlabeled):
{A, B}
Set Merge (Labeled):
{A A, B}
Pair Merge (First element is adjunct - adjunct
appears to the left):
{A <D, B>, C}
Pair Merge (Use <2 to make adjunct appear to the right - first
element is adjunct):
{A <2 D, B>, C}
Multiple Adjuncts
{A <P,<K,B C> C>, <F,<{E,G},<M,<2 U,<{D,O},C>>>>>}
Use || for multiple lines:
{N N, 本||hon||'book'}

Complex example:
{C C, {Phi3 {d d, {n n, they}}, {Tpast Tpast, {vUnerg {d d, {n n, they}}, {vUnerg vUnerg, {wonder wonder, {Q {Q Q, {in in, {which which, < {adj adj, Texas}, {n n, city}>}}}, {C_whEm C_whEm, {Phi1 {d d, {n n, JFK}}, {be+Tpast be+Tpast, {be {d d, {n n, JFK}}, {be be, {Prt {d d, {n n, JFK}}, {Prt Prt, <2{Q Q, {in in, {which which, < {adj adj, Texas}, {n n, city}>}}}, {assassinate assassinate, {d d, {n n, JFK}}}>}}}}}}}}}}}}}}

        

This program can convert bracket-notation in an HTML file into trees.

Read in an HTML file.

If there are no errors, the output will be displayed below.
Example HTML Input


Example Output



Input:







Home

Example 12 *Who did John say that will buy the book? (Pesetsky & Torrego 2001:371)
Initial Stream: ['book', 'n_sg_3rd', 'the', 'buy', 'v*', ['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']

Successful Derivation 1
Successful Derivation 2


Merge 1
Merge: set-Merge
Stream: ['the', 'buy', 'v*', ['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 2
Merge: pair-Merge
Stream: ['buy', 'v*', ['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Label stays
the same:



Merge 3
Merge: set-Merge
Stream: ['v*', ['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 4
Merge: set-Merge
Stream: [['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:


Substream
Stream: ['who', 'n_sg_3rd_wh']

Merge 5
Merge: set-Merge
Stream: []
Unlabeled:
Box:

Main Stream


Merge 6
Merge: set-Merge
Stream: [['who', 'n_sg_3rd_wh'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 7
Merge: set-Merge
Stream: ['Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 8
Merge: set-Merge
Stream: ['that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:


Merge 9
Merge: set-Merge
Stream: ['say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:

Crash (Unlabeled):

Backtrack (check for another possible derivation: Free Merge): Attempt: #2
Continued from Merge 8

Merge 10
Merge: set-Merge
Stream: ['that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 11
Merge: set-Merge
Stream: ['say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:
Label from
Head:

Label from
Head:

Label via
shared features:

Label from
Head:

Label from
Head:

Label from
Head:

FormCopy:
Label via
movement:



Merge 12
Merge: set-Merge
Stream: ['v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 13
Merge: set-Merge
Stream: [['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:

Substream
Stream: ['John', 'n_sg_3rd']

Merge 14
Merge: set-Merge
Stream: []
Unlabeled:

Main Stream


Merge 15
Merge: set-Merge
Stream: [['John', 'n_sg_3rd'], 'Tpast', 'C_Q']
Unlabeled:


Merge 16
Merge: set-Merge
Stream: ['C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:


Merge 17
Merge: set-Merge
Stream: []
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:

Label from
Head:

FormCopy:
Access Box: who+C_Q
Crash (Unlabeled):

Backtrack (check for another possible derivation: Free Merge): Attempt: #3
Continued from Merge 16

Merge 18
Merge: set-Merge
Stream: []
Unlabeled:


Merge 19
Merge: set-Merge
Stream: []
Unlabeled:
Label from
Head:

Label from
Head:

Label via
shared features:

Label from
Head:

Label from
Head:

FormCopy:
Label from
Head:

Label via
movement:

Label from
Head:

FormCopy:
Access Box: who+C_Q
Transfer:
Frontier:

Spell Out: who+CQ n John T(Past,3rd,sg) v say that T(Pres,3rd,sg) will v* buy the n book
PF Rules: who CQ+T(Past,3rd,sg)
who did John say that T(Pres,3rd,sg)+will
who did John say that will buy the book

Successful Derivation 1
Top

Backtrack (check for another possible derivation: Free Merge): Attempt: #4
Continued from Merge 7

Merge 20
Merge: set-Merge
Stream: ['Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 21
Merge: set-Merge
Stream: ['that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:


Merge 22
Merge: set-Merge
Stream: ['say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:

Label from
Head:

FormCopy:
Label via
movement:

Crash (Unlabeled):

Backtrack (check for another possible derivation: Free Merge): Attempt: #5
Continued from Merge 21

Merge 23
Merge: set-Merge
Stream: ['that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 24
Merge: set-Merge
Stream: ['say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:
Label from
Head:

Label from
Head:

Label via
shared features:

Label from
Head:

Label from
Head:

FormCopy:
Label from
Head:

Label via
movement:

Label from
Head:

FormCopy:
Label via
movement:



Merge 25
Merge: set-Merge
Stream: ['v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 26
Merge: set-Merge
Stream: [['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:

Substream
Stream: ['John', 'n_sg_3rd']

Merge 27
Merge: set-Merge
Stream: []
Unlabeled:

Main Stream


Merge 28
Merge: set-Merge
Stream: [['John', 'n_sg_3rd'], 'Tpast', 'C_Q']
Unlabeled:


Merge 29
Merge: set-Merge
Stream: ['C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:


Merge 30
Merge: set-Merge
Stream: []
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:

Label from
Head:

FormCopy:
Access Box: who+C_Q
Crash (Unlabeled):

Backtrack (check for another possible derivation: Free Merge): Attempt: #6
Continued from Merge 29

Merge 31
Merge: set-Merge
Stream: []
Unlabeled:


Merge 32
Merge: set-Merge
Stream: []
Unlabeled:
Label from
Head:

Label from
Head:

Label via
shared features:

Label from
Head:

Label from
Head:

FormCopy:
Label from
Head:

Label via
movement:

Label from
Head:

FormCopy:
Access Box: who+C_Q
Transfer:
Frontier:

Spell Out: who+CQ n John T(Past,3rd,sg) v say that T(Pres,3rd,sg) will v* buy the n book
PF Rules: who CQ+T(Past,3rd,sg)
who did John say that T(Pres,3rd,sg)+will
who did John say that will buy the book

Successful Derivation 2
Top

Backtrack (check for another possible derivation: Free Merge): Attempt: #7
Continued from Merge 3

Merge 33
Merge: set-Merge
Stream: ['v*', ['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Unlabeled:


Merge 34
Merge: set-Merge
Stream: [['n_sg_3rd_wh', 'who'], 'will', 'Tpres', 'that', 'say', 'v', ['n_sg_3rd', 'John'], 'Tpast', 'C_Q']
Operations: Checked Features: 'uPerson' 'uNumber' 'uGender'
Unlabeled:
Label from
Head:

Label from
Head:

Label from
Head:

Label from
Head:

FormCopy:
Crash (Unlabeled):


# of Merges: 34
# of Backtracks: 6
# of Crashes: 42
# of Successful Derivations: 2

Top