Did you know ... | Search Documentation: |
![]() | Pack logicmoo_nlu -- ext/regulus/Examples/Calendar/doc/README_database.txt |
CREATING A VERSION OF THE APPLICATION FOR A NEW DATABASE
The app assumes that the database will be in Prolog format. Name entries in the Regulus grammar are automatically extracted from the database by a script. There is an example of a correctly formatted database in the file Prolog/database_im2.pl.
This document should contain all the information you need if you want to create a version of the system using a new database. Specifically, it describes 1) the format of the database, 2) which other files need to be edited or created.
FORMAT OF DATABASE
The database needs to define a module called 'database' exporting the following predicates:
meeting/7 person/6 attends/2 location/5
NOTE: THE EXACT FORM OF THE FIELDS CAN BE IMPORTANT, SINCE SOME OF THEM ARE USED TO EXTRACT ENTRIES FOR THE REGULUS GRAMMAR.
FIELDS CONTAINING INFORMATION THAT WILL APPEAR IN THE LEXICON MUST BE PROLOG ATOMS WHOSE PRINT NAMES CONTAIN ONLY LOWER-CASE LETTERS AND UNDERSCORES.
In detail, the format of the database relations is as follows:
meeting/7
Pattern: meeting(ID, Day, Month, Year, StartTime, EndTime, LocID)
.
Example: meeting(meeting_1, 29, 5, 2007, 9:30, 12:0, nikos_room_1)
.
person/6
Pattern: person(ID, FirstName, LastName, Affiliation, Phone, Email)
.
Example: person(pierrette_bouillon, pierrette, bouillon, geneva, "+41 22 379 8679", "Pierrette.Bouillon@issco.unige.ch")
.
attends/2
Pattern: attends(PersonID, MeetingID)
.
Example: attends(pierrette_bouillon, meeting_1)
.
location/5
Pattern: location(ID, Name, Country, City, Organisation)
.
Example: location(nikos_room_1, nikos_s_room, switzerland, geneva, geneva_university)
.
DECLARING THE NEW DATABASE
You need to create or edit the following additional files: