[developers] Converting TDL lexicon to LexDB dump format

Dan Flickinger danf at stanford.edu
Thu Nov 6 23:58:32 CET 2008


Hi Joshua -

Someone else may be able to tell you how to use that export-lexicon() command, but if you don't have a really large lexicon, it may be just as easy to import your .tdl lexicon file(s) directly into the database, as follows:

(These steps assume that you have the database initialized and the permissions set properly ...)

In the LKB window (the expanded view, via Options -- Expand menu), select

LexDB -- Import (TDL file)

which will ask you for the name of the file, and then ask you for the same three pieces of information you tried to supply earlier:

Source: Lillooet
Language code: lil
Country code: CA

It will then try to import the file, and warn you in the LKB window about any difficulties it had.  If there are things to fix in the TDL file, fix them, and then click Import (TDL file) again.  Once you are happy with the importation, then do the following to make your new imports permanent

LexDB -- Commit private 'rev'

Finally, do the following to create the .rev file that you were trying to create with that export-lexicon() command. 
 
LexDB -- Dump

As a sanity check, you might also click on 

LexDB -- Export (TDL file)

and give it a new name (ending in .tdl), then compare this new file to the original one you imported, to make sure everything got in to the database.

Cheers,

 Dan

----- Original Message -----
From: "Joshua Hou" <jshou at u.washington.edu>
To: developers at delph-in.net
Sent: Thursday, November 6, 2008 7:57:41 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: [developers] Converting TDL lexicon to LexDB dump format

Hello Developers,

I'm trying to convert a TDL lexicon to LexDB dump format using the
instructions from the following page, but I'm running into some problems.

http://wiki.delph-in.net/moin/Initialize_LexDB?highlight=(lexdb)

The steps that I am taking are as follows:

1) Load the LKB
2) Load grammar
3) (initialize-lexdb :dbname "lil" :user "lexdb")
4) (export-lexicon)

A window pops out when I type the (export-lexicon) command, and these
are the values I answered:

Username: lexdb
Source: Lillooet
Language code: lil
Country code: CA

These are the resulting errors:

(LexDB) exporting lexical entries to dump file /home/jshou/tmp/Lillooet.rev
(LexDB)   skip file: /home/jshou/tmp/Lillooet.NIL.skip
Error:
(LexDB) no DFN entries

Restart actions (select using :continue):
 0: Return to Top Level (an "abort" restart).
 1: Abort entirely from this (lisp) process.
 [1] LKB(15):

Does anyone know the proper incantations to get this to work? 

Thanks so much,

Joshua



More information about the developers mailing list