The PTQ package

[Tags: lgpl, program]

An implementation of Montague's PTQ (Proper Treatment of Quantification). It translates simple plain English sentences into formulas of intentional logic.

[Skip to ReadMe]


Versions0.0.4, 0.0.5, 0.0.6, 0.0.7
Change logNone available
Dependenciesbase (>=4.4 && <5), containers, mtl, network, network-uri, xml [details]
AuthorMasahiro Sakai
MaintainerMasahiro Sakai <masahiro.sakai AT>
CategoryNatural Language Processing
Home page
Source repositoryhead: git clone git://
Executablesptq.cgi, ptq
UploadedTue Dec 23 15:30:36 UTC 2014 by MasahiroSakai
Downloads898 total (11 in last 30 days)
0 []
StatusDocs not available [build log]
Last success reported on 2015-12-08 [all 7 reports]


utf8terminalUse UTF-8 for terminal I/ODisabledManual
utf8cgiUse UTF-8 for HTTP contentsEnabledManual
network-uriGet Network.URI from the network-uri packageEnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees

Readme for PTQ-0.0.7

An implementation of Montague's PTQ in Haskell

Build Status Hackage

Build and Install

% cabal configure
% cabal build
% cabal install

Usage of interactive shell ptq

% ptq
PTQ> John seeks a unicorn.
  F4 john (F5 seek (F2 a unicorn))

  (\x0. x0 {john}) (Int (seek (Int ((\x0. \x1. exists x2. x0 {x2} && x1 {x2}) (Int unicorn)))))

Translation (simplified):
  seek (Int (\x0. exists x1. unicorn x1 && x0 {x1})) john


  F10 0 (F2 a unicorn) (F4 john (F5 seek (He 0)))

  (\x0. \x1. exists x2. x0 {x2} && x1 {x2}) (Int unicorn) (Int (\x0. (\x1. x1 {john}) (Int (seek (Int (\x1. x1 {x0}))))))

Translation (simplified):
  exists x0. unicorn x0 && seek (Int (\x1. x1 {x0})) john
PTQ> quit

CGI interface

By locating ptq.cgi, cgi/index.html and cgi/main.html to the place where CGI is executable, you can try it on the web. Demo site runs at (currently not working).

Haste interface

You can use Haste to compile haste/* and run on your browsers. Demo site runs at