[Attempto] [Paraphrasing DRS]

Kaarel Kaljurand kaljurand at gmail.com
Mon Aug 20 09:39:44 CEST 2012


Hi,

On Thu, Aug 16, 2012 at 1:11 PM, Mohammed Nasri
<mohammed.nasri at gmail.com> wrote:
> Hi Kaarel,
>
> I hope that you are fine.
>
> Is there a way to extend ACE lexicon without manually editing clex file ?

can you be more specific, i.e. how are you currently using APE and the
lexicon? What do you mean by manual editing?

If you are writing a Prolog program that calls the APE modules, then
you can programmatically modify the lexicon e.g. like this:

    asserta(clex:pn_sg('Bill',
iri('http://www.example.org/words#Bill'), neutr)).

See e.g. the last lines of
https://github.com/Attempto/APE/blob/master/tests/test_owlswrl.pl
This is a bit of a hackish solution though.

If you are using the commandline client ape.exe and want to add a few
lexicon entries, then you can do it on the commandline, e.g.:

$ ./ape.exe -solo drspp -text "Name1 is a thing1." -ulextext
"pn_sg('Name1', 'lemma_Name1', masc). noun_sg(thing1, lemma_thing1,
neutr)."

[A,B]
object(A,lemma_thing1,countable,na,eq,1)-1/4
predicate(B,be,named(lemma_Name1),A)-1/2

If you are accessing APE from Java then Attempto Java Packages
provides a way to build the lexicon without having to write any
Prolog-formatted files, see
http://attempto.ifi.uzh.ch/site/docs/java/ch/uzh/ifi/attempto/ape/package-summary.html

In general the recommendation is to store your domain lexicon in your
favorite format (XML, JSON, ...) and automatically in the background
convert it to Clex to be usable in APE. Clex is optimized for APE and
is therefore not so convenient to edit for humans.

Best regards,
Kaarel


More information about the attempto mailing list