Attempto / APE

Parser for Attempto Controlled English (ACE)
http://attempto.ifi.uzh.ch/ape/
Other
188 stars 28 forks source link

The word 'table' produces incorrect TPTP output #32

Open RespeckKnuckles opened 5 years ago

RespeckKnuckles commented 5 years ago

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.

Kaljurand commented 5 years ago

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)))))))).
RespeckKnuckles commented 5 years ago

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.

JohnAZoidberg commented 5 years ago

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 113b81621262d7a395779465cb09397183e6f74c using clex_lexicon.pl from https://github.com/Attempto/Clex, i.e. the large lexicon. SWI-Prolog 8.1.15 on GNU/Linux.

Kaljurand commented 5 years ago

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