Function Repository Resource:

WordPhonologyTree

Source Notebook

Generate the phonological tree structure of an English word

Contributed by: Mark Greenberg

ResourceFunction["WordPhonologyTree"][w]

gives the phonological structure of w as a tree.

Details and Options

ResourceFunction["WordPhonologyTree"][w] is specific to English; it will not give meaningful results when applied to other languages.
ResourceFunction["WordPhonologyTree"][w] is compatible with the transcription style of WordData[w,"PhoneticForm"].
Syllabification follows the Maximal Onset Principle, not hyphenation rules found in most dictionaries.
ResourceFunction["WordPhonologyTree"][w,ShowEmptyOnsetsTrue] includes onset nodes at the OR (onset-rhyme) and the ONC (onset-nucleus-coda) levels when a syllable has no onset. The empty onset is represented by the  character. This can be useful for some phonological analyses. There is no option to show empty codas as that is not typically needed for analysis.
Onsets are shown on both the OR and ONC levels, making it easier to analyze a particular level.
Compound words that have components of three letters or more are separated at the tree's first level.
ResourceFunction["WordPhonologyTree"][w] attempts to give the General American pronunciation of words that do not have phonetic values in WordData. This could include proper nouns, nonsense words, rare words, etc. Be aware that this feature does require a connection to an LLM.
Primary and secondary stress indicators are preserved.
w may be in uppercase or lowercase.

Examples

Basic Examples (1) 

Visualize the phonological structure of an English word:

In[1]:=
ResourceFunction["WordPhonologyTree"]["breakfast"]
Out[1]=

Scope (1) 

Visualize the structure of a nonsense word:

In[2]:=
ResourceFunction["WordPhonologyTree"]["proweries"]
Out[2]=

Options (1) 

Include empty onsets in the visualization:

In[3]:=
ResourceFunction["WordPhonologyTree"]["index", ShowEmptyOnsets -> True]
Out[3]=

Applications (2) 

Compare the rhyme components of two words:

In[4]:=
tree = ResourceFunction["WordPhonologyTree"]@{"opine", "resign"};
Part[(TreeData /@ TreeCases[#, {_, "rhyme"}] &) /@ tree, All, All, 1]
Out[5]=

Determine whether syllables of a word are light or heavy:

In[6]:=
tree = ResourceFunction["WordPhonologyTree"]["alike"];
subs = TreeCases[tree, {_, "rhyme"}];
TreeLeafCount /@ subs /. {1 -> "light", _Integer -> "heavy"}
Out[8]=

Possible Issues (2) 

The skeletal tier (aka, "timing layer") is not shown because it involves nodes that recombine into a single leaf, which is not compatible with a tree structure.


WordPhonologyTree[w] can make mistakes (on the order of 1% of random words), usually when dividing w into compound word parts:

In[9]:=
tree = ResourceFunction["WordPhonologyTree"]["restart"]
Out[9]=

Publisher

Mark Greenberg

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 05 August 2024

Source Metadata

Related Resources

License Information