Function Repository Resource:

WordSyllableMandalas

Source Notebook

Show the phonetic structure of an English word as a series of mandalas

Contributed by: Mark Greenberg

ResourceFunction["WordSyllableMandalas"][w]

creates a mandala for each syllable in w and arranges them as a graphics object.

Details and Options

Each mandala, composed of 15 identical petals, represents one syllable in w.
Phonemes of each syllable in w determine the petal shape, with perceived air flow values influencing the shape on the left of a petal and voice influencing the right side.
The BSplineCurve that forms a petal crosses between the onset and the nucleus and again between the nucleus and the coda.
Behind each syllable's nucleus is a ring of color that represents tongue position, using this color scheme:
Stressed syllables are rendered on top of and larger than unstressed in this order: primary stress > secondary stress > unstressed.
ResourceFunction["WordSyllableMandalas"][w] accepts the following options:
"OutputFormat""WordGraphic"what kind of output is produced
"MandalaColor"Yellowcolor that fills the mandala curves
Possible values for the "OutputFormat" include:
"WordGraphic"(default) the syllable mandalas of w lined up in order
"Mandalas"a list of the syllable mandalas
"Curves"a list of unfilled mandala BSplineCurve graphics objects
"Petals"a list of the unfilled petal BSplineCurve graphics objects
"VowelColors"one pair of colors for each vowel sound in w, diphthongs containing two different colors
WordSyllableMandala[w] attempts to render words in the General American accent in a transcription style that is consistent with WordData[w,"PhoneticForm"].
WordSyllableMandala[w] attempts to parse the phonetics of words that are not found in WordData (e.g., rare words, nonsense words).
Syllabification follows the Maximal Onset Principle, even when morphology suggests a different division. For example, weakened becomes {wea•kened, wˈi•kənd}.

Examples

Basic Examples (1) 

Get the mandalas for a word:

In[1]:=
ResourceFunction["WordSyllableMandalas"]["compute"]
Out[1]=

Scope (1) 

WordSyllableMandalas[w] works on unknown w too (this feature uses AI, which requires an outside subscription):

In[2]:=
ResourceFunction["WordSyllableMandalas"]["brillig"]
Out[2]=

Options (6) 

OutputFormat (5) 

The default value for "OutputFormat" gives a graphic representing the entire word:

In[3]:=
ResourceFunction["WordSyllableMandalas"]["evaluate"]
Out[3]=

With the option OutputFormat"Mandalas", the output becomes a list of the separate mandalas:

In[4]:=
ResourceFunction["WordSyllableMandalas"]["evaluate", OutputFormat -> "Mandalas"]
Out[4]=

With the option OutputFormat"Curves", the output becomes a list of the colorless BSplineCurves:

In[5]:=
ResourceFunction["WordSyllableMandalas"]["evaluate", OutputFormat -> "Curves"]
Out[5]=

With the option OutputFormat"Petals", the function produces a list of the shapes of each syllable's petal:

In[6]:=
ResourceFunction["WordSyllableMandalas"]["evaluate", OutputFormat -> "Petals"]
Out[6]=

OutputFormat"VowelColors" gives the colors of each syllable's vowel. Monophthongs are a list of two identical colors; diphthongs are a list of two different colors:

In[7]:=
ResourceFunction["WordSyllableMandalas"]["evaluate", OutputFormat -> "VowelColors"]
Out[7]=

MandalaColor (1) 

The option MandalaColor changes the fill color of all the mandalas' BSplineCurves::

In[8]:=
ResourceFunction["WordSyllableMandalas"]["keyboard", MandalaColor -> Blue]
Out[8]=

Applications (3) 

Visualize types of rhyme, like assonance:

In[9]:=
Table[ResourceFunction["WordSyllableMandalas"][
  w], {w, {"root", "mule", "fuse"}}]
Out[9]=

Compare phonetic qualities, like fricatives vs plosives:

In[10]:=
Table[ResourceFunction["WordSyllableMandalas"][w, OutputFormat -> "Petals"], {w, {"vat", "bat"}}] // Flatten // Row
Out[10]=

See what your name mandalas look like:

In[11]:=
ResourceFunction["WordSyllableMandalas"]["Mark"]
Out[11]=

Possible Issues (1) 

Homophones will show the same mandala:

In[12]:=
ResourceFunction["WordSyllableMandalas"][#] & /@ {"to", "two", "too", "tutu"}
Out[12]=

Neat Examples (1) 

Analyze the vowel qualities in a line of poetry. In this example using the first line of Edgar Allan Poe's poem "The Raven", the internal rhyme is evident by the repeated as well as a bias toward closed vowels (blue and purple colors):

In[13]:=
words = TextWords[
   "Once upon a midnight dreary, while I pondered weak and weary"];
cols = ResourceFunction["WordSyllableMandalas"][#, OutputFormat -> "VowelColors"] & /@ words;
Map[LinearGradientImage[#, ImageSize -> 30] &, cols, {2}] // Flatten // Row
Out[15]=

Publisher

Mark Greenberg

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 15 July 2024

Related Resources

Author Notes

WordSyllableMandalas is specifically written for English. It will give meaningless output with other languages.
The default output is a graphics object; to change the size use Show[WordSyllableMandalas[w],ImageSizes].

License Information