PTQ: An implementation of Montague's PTQ.

[ natural-language-processing, program ] [ Propose Tags ]

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

[Skip to Readme]


Automatic Flags

Use UTF-8 for terminal I/O


Use UTF-8 for HTTP contents


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


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS] 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8
Dependencies base (>=4 && <5), containers, haskell98, mtl, network, utf8-string [details]
License LicenseRef-LGPL
Author Masahiro Sakai
Maintainer Masahiro Sakai <masahiro.sakai AT>
Category Natural Language Processing
Home page
Uploaded by MasahiroSakai at 2009-11-07T08:17:16Z
Distributions NixOS:0.0.8
Executables ptq.cgi, ptq
Downloads 4294 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-31 [all 8 reports]

Readme for PTQ-0.0.4

[back to package description]
= An implementation of Montague's PTQ in Haskell

== Build and Install

You'll need GHC 6.7 or later.

  % runhaskell Setup.lhs configure
  % runhaskell Setup.lhs build
  % runhaskell Setup.lhs 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

== Simple 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.

Currenly it also runs at ((<URL:>)).