]> hydra-www.ietfng.org Git - dyna2/commit
Noticed some quirky behavior with global variables when REPL was in a different
authorTim Vieira <tim.f.vieira@gmail.com>
Sun, 2 Jun 2013 17:29:16 +0000 (13:29 -0400)
committerTim Vieira <tim.f.vieira@gmail.com>
Sun, 2 Jun 2013 17:29:16 +0000 (13:29 -0400)
commit1fb812d7777cc507edb49fdef07005c3c0d7b6ed
treecbcd5e5c2fa995424f6a8f071f237e456626e61a
parent6af19e24f73fe27dd30f466052ba03fb7b8dd814
Noticed some quirky behavior with global variables when REPL was in a different
module from interpreter so I switched it back temporarily.

minor refactoring to Chart.update and Chart.insert

The new Term object hasn't been pushed all the way thru. The old-style (fn,idx)
tuples are what get stored in the chart.

   TODO: track down and fix this.

Ghetto way to answer queries.

  :- query phrase(X,I,K)

in(2) :- query rewrite(X,I,K)
out(2) bag= _VALUE is rewrite(X,I,K), &result(&(rewrite(X,I,K)), _VALUE).
=============
out(2) := BAggregator({result(rewrite('PP','P','NP'),1): 1,
                       result(rewrite('VP','VP','PP'),1): 1,
                       ...
                       })
src/Dyna/Backend/Python/interpreter.py
src/Dyna/Backend/Python/repl.py