Attempto/APE

The word 'table' produces incorrect TPTP output

Opened this issue · 4 comments

When parsing a sentence like "A girl is crying at a table." and returning TPTP output, it returns a formula which contains (table X) instead of (table(X)). This seems to replicate with other sentences using the word 'table', but I haven't seen it replicated with any other nouns.

I cannot reproduce this. I tried like this (using the large lexicon from https://github.com/Attempto/Clex):

$ curl -L https://raw.github.com/Attempto/Clex/master/clex_lexicon.pl > prolog/lexicon/clex_lexicon.pl
$ make build
$ ./ape.exe -text "A girl is crying at a table." -solo tptp

fof(f1, axiom, (
? [A,B,C] : ((modifier_pp(D,at,A)) &
((B=C) &
((property1(C,crying,pos)) &
((girl(B)) &
(table(A)))))))).

Here's what I get:

enb310-laptop:APE-master l$ ./ape.exe -text "A girl is crying at a table." -solo tptp -ulexfile "clex_lexicon.pl"
fof(f1, axiom, (
? [A,B,C] : ((modifier_pp(D,at,A)) &
((B=C) &
((property1(C,crying,pos)) &
((girl(B)) &
(table A))))))).

I am also using the large Clex lexicon. I'm using Mac OSX 10.15.1, Swi-prolog 8.0.2.

I also get

> ape -text "A girl is crying at a table." -solo tptp
fof(f1, axiom, (
? [A,B,C] : ((modifier_pp(D,at,A)) &
((B=C) &
((property1(C,crying,pos)) &
((girl(B)) &
(table A))))))).

when building from 113b816 using clex_lexicon.pl from https://github.com/Attempto/Clex, i.e. the large lexicon. SWI-Prolog 8.1.15 on GNU/Linux.

OK, I can reproduce it now with SWI-Prolog 8.0.3, before I was using v7.x.

The weird print-out happens with other outputs as well:

$ ./ape.exe -text "No chair is a table." -cowlfss -cowlfsspp
<?xml version="1.0" encoding="UTF-8"?>

<apeResult>
  <duration tokenizer="0.010" parser="0.010" refres="0.000"/>
  <owlfss>'Ontology'('http://attempto.ifi.uzh.ch/ontologies/owlswrl/test',['DisjointClasses'(['':chair,'':(table)])])</owlfss>
  <owlfsspp>Prefix(:=&lt;http://attempto.ifi.uzh.ch/ontologies/owlswrl/test#&gt;)
Prefix(ace:=&lt;http://attempto.ifi.uzh.ch/ace#&gt;)
Ontology(&lt;http://attempto.ifi.uzh.ch/ontologies/owlswrl/test&gt;
   DisjointClasses(
      :chair
      :(table)
   )
)
</owlfsspp>
  <messages/>
</apeResult>

Maybe has something to do with tabling, https://www.swi-prolog.org/pldoc/doc_for?object=(table)/1