PTQ: An implementation of Montague's PTQ.

[ natural-language-processing, program ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
utf8terminal

Use UTF-8 for terminal I/O

Disabled
utf8cgi

Use UTF-8 for HTTP contents

Enabled
Automatic Flags
NameDescriptionDefault
network-uri

Get Network.URI from the network-uri package

Enabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8
Dependencies base (>=4.4 && <5), containers, mtl, network, network-uri, xml [details]
Tested with ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.1, ghc ==8.2.1
License LicenseRef-LGPL
Author Masahiro Sakai
Maintainer Masahiro Sakai <masahiro.sakai AT gmail.com>
Category Natural Language Processing
Home page http://msakai.jp/hiki/?hsPTQ
Source repo head: git clone git://github.com/msakai/ptq.git
Uploaded by MasahiroSakai at 2017-09-12T23:53:05Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables ptq.cgi, ptq
Downloads 4576 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2017-09-13 [all 3 reports]

Readme for PTQ-0.0.8

[back to package description]

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.
Parsed:
  F4 john (F5 seek (F2 a unicorn))

Translation:
  (\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

------------------------------------------------------

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

Translation:
  (\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 http://www.tom.sfc.keio.ac.jp/~sakai/hsPTQ/ (currently not working).

Haste interface

You can use Haste to compile haste/* and run on your browsers. Demo site runs at http://msakai.github.io/ptq/demo/index.html.