Categories in linguistics

Now students in the Applied Category Theory class are reading about categories applied to linguistics. Read the blog article here for more:

This was written by my grad student Jade Master along with Cory Griffith, an undergrad at Stanford.

What's the basic idea? I don't know much about this, but I can say a bit.

Since category theory is great for understanding the semantics of programming languages, it makes sense to try it for human languages, even though they're much harder. The first serious attempt I know was by Jim Lambek, who introduced pregroup grammars in 1958:

• Joachim Lambek, The mathematics of sentence structure, Amer. Math. Monthly 65, 154–170 (1958). Available at

In this article he hid the connection to category theory. But when you start diagramming sentences or phrases using his grammar, as below, you get planar string diagrams. So it's not surprising - if you're in the know - that he's secretly using monoidal categories where every object has a right dual and, separately, a left dual.

This fact is just barely mentioned in the Wikipedia article:

but it's explained in more detail here:

• A. Preller and J. Lambek, Free compact 2-categories, Mathematical Structures in Computer Science 17 (2005), 309-340. Available at

This stuff is hugely fun, so I'm wondering why I never looked into it before! When I talked to Lambek, who is sadly no longer with us, it was mainly about his theories relating particle physics to quaternions.

Recently Mehrnoosh Sadrzadeh and Bob Coecke have taken up Lambek's ideas, relating them to the category of finite-dimensional vector spaces. Choosing a monoidal functor from a pregroup grammar to this category allows one to study linguistics using linear algebra! This simplifies things, perhaps a bit too much - but it makes it easy to do massive computations, which is very popular in this age of "big data" and machine learning.

It also sets up a weird analogy between linguistics and quantum mechanics, which I'm a bit suspicious of. While the category of finite-dimensional vector spaces with its usual tensor product is monoidal, and has duals, it's symmetric, so the difference between writing a word to the left of another and writing it to the right of another gets washed out! I think instead of using vector spaces one should use modules of some non-cocommutative Hopf algebra, or something like that. Hmm... I should talk to those folks.
Shared publiclyView activity