I'm not a programmer (though I've managed to cobble together useful Tcl/Tk and perl scripts, and a few simple C programs for my work). I'm a cognitive neuroscientist studying language. I want to make diagrams to visualize aspects of the phonological structure of lexicons. What I want to do is make tree diagrams that branch at each new phoneme from the beginning of a word.
I've written perl code that creates a description of the tree structure. Here's a snippet of the output for a mini-lexicon used with a neural network model. The columns are "node label", "words subordinate (words below this node, including itself)", "branches below", "terminal (does this node correspond to a word)", and then the node structure (for 'kip' below, the structure is 8.2.1, saying this node's ancestor from the 0 order level is node 8, then branch 2, then branch 1). The words in the list are 'ki (key)', 'kip (keep)', 'klak (clock)', 'klu (clue)', and 'klxb (club)'.
ki 2 1 1 8.2.
kip 1 0 1 8.2.1.
kl 3 3 0 8.3.
kla 1 1 0 8.3.1.
klak 1 0 1 8.3.1.1.
klu 1 0 1 8.3.2.
klx 1 1 0 8.3.3.
klxb 1 0 1 8.3.3.1.
I also have code that takes this as input and makes a vector of node labels compatible with the matlab treeplot command (which is inadequate for my purposes for various reasons).
I would like to graph this. The examples of tree diagrams I've found are either specific to directory hierarchies or do not allow arbitrary degrees of branching (in the simple lexicon I'm using, some nodes have as many as 14 branches).
I'd rather not re-invent the wheel. Does anyone know of any code that I could apply to this?
Thanks very much!
I've written perl code that creates a description of the tree structure. Here's a snippet of the output for a mini-lexicon used with a neural network model. The columns are "node label", "words subordinate (words below this node, including itself)", "branches below", "terminal (does this node correspond to a word)", and then the node structure (for 'kip' below, the structure is 8.2.1, saying this node's ancestor from the 0 order level is node 8, then branch 2, then branch 1). The words in the list are 'ki (key)', 'kip (keep)', 'klak (clock)', 'klu (clue)', and 'klxb (club)'.
ki 2 1 1 8.2.
kip 1 0 1 8.2.1.
kl 3 3 0 8.3.
kla 1 1 0 8.3.1.
klak 1 0 1 8.3.1.1.
klu 1 0 1 8.3.2.
klx 1 1 0 8.3.3.
klxb 1 0 1 8.3.3.1.
I also have code that takes this as input and makes a vector of node labels compatible with the matlab treeplot command (which is inadequate for my purposes for various reasons).
I would like to graph this. The examples of tree diagrams I've found are either specific to directory hierarchies or do not allow arbitrary degrees of branching (in the simple lexicon I'm using, some nodes have as many as 14 branches).
I'd rather not re-invent the wheel. Does anyone know of any code that I could apply to this?
Thanks very much!