[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A (Lame) Joke in Loglan



> Nick, wondering whether his Lojban analyser should implement database
> queries...

Yes, without question!  The meaning sets represented by predicate
languages are ideally represented by means of a relational database.
Specific areas where the database approach gives an advantage:

1.  It takes forever to load the dictionary.  If you can load it once
and leave it in a database, you can speed up processing a great deal,
assuming your database software is reasonably fast.

2.  Parse trees tend to proliferate like fungus, and soon run you out
of memory and swap space.  This is particularly true if you plan to
feed running text into the program, and if you expect it to deal with
all parts of the text in one query.  The database software at least
gets the stored info onto disc.  

3.  A little optimization can be helpful.  Example: run through the
input file once and pick out all the words.  Sort (unless the database
software does this automatically).  Extract only the immediately needed
definitions.  

4.  Many operations are like inner joins between two or more
predicates. The database software may be able to do an inner join a lot
more efficiently than Prolog can, particularly when a lot of text is
involved.  Then again, maybe your database program is a slug and you
have a good Prolog.  

Good luck!

		-- jimc