Skip to main content

Natural language understanding system

Project description


Build Status

An experimental natural-language understanding system.

Unlike conventional, machine-learning NLU systems, Montague uses formal semantics to interpret English sentences.

When Montague reads a sentence, it looks up each word in its lexicon to assign it a meaning in its logical language (an extension of first-order logic). Then, it recursively combines the words into phrases and computes the meaning of each phrase. When the sentence has been translated into a logical formula, Montague evaluates the formula against its model of the world to determine its truth value.


$ pip3 install montague-nlu

Alternatively, you can install a development version with

$ git clone
$ python3 develop --user

Once you do so, you can play with Montague's command-line interface:

$ montague


The Montague system is still in early beta and suffers from many limitations.

  • Montague has no knowledge of syntax. Its only criterion for grouping two phrases is whether they are linearly adjacent and whether their types are compatible. This leads Montague to interpret nonsense sentences like "Every good is child."
  • Montague will fail to interpret a sentence if it contains a word that is not in its lexicon.
  • Important modules of formal semantics, like plurality, tense, aspect, theta roles, intensionality, and indexicals, have yet to be implemented.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for montague-nlu, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size montague_nlu-0.1.6-py3-none-any.whl (19.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size montague-nlu-0.1.6.tar.gz (12.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page