Compositional semantics (source code)

= Compositional semantics

<Compositional semantics> explains a complex expression's meaning through the meanings of its parts and the way <syntax> combines them. It requires a rule of combination, not merely a list of word meanings. This helps explain how a speaker can understand unfamiliar combinations of familiar material.<Essentials of Linguistics (2nd edition) by Catherine Anderson and others>[§7.2, principle of compositionality and structural combination]{ref}

In an original toy model, let the red objects be $R=\{1,2\}$ and round objects $O=\{2,3\}$. Treating `red and round` as an <intersection> gives $R\cap O=\{2\}$. Replacing `and` with `or` calls for a different combination, giving $R\cup O=\{1,2,3\}$. This stipulated analysis makes the connective's contribution explicit. Natural expressions require more care: not every <adjective> combines with a <noun> by <intersection>. A proposed <formal semantics> must specify its rules and check their predictions against interpretations.